CG Previous Year Question Paper Solution
CG Previous Year Question Paper Solution
Q.1
i. Give applications of Computer Graphics.
ii. What is antialiasing? Explain any 3 antialiasing techniques.
iii. Compare DDA and BRESENHAM line drawing algorithms.
iv. Explain Viewing transformation pipeline.
v. Give a fractal dimension of Koch curve.
Q.2
a. Given a line AB where A(O,O) and B( 1,3) find out all the coordinates of line
AB using DDA algorithm.
b. Describe different traditional animation techniques
Q.3
a. Describe homogeneous coordinates.
b. Describe with a neat diagram Boundary Fill and Flood fill algorithm.
Q.4
a. Derive window to viewport coordinate transformation.
b. Derive matrix for 2D rotation at any arbitrary (fix) point.
Q.5
a. Give properties of the Bezier curve.
b. Describe with neat diagram Sutherland Hodgman polygon clipping
algorithm.
Q.6
a. Describe with a neat diagram Depth Buffer algorithm.
b. What Is projection? Explain with neat diagram different perspective
projections.
Q.1
- Entertainment : Used in movies and video games for creating realistic visual
effects and animations.
D = \frac{\log(N)}{\log(r)}
where N=4 (number of self-similar pieces) and r=3 (scaling factor). Thus,
This indicates that the Koch curve has a fractal dimension of approximately 1.26186
, representing its complexity between a line (dimension 1) and a plane (dimension 2).
---
Q.2
```python
def dda_line_drawing(x0, y0, x1, y1):
dx = x1 - x0
dy = y1 - y0
steps = max(abs(dx), abs(dy))
x_increment = dx / steps
y_increment = dy / steps
x = x0
y = y0
line_coordinates = [(round(x), round(y))]
for _ in range(steps):
x += x_increment
y += y_increment
line_coordinates.append((round(x), round(y)))
return line_coordinates
line_coords = dda_line_drawing(0, 0, 1, 3)
print("DDA Line Coordinates:")
for coord in line_coords:
print(coord)
```
Output :
```
DDA Line Coordinates:
(0, 0)
(0, 1)
(1, 2)
(1, 3)
```
---
Q.3
a. Homogeneous Coordinates
Homogeneous coordinates extend traditional Cartesian coordinates by adding an extra
dimension, allowing for easier representation of transformations such as translation,
scaling, and rotation using matrix multiplication. A point (x, y) in 2D becomes
(wx, wy, w) in homogeneous coordinates.
- Flood Fill Algorithm : Similar to boundary fill but fills an area until it encounters a
different color rather than stopping at a boundary color.
Diagram : Both algorithms can be illustrated with examples showing how they fill
areas based on initial seed points.
---
Q.4
Given:
- Window defined by corners (x_wmin, y_wmin) and (x_wmax, y_wmax) .
- Viewport defined by corners (x_vmin, y_vmin) and (x_vmax, y_vmax) .
The transformation can be derived using linear equations that map points from the
window to viewport coordinates.
R(\theta) =
\begin{bmatrix}
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta)
\end{bmatrix}
The complete transformation matrix combines these steps into one matrix multiplication.
---
Q.5
Diagram : Illustrates how vertices are processed against each clipping edge to
determine which parts of the polygon remain after clipping.
---
Q.6
Diagram : Shows how depth values are compared during rendering to decide which
pixels are drawn over others based on depth information.
Diagram : Illustrates both projection types with examples showing how objects are
represented differently based on projection methods used.
2023
Q.I
I . Compare DDA and BRESENHAM line drawing algorithm.
2. Give application of computer graphics.
3. Explain with neat diagram rasterization,
4. Give a fractal dimension of the KOCH curve.
5. Define Projection, Describe perspective projection with neat diagram.
Q.2
l. Given a triangle ABC where A(O,O), B( 10, IO) and C(20,O), scale the given triangle
ABC 2-unit in X direction and 0.5-unit in Y direction. Find out the new coordinate of
triangle ABC after scaling.
2. Explain with a neat diagram Sutherland and Hodgman polygon clipping algorithm in
detail.
Q.3
l. Derive window to viewport coordinate transformation.
2. Give properties of the Bezier curve.
Q.4
I. Derive Midpoint circle generation algorithm.
2. Give principles of animation
Q.5
l. Explain with neat diagram Area Sub division (Warnock's) algorithm to remove hidden
surfaces.
2. Derive matrix for 2D rotation transformation.
Q.6
I. Explain point clipping algorithm.
2. Give pseudo code for 4-connect Boundary fill algorithm.
3 Give transformation matrix for 3D — Translation, Scaling, Rotation (about x, y, z axis)
4. Explain with neat diagram composite transformation for scaling.
5. Given a line AB where A(O,O) and B(l,3) find out all the coordinate of line AB using
DDA
algorithm.
Q.I
- Entertainment: Film and video game industries for creating animations and visual
effects.
- Medical Imaging: Visualization of complex medical data from scans such as MRIs and
CTs.
- Education: Interactive simulations and visual aids enhance learning in subjects like
science and mathematics.
Diagram: A diagram would show a vector line being converted into a series of pixels on
a grid, illustrating how the line is rasterized.
D = \frac{\log(N)}{\log(r)}
where:
- N = 4 (number of self-similar pieces)
- r = 3 (scaling factor)
Thus,
This indicates that the Koch curve has a fractal dimension of approximately 1.26186,
reflecting its complexity between a line (dimension 1) and a plane (dimension 2).
---
Q.2
To scale the triangle by 2 units in the X direction and 0.5 units in the Y direction, we
apply the scaling transformation:
Steps:
1. Initialize an output list with the vertices of the polygon.
2. For each edge of the clipping window:
- For each vertex of the polygon:
- Determine if it is inside or outside the clipping boundary.
- If inside, add it to the output list.
- If crossing an edge, calculate the intersection point and add it to the output list.
3. Repeat until all edges have been processed.
Diagram: Illustrates how vertices are processed against each clipping edge to
determine which parts remain after clipping.
---
Q.3
Given:
- Window defined by corners W_{\text{min}}(x_wmin, y_wmin) and
W_{\text{max}}(x_wmax, y_wmax).
- Viewport defined by corners V_{\text{min}}(x_vmin, y_vmin) and
V_{\text{max}}(x_vmax, y_vmax).
- Degree: The degree of a Bezier curve is one less than the number of control points.
---
Q.4
2. Principles of Animation
The principles of animation include:
1. Squash and Stretch: Gives weight and volume to characters as they move.
4. Straight Ahead Action and Pose-to-Pose Action: Two approaches for creating
animation sequences; one is fluid while the other is more controlled.
5. Follow Through and Overlapping Action: Ensures that parts of characters continue
moving after an action has stopped.
6. Slow In and Slow Out: Creates realism by having movements start slowly, speed up,
then slow down again before stopping.
7. Arc Movement: Natural movement follows arcs rather than straight lines.
9. Timing and Spacing: Determines how fast or slow movements occur based on timing
frames between actions.
10. Exaggeration: Enhances features or actions for comedic or dramatic effect without
losing believability.
---
Q.5
1. Divide the screen area into smaller rectangles until each rectangle contains either all
visible or all hidden surfaces.
2. For each rectangle:
- If it contains only one surface visible from that area, render it directly.
- If multiple surfaces are present, further subdivide until manageable visibility
determination can be made.
Diagram: Illustrates how areas are subdivided recursively until visibility can be
determined clearly for rendering.
R(\theta) =
\begin{bmatrix}
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta)
\end{bmatrix}
T(-h,-k)
3. Translate back:
T(h,k)
The complete transformation matrix combines these steps into one matrix multiplication
sequence.
---
Q.6
T=
\begin{bmatrix}
1 & 0 & 0 & dx \\
0 & 1 & 0 & dy \\
0 & 0 & 1 & dz \\
0&0&0&1
\end{bmatrix}
S=
\begin{bmatrix}
s_x & 0 & 0 & 0 \\
0 & s_y & 0 & 0 \\
0 & 0 & s_z & 0 \\
0&0&0&1
\end{bmatrix}
R_x =
\begin{bmatrix}
1&0& 0 & 0\\
0 & \cos(\theta) & -\sin(\theta) & 0\\
0 & \sin(\theta) & \cos(\theta) & 0\\
0& 0 & 0 & 1\\
\end{bmatrix}
- Rotation About Y-Axis (R_y(\theta))
R_y =
\begin{bmatrix}
\cos(\theta) & 0 & \sin(\theta) & 0\\
{ } { } { } { } { } { } { } { } { } { }
\\
-\sin(\theta)& { } { } { } { }
& \cos(\theta)& { }
& { }
& { }
& { }
& { }
& { }
\\
& { }
& { }
& { }
& { }
& { }
& { }
& { }
& { }
& { }
\\
The point clipping algorithm is used in computer graphics to determine whether a point
lies within a specified rectangular clipping window. The primary goal is to discard points
that fall outside the defined region, ensuring that only relevant points are processed for
rendering.
The 4-connected boundary fill algorithm fills an area with a specified color until it
reaches a boundary color. Here’s the pseudo code:
```plaintext
function boundaryFill4(x, y, fill_color, boundary_color):
if (getPixel(x, y) != boundary_color and getPixel(x, y) != fill_color):
setPixel(x, y, fill_color)
boundaryFill4(x + 1, y, fill_color, boundary_color) // Right
boundaryFill4(x - 1, y, fill_color, boundary_color) // Left
boundaryFill4(x, y + 1, fill_color, boundary_color) // Down
boundaryFill4(x, y - 1, fill_color, boundary_color) // Up
```
This algorithm recursively checks and fills adjacent pixels that are not part of the
boundary color until all reachable pixels are filled.
Translation
To translate a point P(x,y,z) by tx , ty , and tz :
T = \begin{bmatrix}
1 & 0 & 0 & tx \\
0 & 1 & 0 & ty \\
0 & 0 & 1 & tz \\
0&0&0&1
\end{bmatrix}
Scaling
To scale a point P(x,y,z) by factors sx , sy , and sz :
S = \begin{bmatrix}
sx & 0 & 0 & 0 \\
0 & sy & 0 & 0 \\
0 & 0 & sz & 0 \\
0&0&0&1
\end{bmatrix}
Rotation
For rotation about the axes:
- Rotation about X-axis by angle \theta :
R_x = \begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & \cos(\theta) & -\sin(\theta) & 0 \\
0 & \sin(\theta) & \cos(\theta) & 0 \\
0&0&0&1
\end{bmatrix}
R_y = \begin{bmatrix}
\cos(\theta) & 0 & \sin(\theta) & 0 \\
0 & 1 & 0 & 0 \\
-\sin(\theta) & 0 & \cos(\theta) & 0 \\
0&0&0&1
\end{bmatrix}
R_z = \begin{bmatrix}
\cos(\theta) & -\sin(\theta) & 0 & 0 \\
\sin(\theta) & \cos(\theta) & 0 & 0 \\
0 & 0 & 1 & 0 \\
0&0&0&1
\end{bmatrix}
Composite Transformation for Scaling with Diagram
Steps:
1. Define Scaling Factors: Choose scaling factors for each axis ( sx, sy, sz ).
2. Create Scaling Matrix: Use the scaling matrix defined above.
3. Apply Transformation: Multiply the scaling matrix with the original coordinates of the
object.
Diagram:
```
Original Object ---> Scaling ---> Transformed Object
```
This diagram illustrates how an object is transformed from its original state to a scaled
version.
Given points A(0,0) and B(1,3), we can use the Digital Differential Analyzer (DDA)
algorithm to find all coordinates of line segment AB.
Steps:
1. Calculate differences:
- dx = x_B - x_A = 1 - 0 = 1
- dy = y_B - y_A = 3 - 0 = 3
2. Determine steps required:
- Steps = max(|dx|, |dy|) = max(1,3) = 3
3. Calculate increments:
- x_{inc} = dx / steps = 1 /3 = ~0.33
- y_{inc} = dy / steps =3/3=1
Coordinates Calculation:
Starting from A(0,0):
- Step i=1: (x_1,y_1)=(x_0 + x_{inc}, y_0 + y_{inc})=(~0.33 , ~1)
- Step i=2: (x_2,y_2)= (x_1 + x_{inc}, y_1 + y_{inc})=(~066 , ~2)
- Step i=3: (x_3,y_3)= (x_2 + x_{inc}, y_2 + y_{inc})=(~1 , ~3)
2023
Q.1
a)What are homogeneous coordinates? Write a homogenous transformation matrix for
translation, scaling, and rotation.
b)Explain the Working of the Raster scan system with a neat diagram,
c)Explain any 5 principles Of animation.
d)Scale a triangle A(4,4), B(12,4) and with scaling factor Sx= 2 and Sy—1.
Q.2
a)Write a midpoint circle drawing algorithm. Apply this algorithm to find pixel
coordinates of the circular boundary only for the first quadrant, whose radius is 8
units.
b)Rotate a line segment with endpoint A (3,3) to in a clockwise direction by
an angle 45 degrees by keeping A (3,3) as fixed point. Find new transformed
coordinates of a line.
Q.3
a)Explain Flood fill and boundary fill algorithm with a suitable example. Write merits
and demerits of the same.
b)Derive transformation matrix for 2D rotation about a fixed point.
Q.4
a) Explain the z-buffer algorithm for hidden surface removal with a suitable example.
b) Explain Sutherland-Hodgeman polygon clipping algorithm with a suitable example.
Q.5
a) What is Bezier curve? Write important properties of the Bezier curve.
b) What do you mean by line clipping? Explain Cohen-Sutherland line clipping
algorithm with a suitable example.
Q6
a)Write a note on 3D projections.
b)What is animation? Explain key frame animation.
c)What are the properties of fractals? Explain how the Koch curve is constructed.
Calculate the dimensions of Koch curve.
d)What do you mean by aliasing? Explain any two Anti-aliasing techniques.
Q.1
a) Homogeneous Coordinates
1. Translation by (h, k) :
T = \begin{bmatrix}
1 & 0 & h \\
0 & 1 & k \\
0&0&1
\end{bmatrix}
S = \begin{bmatrix}
S_x & 0 & 0 \\
0 & S_y & 0 \\
0&0&1
\end{bmatrix}
R = \begin{bmatrix}
\cos(\theta) & -\sin(\theta) & 0 \\
\sin(\theta) & \cos(\theta) & 0 \\
0&0&1
\end{bmatrix}
A Raster scan system is a method used in computer graphics to display images on a screen. It
works by scanning each row of pixels from top to bottom and left to right, converting the image
into a series of horizontal lines.
Diagram:
```
+---------------------+
| Row 1: Pixel Data |
+---------------------+
| Row 2: Pixel Data |
+---------------------+
| Row n: Pixel Data |
+---------------------+
```
Working:
1. The display device starts at the top-left corner.
2. It processes each pixel in the current row sequentially.
3. Once a row is completed, it moves to the next row down.
4. This continues until all rows are processed, resulting in a complete image being displayed.
c) Principles of Animation
1. Squash and Stretch: This principle gives a sense of weight and volume to animated objects
by stretching or squashing them during motion.
2. Anticipation: Preparing the audience for an action by creating subtle movements that precede
the main action.
3. Staging: Presenting an idea clearly through effective composition, lighting, and timing to
ensure the audience understands what is happening.
4. Follow Through and Overlapping Action: Allowing parts of a character or object to continue
moving after the main action has stopped, adding realism.
5. Timing and Spacing: Controlling the speed of motion and the distance between frames to
create fluid movement that conveys weight and realism.
d) Scaling a Triangle
To scale triangle vertices A(4,4), B(12,4), and C(8,10) with scaling factors S_x = 2 and S_y = 1
:
- For point B:
- B' = (12 S_x, 4 S_y) = (12 2, 4 1) = (24, 4)
- For point C:
- C' = (8 S_x, 10 S_y) = (8 2, 10 1) = (16, 10)
Q.2
The Midpoint Circle Drawing Algorithm efficiently determines pixel positions for drawing a circle
using integer arithmetic.
Algorithm Steps:
1. Initialize parameters:
- Set radius r = 8 .
- Start at point (x,y) = (0,r) = (0,8) .
R_{45} =
\begin{bmatrix}
\cos(-45^\circ) & -\sin(-45^\circ)\\
\sin(-45^\circ) & \cos(-45^\circ)
\end{bmatrix}
=
\begin{bmatrix}
\frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2}\\
\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2}
\end{bmatrix}
Apply rotation:
B'' =
R_{45}
\begin{bmatrix}
3\\
6
\end{bmatrix} =
\begin{bmatrix}
\frac{\sqrt{2}}{2}(3)-\frac{\sqrt{2}}{2}(6)\\
\frac{\sqrt{2}}{2}(3)+\frac{\sqrt{2}}{2}(6)
\end{bmatrix} =
\begin{bmatrix}
-\frac{3\sqrt{2}}{2}\\
\frac{9\sqrt{2}}{2}
\end{bmatrix}
Flood Fill Algorithm fills an area with a specific color starting from a seed point until it encounters
boundaries.
Example:
Starting from point inside an area filled with color X until reaching boundary color Y.
Boundary Fill Algorithm fills an area until it reaches a boundary color without filling across
boundaries.
| Merits | Demerits |
|---------------------------------|-----------------------------------|
| Simple implementation | Can be slow for large areas |
| Works well for complex shapes | May require more memory |
M=
T(px,-py)
R(\theta)
T(-px,+py)
=
T(px,-py)
=
\begin{bmatrix}
1 & 0 & px\\
0 & 1 & py\\
0&0&1
\end{bmatrix}
\times
R(\theta)
\times
T(-px,+py)
=
R(\theta)=
=
\begin{bmatrix}
cos(\theta)& -sin(\theta)& px\\
sin(\theta)& cos(\theta)& py\\
0&0&1
\end{bmatrix}
Q.4
The Z-buffer algorithm is used in computer graphics to determine which surfaces are visible in a
scene based on depth information.
Steps:
1. Initialize Z-buffer with maximum depth values.
2. For each pixel on the screen:
- Compare depth of incoming pixel with current Z-buffer value.
- If incoming pixel is closer than current Z-value:
- Update Z-buffer with new depth.
- Update color buffer with new pixel color.
Example:
Consider two overlapping triangles; only the triangle closer to the viewer will be rendered based
on Z-values stored in the buffer.
Steps:
1. Start with input polygon vertices.
2. For each edge of the clipping window:
- Determine intersections with polygon edges.
- Decide whether vertices are inside or outside.
- Construct new clipped polygon based on these decisions.
Example:
Clipping a triangle against a rectangular window will yield new vertices that define the visible
portion of the triangle within the window bounds.
Q.5
a) Bezier Curve
A Bezier curve is a parametric curve used in computer graphics and related fields that uses
control points to define its shape.
Important Properties:
- Defined by control points; more control points yield more complex curves.
- The curve always starts at the first control point and ends at the last control point.
- It is smooth and continuous; derivatives exist at all points along the curve.
b) Line Clipping
Line clipping refers to algorithms that determine which portions of lines are within a defined
viewing area or clipping window.
This algorithm uses region codes to quickly identify whether lines are completely inside or
outside:
Example:
If line endpoints have codes indicating they are outside the window's bounds but intersect with
it; only visible segments are retained.
Q6
a) Note on 3D Projections
3D projections convert three-dimensional objects into two-dimensional representations on
screens or paper while preserving spatial relationships among objects through perspective or
orthographic projection techniques.
b) Animation and Key Frame Animation
Animation is creating motion through sequential images or frames displayed rapidly to give an
illusion of movement.
Key Frame Animation involves defining critical frames at significant points in time; intermediate
frames are generated through interpolation between these keyframes.
c) Properties of Fractals
Fractals exhibit self-similarity across different scales; they have intricate detail at every level of
magnification.
Dimensions Calculation:
The Koch curve has a fractal dimension calculated using box-counting methods that yield
dimensions greater than one but less than two due to its infinite complexity.
d) Aliasing
Aliasing occurs when high-frequency signals become indistinguishable from lower frequencies
during sampling processes in digital graphics or audio signals.
Anti-aliasing Techniques:
2. Multisampling Anti-aliasing (MSAA): Samples multiple locations within each pixel and
averages colors to smooth edges without significant performance costs compared to
supersampling techniques.
2022
Q.1
a) Give the difference between a random scan display and raster scan display.
b) Define Aliasing, Describe-different antialiasing techniques.
c) Compare DDA and BRESENHAM line drawing algorithms.
d) Explain,point clipping algorithm.
e) Give a Fractal dimension forKOCH curve.
Q.2
a) Derive formula for mid-point circle algorithm.
Qb) Given a line ABVhere and B(O,O) calculate all the points of line AB using DDA algorithm.
Q3
a) With a neat diagram explain Composite Transformation.
b) Describe what Homogeneous coordinates are.
Q.4
a) With a neat diagram explain window to viewport coordinate transformation.
b) with a neat diagram explains the Sutherland Hodgman algorithm.
Q.5
a)Define projection with neat diagram describe planar geometric projection.
b) Describe properties of BEZIER curve.
Q.6
a) Describe various principles of traditional animation.
b) Write short note on Depth buffer algorithm.
Q.1
Aliasing refers to the visual artifacts that occur when high-frequency signals are sampled
insufficiently, resulting in jagged edges or distortions in digital images.
Anti-aliasing Techniques:
1. Supersampling: Renders the image at a higher resolution than needed, then downsamples to
the target resolution, smoothing out edges.
2. Multisampling Anti-aliasing (MSAA): Samples multiple points within each pixel and averages
their colors, reducing jaggedness without significant performance loss.
4. Coverage Sampling: Determines how much of a pixel is covered by the geometry and adjusts
the color accordingly.
5. Edge Smoothing Techniques: Uses techniques like morphological anti-aliasing to identify and
smooth edges based on pixel connectivity [1][2].
The point clipping algorithm determines whether a point lies within a defined rectangular clipping
window.
Steps:
1. Define the clipping window by its minimum and maximum coordinates: (xmin, ymin) and
(xmax, ymax).
2. For each point P(x, y) :
- Check if x < xmin or x > xmax or y < ymin or y > ymax .
- If any condition is true, the point is outside the clipping window; otherwise, it is inside.
This algorithm efficiently discards points outside the specified region before further processing
[1][6].
The Koch curve is a well-known fractal that exhibits self-similarity and infinite complexity.
D = \frac{\log(N)}{\log(1/r)}
where:
- N = 4 (the number of segments after one iteration),
- r = 3 (the scaling factor since each segment is divided into 3 equal parts).
Thus,
This indicates that the Koch curve has a fractal dimension greater than 1 but less than 2,
reflecting its complexity [1].
Q.2
The Midpoint Circle Algorithm calculates pixel positions to draw a circle using integer arithmetic.
Derivation:
1. Start with a circle centered at the origin with radius r .
2. The equation of the circle is given by:
3. The algorithm uses symmetry; only one-eighth of the circle needs to be computed.
4. Begin with initial point (0, r) .
5. Calculate decision parameter p = 1 - r .
6. For each point (x, y) :
- If p < 0 , plot next point using:
- p = p + 2x + 3
- If p \geq 0 , plot next point using:
- p = p + 2x - 2y + 5; y--
- Increment x .
This results in an efficient way to compute circle points using integer arithmetic [1].
Steps:
1. Calculate differences:
- dx = x_B - x_A = 0 - 0 = 0
- dy = y_B - y_A = 0 - 0 = 0
Since both points are identical, only point A(0,0) will be plotted.
Q3
Diagram:
```
Original Object ---> Transformation Matrix ---> Transformed Object
```
b) Homogeneous Coordinates
This representation allows for simpler computations involving translations, scaling, and rotations
using matrices [1].
Q4
a) Window to Viewport Coordinate Transformation
The window-to-viewport transformation maps coordinates from a defined window in world space
to a viewport on the display screen.
Diagram:
```
+-------------------+ +-------------------+
| Window | | Viewport |
+-------------------+ +-------------------+
```
Steps:
1. Define the window's corners in world coordinates.
2. Define the viewport's corners in screen coordinates.
3. Calculate scaling factors based on the dimensions of both.
4. Apply translation based on the position of both corners.
The transformation ensures that objects within the window are displayed correctly within the
viewport [1].
This process continues until all edges have been processed [1].
Q5
a) Definition of Projection with Diagram
Projection refers to mapping three-dimensional objects onto two-dimensional surfaces while
preserving spatial relationships.
Diagram:
```
3D Object ---> Projection Plane ---> 2D Image
```
In planar geometric projection, objects are projected onto a flat surface using parallel rays or
perspective methods.
Q6
a) Principles of Traditional Animation
Traditional animation relies on several key principles:
1. Squash and Stretch: Gives weight and volume by deforming objects during motion.
2. Anticipation: Prepares viewers for an action by creating subtle movements before major
actions.
3. Staging: Clearly presents an idea through effective composition and timing.
4. Follow Through and Overlapping Action: Allows parts of characters or objects to continue
moving after main actions have stopped.
5. Timing and Spacing: Controls speed and distance between frames to create realistic motion
[1].
b) Depth Buffer Algorithm
The Depth Buffer Algorithm, also known as Z-buffering, manages visibility in rendered scenes
by storing depth information:
Steps:
1. Initialize a depth buffer with maximum values.
2. For each pixel rendered:
- Compare depth values; if closer than current buffer value:
- Update depth buffer with new value.
- Update color buffer with new pixel color.
This ensures that only visible surfaces are displayed correctly without hidden surfaces
interfering [1].