Alex Benn

Figure 1 shows the Mandelbrot set, a fractal. This image demonstrates the ability to manipulate and save images, while generating something rather pretty in the process.

Figure 2 demonstrates circle, ellipse, and line drawing algorithms.


Figures 3 and 4 demonstrate our scanfill algorithms for polygons, circles, and ellipses. We used these scanfill algorithms in many of the following labs.

Figure 5 shows the power of the view transformation pipeline, wherein objects in a scene are transformed using a series of linear transformations, which are stored as matrices. Each point of each element is transformed first by the Global Transformation Matrix (GTM), which applies transformations about the "world" coordinates. Then, the resulting points are transformed again by the View Transformation Matrix (VTM) to put them into screen coordinates. In this way, elements can be easily manipulated in large groups using only a for loop.

Modeling makes it easy to manipulate large groups of primitives together, by organizing them into a hierarchical structure. A model may be composed of various lines and polygons, which are then transformed according to the current Local Transformation Matrix (LTM), but may also be composed of sub-models, such as an arm on a robot. In this way, an entire fleet of Starships Enterprise may be manipulated as a group, rather than directly applying a transformation to each element of each ship and manually copying these elements on a per-ship basis.

Here, we move into three dimensions. Perspective is added by scaling the homogeneous coordinate by the inverse z-value, and then dividing through by this value.

Figure 8 demonstrates the power of the modeling system when moved into 3D. The figures drawn are 3D cubes made up of triangles, which are then placed into a single model. This model can then be arbitrarily rotated or translated.

Figure 9 shows how the z-buffer algorithm can easily be used to clip polygons which are obscured by other polygons. By storing the z-value of the frontmost polygon at each pixel, the algorithm can decide whether a polygon should be drawn or not. This figure shows a sphere intersecting with a cube.

A demonstration of the shading algorithm can be seen in Figure 10. Body color, surface color, light color, surface normal, light angle and view angle are all used to calculate the color of the surface of the sphere at each vertex. Color values are then interpolated pixel-by-pixel by the polygon shading algorithm.