Line Rasterization / Triangle Rasterization / Convex Hull Rasterization

Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=AI872qS3x5Y



Duration: 47:48
40 views
2


Rasterization means putting pixels on the screen where they belong. Line rasterization is pretty easy to do badly, but the simple algorithm I provided you as starting code as trouble dealing with steep lines and does no anti-aliasing, and doesn't work if the line goes right to left, etc. You'll need to fix that to get credit on the homework.

Moving on from line rasterization, well, you can rasterize the wireframe of a triangle pretty easily (just draw three lines) and then from there we moved on to talking about filling a triangle with pixels. This involves a clever but still pretty simple algorithm that splits a triangle into a flat-top and a flat-bottom triangle (unless it's already a flat-top or flat-bottom) and then doing a little middle school algebra to figure out the starting and ending points on each row to fill.

Finally, we talked about the uses of cross product, how to fill a convex hull, and the BSP acceleration structure.