1. CS225
    1. OOP
      1. Inheritance
      2. R-Value References
    2. Misc Notes
    3. Size/Offsets of Structs/Classes
    4. Week 4
  2. CS200
    1. Introduction
    2. Scan Conversion
    3. Quiz 01
  3. GAM200
    1. Notes
  4. CS180
    1. Introduction
    2. Memory
    3. ELF Format
    4. History of Computers
    5. Stuff to Research
    6. Quiz To-Do
    7. OS Architectures
    8. Week 3
    9. Week 4
    10. Week 5
    11. Week 6 (Threads)

Scan Conversion

Scan Conversion


Culling is removing a certain part of the image (for example, if the camera is only showing a certain section).

Clipping is used to obtain the VISIBLE part of a certain object... The rest will be clipped out.

Viewport transform refers to the final “piece of paper” on which the image will be created. It might be smaller or bigger.

Scan Conversion is used to figure out which pixels to “light up” - rasterization.

A framebuffer (frame buffer, or sometimes framestore) is a portion of RAM containing a bitmap that is used to refresh a video display from a memory buffer containing a complete frame of data. You flush it to “refresh” it.


The deflection plates are used in order to get the position of the light. The one gun is used for the entire screen.

Horizontal lines are called scanlines, Vertical lines are called columns

IMPORTANT - the coordinate system for the screen flips te y axis from the normal - downwards is positive!

The top left is also SOMETIMES 0,0 and SOMETIMES -0.5,-0.5


Width x Height
Columns x Rows
Don't get confused!


Graphical images are created by creating discrete data from continuous data from a signal.


Integers are normally used for graphics because in floating point the inaccuracy is not linear. You can only represent certain numbers from 0-1, and the number of numbers you can represent from 1-2 are different.


Supersampling is getting the average of the colors for a certain pixel in memory and showing that color for that pixel. (16 parts) (expensive)

Multisampling, also known as multisample antialiasing (MSAA), is one method for achieving full-screen antialiasing (FSAA). With multisampling, each pixel at the edge of a polygon is sampled multiple times. For each sample-pass, a slight offset is applied to all screen coordinates. (Wikipedia) (chooses less parts and is less intensive but is less accurate)


Window to the world =/= Viewport
Window to the world is which part of the world you're viewing. (For example, a smaller window will allow for zoom)
The viewport is what part of the actual screen is drawn on.


Normalized for graphics = -1 to +1



It's the same slope in both. Remember to flip the y.


Prasanna's solution:



When the slope of the line is below 1, sample ALONG the x axis, if the slope of the line is above 1, sample ALONG the y axis.


THIS IS WRONG!! m should not always be incrementing!! If delta y is negative, m should be negative.


For a line whhere the slope is less than 1:
The next square chosen is to east or northeast.

Bresenham's Formula