Peter M Cottle

Welcome!

Please use the Arrow keys or Swipe Gestures for Navigation

▼

Photography

Origins

I started photography at the end of my senior year in order to capture my favorite places around UC San Diego. Since then I've joined the Blue and Gold Yearbook team at Berkeley in order to photograph campus events, and I'm also an active member of the UCSD Photography club. My favorite photography is architecture, macro, and landscape.

Work

In addition to the photos on this website, I also have other work available at my Flickr Photostream. I also have included some of my favorite photos below

Contact

Code

Liquid Graph

Liquid Graph

Liquid Graph was the implementation of (what will most likely become) my Master's Thesis at UC Berkeley. To summarize in Layman's terms, it rolls a ball out of a maze.

To summarize in more scientific terms, it performs an interesting hybrid algorithm between Artifical Intelligence and Computational Geometry to determine a series of rotations to roll a small particle out of a 2D polygonal mesh. It uses parametric equations for all of the geometric math and search space exploration, so the computational time is quite efficient (in contrast to using something like Euler integration). The AI search exploration step corresponds to tracing out samples from the current concave vertex -- this search is animated on the screen as the algorith runs (resulting in a nice visual result).

Eventually I'll write up a formal paper for this algorithm, but for now the Github source will have to suffice. I also highly recommend checking out the demo of the algorithm running!

Genetic GPU

Genetic GPU

Genetic GPU was a really fun final project I completed for ME202 at UC Berkeley. It essentially performs Non-Convex Optimization on the GPU with WebGL by using some clever shader hacks. It can sample from any N-Dimensional space (despite only having a 2D grid of vertices) and optimizes most surfaces quite quickly. It runs about 55x faster than Matlab without extra optimizations (and while drawing the surface for the user).

I also added realtime clustering support -- users can send the link to a friend and automatically join a "computational room" where the search space is divided up and global minimums are compared across workers. I used the excellent Now.JS for this part of the project. Between the realtime clustering and the parallel nature of GPU work, I titled this project "Massively Parallel Genetic Algorithms."

I completed a writeup on the algorithm for the class; it's from a very high level but should give an idea of the strategies used perform such rapid optimization. The Github Source and a link to the application are below as well

Friend Mapper

Friend Mapper

In order to learn WebGl and the Facebook graph API over winter break, I wanted to tackle a project that combined them together into a unique application experience. With so many diverse and interesting personal stories on Facebook, it can be hard to really appreciate the beauty of the diverse collection of friends we have. I sought out to visualize these geographic relationships (both in present and in the past) and display them interactively.

Implementation

There was a sizeable amount to learn for this project; I had to dive into the WebGL shader language, the intricacies of the Facebook graph API, GPU data buffering, off-frame rendering, and several other complex ideas I had never approached before. There was also a considerable design challenge to represent this rich graph of relationships in memory. Because all the data from the Facebook graph arrives asychronously, the graph essentially has to be constructed in any order at any time. Multiply queries are usually required to resolve the GPS coordinates of a particular place, so several layers of asychronous requests have to be made (and cascaded) as data is available or not. After a large amount of abstraction, I obtained a pretty robust system that all operates independently.

Links to the Application, the Github page, and a video showing the application are below:

CS 184 - Computer Graphics

Ray Tracer

The best assignment (by far) for CS 184 was programming a complete ray tracer in C++. It was incredibly exciting (and sometimes intimidating) to build everything from the ground up; ray-sphere intersection tests, transformation matrices, homogenous coordinates, camera locations, and everything else was coded from scratch. At the end of the assignment though, I had a piece of software that I was really proud of.

After getting the basics down, I went the extra mile and implemented some other features. I got soft-shadows working (as well as non-linear projection). To make some nice final renders, I wrote a python script to generate interesting scene files.