E26 / CS40 Portfolio Gallery

Alex Benn

Overview

This page contains a comprehensive gallery of Alex Benn's work, much of which was created using code written cooperatively with my lab partner, Andrew Frampton.

Images


Figure 1: Mandelbrot Set

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: Circle and Line Drawing Algorithms

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


Figure 3: Filled Circle Drawing Algorithm


Figure 4: Demonstration of Polylines, Plus Filled Circles, Ellipses, and Polygons

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: Animation Demonstrating View Pipeline

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.


Figure 6: Modeling

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.


Figure 7: 3D Viewing Pipeline

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: 3D Modeling

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: Z-buffering and Spheres

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.


Figure 10: Shading

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.

Back to Alex and Andrew's other labs