CG_Oral

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CG_LAB_ ORAL_QUESTIONS

1. What is C.G?

Computer Graphics (C.G) is the field of creating, manipulating, and displaying visual content using
computers.

2. Study of all functions in OpenGL like glut,....RGB...

OpenGL functions, like those in GLUT (OpenGL Utility Toolkit), provide tools for rendering graphics.
RGB refers to the color model used in graphics, representing colors using combinations of red, green,
and blue components. Functions in OpenGL: OpenGL provides a variety of functions for tasks such as
rendering primitives, applying transformations, and setting up the rendering environment. Some
essential functions include:

1. glBegin() and glEnd(): These functions mark the beginning and end of a block of vertex data
to be rendered. For example:
glBegin(GL_TRIANGLES);
glVertex3f(0.0, 0.0, 0.0);
glVertex3f(1.0, 0.0, 0.0);
glVertex3f(0.0, 1.0, 0.0);
glEnd();
2. glClear(): Clears buffers to preset values, such as clearing the color buffer to a specified color.
glClear(GL_COLOR_BUFFER_BIT);
3. glViewport(): Sets the viewport, defining the mapping of normalized device coordinates to
window coordinates.
glViewport(0, 0, 800, 600);
4. glMatrixMode() and glLoadIdentity(): Manipulate the transformation matrices. For example,
switching to the modelview matrix mode and loading the identity matrix:
glMatrixMode(GL_MODELVIEW); glLoadIdentity();
Symbolic Constants in OpenGL: OpenGL uses symbolic constants to represent various parameters
and states. For example:
1. GL_TRIANGLES: Specifies that geometric primitives are triangles.
2. GL_COLOR_BUFFER_BIT: Indicates the color buffer for clearing.
3. GL_MODELVIEW: Specifies the modelview matrix mode.
Specific Data Types in OpenGL: OpenGL uses specific data types for representing vertices, colors, and
matrices. For example:
1. GLfloat: Represents floating-point values used for vertex coordinates and colors.
2. GLint: Represents integer values used for specifying dimensions and indices.
3. GLdouble: Represents double-precision floating-point values.

3. Show pixel representation of DDA & Bresenham Algorithm

 Both DDA (Digital Differential Analyzer) and Bresenham algorithms plot pixels to draw lines.
In DDA, pixels are plotted incrementally along the line's path, while in Bresenham, pixels are
plotted based on error minimization to draw lines efficiently.

4. Difference between DDA & Bresenham

 DDA algorithm uses floating-point calculations, while Bresenham algorithm uses integer
arithmetic. Bresenham algorithm is faster and more efficient than DDA.

5. What is DDA & Bresenham's algorithm? Explain


 DDA is a line drawing algorithm that uses incremental calculations to plot pixels along a line.
Bresenham's algorithm is also a line drawing algorithm, but it uses integer arithmetic and
minimizes error to draw lines efficiently.

6. Explain Bresenham's circle drawing algorithm

 Bresenham's circle drawing algorithm is used to draw circles efficiently. It plots points along
the circumference of a circle by minimizing error at each step, making it faster than some
other algorithms.

7. What is a polygon & its types

 A polygon is a closed geometric shape with straight sides. Types include triangles,
quadrilaterals, pentagons, etc., based on the number of sides.

8. Difference between flood fill and boundary fill

 Flood fill fills a bounded area with color until it encounters a boundary. Boundary fill fills an
area until it reaches a boundary with a different color.

9. Explain polygon filling methods flood & boundary fill

 Flood fill starts from a seed point and fills adjacent pixels with the same color until a
boundary is reached. Boundary fill starts from a seed point and fills the interior of the
boundary with a specified color.

10. What is a viewport

 A viewport is the area of the screen where graphics are displayed. It defines the boundaries
within which graphics are rendered.

11. Explain Cohen Sutherland polygon clipping algo to clip w.r.to viewport

 Cohen Sutherland algorithm is used to clip polygons against a rectangular clipping window
defined by a viewport. It categorizes points as inside, outside, or potentially intersecting the
window and clips accordingly.

12. Explain polygon clipping, 2D clipping, and its types

 Polygon clipping removes portions of polygons outside a specified region. 2D clipping deals
with clipping objects in two-dimensional space. Types include Sutherland-Hodgman, Cohen-
Sutherland, etc.

13. What is reflection ...about x-axis and y-axis

 Reflection flips an object across an axis. Reflection about the x-axis flips an object vertically,
while reflection about the y-axis flips it horizontally.

14. What is 2D rotation

 2D rotation is the transformation of an object around a point in a two-dimensional plane. It


involves changing the orientation of the object with respect to an axis.

15. What is 2D Scaling

 2D scaling is the transformation of an object by changing its size along the x and y axes. It
involves multiplying the coordinates of the object by scaling factors.
16. What is 2D translation

 2D translation is the transformation of an object by moving it along the x and y axes. It


involves adding or subtracting values from the coordinates of the object.

17. What is 2D transformation

 2D transformation involves changing the position, size, and orientation of an object in a two-
dimensional space. It includes translation, rotation, and scaling.

18. Explain Koch Curve

 Koch Curve is a fractal curve with infinite length but finite area. It's constructed by repeatedly
dividing a line segment into three equal parts and replacing the middle segment with an
equilateral triangle.

19. Explain Bezier curve & its properties

 Bezier curve is a smooth curve defined by control points. It has properties like interpolation,
which means it passes through its control points, and approximation, which allows it to
approximate other curves.

20. What is interpolation & approximation

 Interpolation involves estimating values between known data points. Approximation involves
finding a simpler function that closely matches a complex function.

21. What is a curve and types of curves

 A curve is a continuous line or path that connects a series of points. Types include Bezier
curves, B-splines, Hermite curves, etc.

22. Explain Keyframe, Morphing, Motion Specifications, Methods of controlling animation

 Keyframe animation involves defining key poses or frames, and the computer interpolates
between them to create motion. Morphing is a special type of animation where one object
smoothly transforms into another. Motion specifications and methods of controlling
animation involve defining parameters like timing, speed, and easing functions.

23. What is animation and types of animation, principles of animation, and animation techniques

 Animation is the process of creating the illusion of motion by displaying a sequence of


images or frames. Types include 2D animation, 3D animation, stop motion, etc. Principles of
animation include squash and stretch, anticipation, staging, timing, etc. Techniques involve
methods like keyframe animation, procedural animation, and motion capture.

You might also like