Triangle Scan Converter
My implementation of the edge-walking algorithm scans each line between
the minimum and maximum values of y in the triangle and fills in the
pixels between the x-intersections of the current value of y and the
edges. Color interpolation was implemented using plane equations.
A
significant improvement in performance was achieved by incrementally
computing red, green, blue and alpha values instead of calculating the
entire equation A*x+B*y+C for every pixel.
Source Code:
Edge.java
EdgeList.java
Triangle.java
Applets:
Hexcone
Teapot
Cow
My Triangles