This is a collection of links to my project reports created for CS184: Computer Graphics that I took in Spring 2019 at UC Berkeley.

I implemented rasterization and other features for a simple vector graphics renderer. At a high-level, the program converts an image described in a vector format (in this case, points, lines, and triangles) into a pixel grid for a computer display. The program takes in modified SVG (Scalable Vector Graphics) files and renders them in an interactive viewer with support for antialiasing via supersampling, hierarchical transforms, and texture mapping, including different pixel sampling and level sampling options.

I implemented a variety of widely-used techniques for geometric modeling. I began with de Casteljauâ€™s algorithm to draw Bezier curves and surfaces. Then I added support for various half-edge mesh manipulations, and finally loop subdivision. The end result is a tool capable of loading and editing a basic COLLADA mesh file, which is an interchange file format for interactive 3D applications.

I implemented the core routines of a path tracing rendering program. Path tracing is a powerful physically-based rendering technique that simulates the behavior of light in order to produce accurate global illumination and thus photorealistic images.

Given a geometric representation of a 3D scene and a camera position, path tracing works by casting rays through each pixel in the output image and averaging their values to calculate the final color of each pixel. The values of rays are a sum of direct and indirect lighting; whenever a ray intersects a surface, the direct lighting of that point is computed from casting shadow ray(s) to the light sources in the scene. Indirect lighting is computed by recursively casting a new ray from that hit point in a random direction.

I extended my pathtracer to support more complicated materials, including glass and mirrors, and added environment lighting and depth of field effects. Whereas part 1 was about setting up the core pathtracing infrastructure, part 2 was about modeling complex surfaces to produce truly striking results.

I implemented a real-time cloth simulation using a mass-spring model. I began with building the data structures to represent the cloth as a deformable mesh of point masses connected by springs. Then I added force modeling and other physical constraints combined with numerical integration over time to simulate movement. I then added code to enforce collisions with external objects as well as self-collisions. Finally, I implemented a variety of shaders to improve the appearance of the cloth.

© Andrew Campbell. All Rights Reserved.