Unit 5: VSD & Animation - Computer Graphics Notes - CSU358

Unit 5: VSD & Animation

5.1 Visible Surface Detection (VSD)

Also called "Hidden Surface Removal". The goal is to draw only what the camera sees.

1. Back-Face Detection

Concept: Check if a polygon is facing away from the camera.

The Test: Calculate Dot Product of View Vector ($V$) and Surface Normal ($N$).
If $V \cdot N > 0$, it is a Back-Face (Hidden). Don't draw it.

2. Z-Buffer Algorithm (Depth Buffer)

Analogy: The Painter's Canvas.
For every dot you paint, you write down its "distance". If you try to paint another dot at the same spot, check the distance.
If the new dot is Closer, paint over it.
If the new dot is Father, ignore it.

3. A-Buffer (Accumulation Buffer)

Concept: An upgrade to Z-Buffer. Instead of storing 1 value per pixel, it stores a List of values.

4. Scan-Line Algorithm (Image Space)

Concept: Process the image line-by-line using Edge Tables to decide what is visible.

The 5-Step Logic:
  1. Scan Line: Draw an imaginary horizontal line across the scene.
  2. Intersection: Find all points where this line cuts polygon edges.
  3. Sort: Sort these points by X-coordinate.
  4. Fill: Color pixels between pairs of points (Interval Coherence).
  5. Depth Check: If polygons overlap, check Z-depth at that interval to see which wins.

Key Structures:

5. The Plane Equation (For Depth)

How do we find $z$ for a random pixel?

$$Ax + By + Cz + D = 0$$ $$z = \frac{-(Ax + By + D)}{C}$$

This formula allows the Z-Buffer to calculate depth quickly.

mindmap
  root((Hidden Surfaces))
    Math Check
      Back-Face Det
      Dot Product
      V dot N > 0
    Pixel Check
      Z-Buffer
      Compare Depth
      Close wins
    List Check
      A-Buffer
      Transparency
      Anti-Aliasing
    Line Check
      Scan-Line
      Intervals
      Edge Tables
            

5.2 Animation Concepts

Definition: Illusion of motion by showing a sequence of frames (>24 FPS).

Key Techniques

Types of Animation Logic

mindmap
  root((Motion Logic))
    The Basics
      Keyframing (Poses)
      Tweening (In-Between)
    Techniques
      Morphing (Shape Change)
      Onion Skin (Trails)
    Physics
      Kinematics (Joints)
      Dynamics (Gravity)