1.1 What is Computer Graphics?
The Concept: Imagine you have a list of numbers (data) and you want to turn them into a painting (image). Computer Graphics is the Tool (brush) and Process (painting techniques) that makes this happen.- Core Definition: The art of manipulating visual images using computers. Converting data to visual form.
- Interactive Graphics: When the user can "talk back" to the image (e.g., clicking, rotating a 3D model). It's a two-way street: Input $\leftrightarrow$ Image.
Common Input Devices
Tools used to give commands to the computer:
- Mouse & Keyboard: Standard interaction.
- Light Pen: Pointing directly on screen.
- Graphic Tablet (Digitizer): For precise drawing.
- Joystick/Trackball: For gaming and navigation.
The Graphics Pipeline (The Assembly Line)
Before a 3D shape appears on your 2D screen, it goes through a factory process:
- Modeling: Creating the object (wireframe).
- Transformation: Moving/Rotating it in the world.
- Projection: Squashing 3D to 2D (like a shadow).
- Clipping: Cutting off parts outside the camera view.
- Rasterization: Turning shapes into pixels.
mindmap
root((The 3D-to-2D Journey))
1. Build It
Modeling
Wireframes
2. Place It
Transformation
Rotate/Move in World
3. Flatten It
Projection
3D to 2D Shadow
4. Crop It
Clipping
Remove parts outside Camera
5. Paint It
Rasterization
Vector Shapes to Pixels
1.2 Display Hardware: How images are shown
Raster vs. Random Scan
The two main ways to draw on a screen. Think of it as a Printer vs. a Human Hand.
| Feature | Raster Scan (The TV) | Random Scan (The Plotter) |
|---|---|---|
| Analogy | "The Paintbrush approach": It blindly paints the whole wall, row by row, left to right, top to bottom. It doesn't care if there's a picture there or not. | "The Pen approach": It only moves the pen to where lines need to be drawn. If the screen is empty, the pen sits still. |
| Image Type | Grid of Pixels (Can look jagged/pixelated). | Smooth mathematical lines (Vectors). |
| Memory | Needs a Frame Buffer (stores every single pixel's color). | Needs a Display List (stores commands like "Draw Line A to B"). |
| Cost | Cheaper (Standard monitors). | Expensive (Specialized engineering tools). |
Special Hardware: DVST (Direct View Storage Tube)
Hidden Gem: Exams ask this as a short note. Think of it as "Permanent Ink".Concept: An old-school display that stores the picture physically on the screen using a special mesh. It doesn't need to be constantly redrawn.
- How it works:
- Writing Gun: Draws the image pattern (like a pencil).
- Flood Gun: Floods the screen with electrons to keep the drawn pattern glowing.
- Pros: No flickering, very high resolution.
- Cons: No colors. You can't erase just one line; you have to wipe the whole screen (like an Etch-A-Sketch).
Phosphor Persistence
Definition: How long the screen "glows" after the electron beam moves away.
- High Persistence: Glows for a long time. Good for reading text (no flicker). Bad for animation (ghosting/blur).
- Low Persistence: Fades instantly. Good for fast games. Needs high refresh rate to avoid flicker.
mindmap
root((Drawing Engines))
Raster Scan
The Painter
Whole Screen Grid
Needs FrameBuffer
Good for Photos
Random Scan
The Pen
Draws Lines Only
Smooth Curves
No Jaggies
DVST
Permanent Ink
Examples: Radar
No Refresh Loop
1.3 Important Terms & Math
These are guaranteed 2-mark questions.
1. Resolution & Aspect Ratio
- Resolution: The total number of pixels. ($Width \times Height$). E.g., $1920 \times 1080$.
- Aspect Ratio: The shape of the screen ($Width : Height$). Standard TV is 16:9; Old TV is 4:3.
- Refresh Rate: How many times the screen is redrawn per second (Hz). Standard is 60Hz.
- Frame Time: Time to scan one complete screen.
$$Frame~Time = \frac{1}{Refresh~Rate}$$
2. Dot Clock Frequency
Analogy: If the "Refresh Rate" is how many pages you read per minute, "Dot Clock" is how many words you read per minute.It is the speed at which the electron beam must process individual dots.
3. Interlacing
Concept: A technique to reduce flicker and bandwidth.
- Instead of drawing all lines (1, 2, 3, 4...) in one go, the screen draws Odd lines (1, 3, 5...) first, then Even lines (2, 4, 6...).
- This cheats the eye into seeing a higher refresh rate.
3. Frame Buffer Calculation (Numerical)
Problem: How much memory (RAM) do you need to store one image?
- Step 1: Multiply Width $\times$ Height.
- Step 2: Multiply by Color Depth (e.g., 8-bit, 16-bit, 24-bit).
- Step 3: Divide by 8 to get Bytes. Divide by 1024 to get KB.
$640 \times 480 \times 8 = 2,457,600$ bits.
$\div 8 = 307,200$ Bytes $\approx 300$ KB.
mindmap
root((Display Math))
Space
Resolution (Detail)
W x H
Aspect Ratio (Shape)
W / H
Time
Refresh Rate (Hz)
Frame Time (1/Hz)
Dot Clock (Px * Hz)
Cost
FrameBuffer Memory
Res * ColorDepth
Bandwidth
Dot Clock Speed
1.4 Aliasing & Antialiasing
(From the "Hard Questions" section)
The Problem: Aliasing (The "Jaggies")
Because screens are grids of squares (pixels), you can't draw a perfect diagonal line. It looks like a staircase. This stair-step effect is called Aliasing.
The Solution: Antialiasing
Techniques to trick the eye into seeing a smooth line.
- How it works: Instead of coloring a pixel 100% Black or 100% White, we use Greys on the edges.
- Result: The fuzzy edge looks smooth from a distance.
mindmap
root((The Jaggies))
Cause
Square Pixels
Diagonal Lines
Low Resolution
Effect
Staircase Look
Loss of Detail
Cure (Antialiasing)
Blur Overlay
Grey Edges
Super Sampling