Hidden Surface Elimination and CRT Display Technology

When rendering a 3D scene onto a 2D screen, objects closer to the camera must obscure objects that are behind them. Identifying and removing parts of a scene that are blocked from view is called Hidden Surface Elimination (or Visible Surface Detection).

These techniques are divided into two categories: Object-Space methods (which analyze physical geometry in 3D coordinates) and Image-Space methods (which work pixel-by-pixel in 2D screen coordinates).

1. Back-Face Removal (Object-Space)

Back-face removal is a fast preprocessing step that discards polygons facing away from the camera. For a solid, closed object, up to 50% of its polygons are back-faces that can never be seen by the viewer.

The Logic

Every polygon has a surface normal vector (N) that points perpendicularly outward from its front face. If we calculate the dot product between this normal vector and the viewing vector (V) pointing from the camera to the surface, we can determine its orientation:

  • If N · V > 0, the surface is facing away from the viewer (Back-face) and is discarded.
  • If N · V ≤ 0, the surface is facing toward the viewer (Front-face) and is kept.

In a standard right-handed coordinate system where the polygon is defined by vertices in a counterclockwise order, the plane equation is Ax + By + Cz + D = 0. If the viewing direction is along the negative Z-axis, any polygon with a C ≤ 0 coefficient is a back-face.

2. Depth-Buffer (Z-Buffer) Algorithm (Image-Space)

The Z-Buffer algorithm is the most common hidden surface removal method used by modern graphics hardware (GPUs). It compares depths pixel-by-pixel across the screen.

How it Works

The system maintains two separate 2D arrays that match the screen’s pixel resolution:

  1. Refresh Buffer (Color Buffer): Stores the color values for each pixel.
  2. Depth Buffer (Z-Buffer): Stores the Z-value (depth) of the surface currently visible at each pixel coordinate.

Step-by-Step Mechanism

  1. Initialize the entire Depth Buffer to its maximum possible depth (infinity or Z = 1.0) and the Refresh Buffer to the background color.
  2. Loop through each polygon in the scene and scan-convert it into pixels.
  3. For each pixel (x, y) covered by the polygon, calculate its current depth value Z.
  4. The Test: Compare the calculated depth Z against the value currently stored in the Depth Buffer at position (x, y):
    • If Z < DepthBuffer(x, y): The new polygon is closer than whatever was drawn there before. Update the Depth Buffer with the new Z value and write the polygon’s color to the Refresh Buffer.
    • If Z ≥ DepthBuffer(x, y): The new polygon is blocked by a closer object. Discard it.
Pros: Simple to implement in hardware; polygons can be processed in any random order.
Cons: Requires significant extra memory allocation (VRAM) to hold the depth data.

3. Scan-Line Algorithm (Image-Space)

The Scan-Line Algorithm extends the 2D polygon filling method to look at multiple intersecting surfaces simultaneously. It processes the scene one horizontal scan line at a time, rather than tracking individual pixels or entire objects independently.

How it Works

  1. The algorithm maintains an Edge Table and an Active Edge Table (AET) to track which polygon boundaries intersect the current horizontal scan line.
  2. As the scan line moves from left to right, it divides the row into distinct segments based on polygon edge crossings.
  3. For each segment, it checks which overlapping polygon has the closest depth (Z value).
  4. It fills that entire segment with the color of the closest polygon, skipping the hidden surfaces entirely for that section.

Advantage: Highly efficient because depth calculations are only performed at boundary crossings instead of computing values for every single pixel.

4. Depth-Sort Algorithm (Painter’s Algorithm)

The Depth-Sort Algorithm takes an object-space approach modeled after how an artist paints on a canvas. Closer elements are simply painted directly over the top of more distant objects.

How it Works

  1. Sort: Sort all polygons in the scene based on their maximum depth (Z value) from farthest to closest.
  2. Resolve Overlaps: If any polygons overlap in depth, perform tests to see if their bounding boxes overlap in the X or Y dimensions. If they overlap completely or pierce through each other, split the polygons into smaller, non-intersecting pieces.
  3. Render: Draw the sorted polygons onto the screen starting from the farthest and ending with the closest. The closer objects automatically overwrite the background pixels.

5. Shading

Once hidden surfaces are removed, Shading calculations are used to apply realistic lighting models across the remaining visible polygon surfaces. Shading uses surface geometry and light positions to determine how bright each pixel should be.

Shading MethodVisual TechniquePerformanceVisual Quality
Flat / Constant ShadingCalculates a single lighting intensity for an entire polygon face.Extremely FastLow; blocky appearance.
Gouraud ShadingCalculates lighting at each vertex and interpolates colors.ModerateMedium; smooth but lacks sharp highlights.
Phong ShadingInterpolates surface normals and calculates lighting per pixel.Slow / IntensiveHigh; realistic specular reflections.

CRT Display Technology

A Cathode Ray Tube (CRT) is a specialized vacuum tube that converts electronic video signals into a visual image on a phosphor-coated screen. It served as the foundational technology for early computer monitors, radar systems, and televisions.

Internal Components and Mechanism

A CRT operates by generating a highly focused stream of electrons, accelerating them to high velocities, and deflecting them onto a phosphor screen to make pixels glow. The operation is split across four primary stages:

1. The Electron Gun Assembly

The electron gun is responsible for creating and emitting the electron beam.

  • Heating Filament & Cathode: An electrical current heats the filament, which heats the cathode, causing it to emit electrons via thermionic emission.
  • Control Grid: A metal cylinder that regulates the intensity of the electron beam to control pixel brightness.

2. Focusing and Accelerating Anodes

Once electrons escape the control grid, they must be formed into a sharp beam and pulled forward.

  • Accelerating Anode: Acts like a powerful magnet that pulls the negatively charged electrons toward the front of the tube at extreme speeds.
  • Focusing Anode: Forces the divergent cloud of electrons to converge into a thin, razor-sharp beam.

3. The Deflection Coils (Yoke)

To draw an image, the electron beam must be moved across the screen using the deflection yoke:

  • Horizontal Deflection: Steers the beam left and right.
  • Vertical Deflection: Steers the beam up and down.

In a Raster-Scan system, these coils sweep the beam systematically row-by-row. In a Random-Scan system, they direct the beam to trace out lines directly.

4. Phosphor-Coated Screen

  • The interior front surface is coated with phosphor crystals.
  • When the electron beam strikes these phosphors, they emit light photons (fluorescence).
  • Persistence: Phosphor dots continue to glow for a fraction of a second (phosphorescence). The system must rapidly refresh the coordinates (30 to 60 times per second) to avoid flickering.

Color CRTs: Rendering Color

A Color CRT renders millions of colors using the Shadow-Mask Technique:

  • Phosphor Triads: The screen is coated with microscopic groupings of Red, Green, and Blue (RGB) dots.
  • Three Electron Guns: Each gun is modulated independently to control the intensity of one primary color.
  • The Shadow Mask: A metal plate with microscopic holes ensures the beam from each gun only strikes its corresponding color phosphor.
  • Color Blending: The human eye blends these sub-pixels to perceive a single, unified color shade.

Limitations of CRT Technology

  • Bulk and Weight: Large tubes made monitors heavy and bulky.
  • Power Consumption: High voltage requirements generated significant heat and consumed high power.
  • Geometric Distortion: Spherical glass faces caused image warping along the outer corners.