Computer Graphics

Here is some graphics-related stuff that I did...


Hail Storm
This is a simulation of hail storm and snow. Collision detection between the Microsoft Windows bicycle seat mesh and the snowflakes is performed by using Axis-Aligned Bounding Box trees. Since each box in the AABB tree is specified by its center and extent, performing collision detection is very fast and is accomplished by a sweep algorithm. The code is capable of displaying AABB tree as well, as show in the screenshot below.
When a stone hits the seat, it deforms it and then bounces back under seat's restitution force. The hail storm is emulated using a finite number of particles which are recycled when they reach the bottom of the bounding box, i.e. move off-screen. The simulation is using Green's Function to keep track of all particles. Forces are calculated using Barycentric force distribution.


Constrained Particle Systems
Physically-based modeling of a chain.
The project is implemented via constrained particle dynamics using Lagrange multipliers. The system is also damped with velocity damping and stabilized with Baumgarte stabilization equations. First is just a swinging chain. In the second animation, one end of the chain is nailed to the top of the ring, whereas the other end is constrained to slide on the ring.
There is also a graph of error with stabilization - notice how the system quickly recovers from disturbances.

Some older stuff...

Ray Tracer
This is the final project. These pictures below are generated by my ray tracer. It supports reflection, refraction, texture maps, transparency maps, and more. The code itself is just 900 lines of very highly object-oriented C++ code.
The ray tracer models light rays - in this implementation we trace the rays in reverse - from the viewer to obstacles on the scene. Texture mapping on triangles is done via barycentric interpolation and spheres use simple spherical coordinate mapping. After all intersections are computed, the lighting is applied using a bit modified Phong illumination model. The ray tracer also computes recursive reflections and refractions. To achieve higher quality of images the ray tracer uses 3x3 super sampling.

First picture is one of the earliest images I made - it shows a sea with many reflections.
Second shows a world enclosed in mirror box, hence infinitely many reflections.
Third picture demonstrates refraction.
Fourth is the animation of an exploding sphere.
Notice the reflections inside the pieces of the sphere and shadows on the floor.

I think this is one the coolest programs I ever wrote - make sure to see the Exploding Sphere animation :)

Jello Cube
For this assignment we had to model a cube made out of jello. The jello is modeled using many springs, namely structural, shear, and bend springs. Every step the simulation is recomputed for all springs and every 5 steps the resulting picture is outputted to the screen.
I also implemented a transparent texture-mapped cube, as well as collisions between the jello and the sphere and the cylinders. Also, this demo is interactive - a user can move the sphere with a mouse and push the jello around the cube :)
The picture shows jello deformations during collision with the sphere.
Rollercoaster
This time we had to create a rollercoaster using Catmull-Rom splines.
We also had to implement the sky, ground, etc. Look at the tunnel and trees.
The user can "ride" this rollercoaster or view it from any angle.

Height Fields
The program creates a height map from an arbitrary given image.
Of course I needed something extra, so I added four little jumping robots with NVIDIA logo on top of them :)
Continuing the theme, the picture shows a height map of NVIDIA's logo.

Copyright © 2002-2003 by Greg Reshko.