Scene Rendering

Purpose: grad-level Computer Science graphics course, Purdue University
Language and Implemented APIs: C++ with OpenGL , GLUT  and GLUI

Description: A made-from-scratch 3D scene renderer that covers all the basics of the graphics pipeline using OpenGL, including transformation, texturing, rasterization and lighting. Scene data is loaded from a user-specified text file. Excruciatingly detailed (but a little difficult) controls are provided for the camera viewpoint, 8 lights (the max in OpenGL), and global reflection and shading parameters.

Notes:
  • When you first load a scene, you'll be smack in the middle of it; you may want to back up a little to get a good look. To do so, just increase the camera position's Z value.

  • Odd quirk: depending on your hardware, OpenGL's diffuse/specular lighting components may flicker or fail. This little guy is definitely a work in progress, but he can do some pretty fun things!

  • Fun trick  film noir effect: turn on 'Full Lighting', and use one light with a maxed out Diffuse component and no Ambient or Specular light. Rotate the light around to see the starkly lit scene fade into black.

Download for Windows Vista/7  
Scene Rendering: simple test box scene A simple test box with one textured face and three lights Scene Rendering: crazy pipe scene Crazy pipe scene, displaying the effect of surface angle on lighting
(model provided)
Scene Rendering: quaint little house livingroom scene A quaint house scene, complete with ugly furniture
(model provided)
Scene Rendering: quaint little house, bathroom scene 'And we're walkin, we're walkin... to your right, you'll see a wonderf--'
'Aaahh! get out of my bathroom!'
(model provided)

Cubic Bezier Curve Creator

Purpose: Computer Science course in graphics, Purdue University
Language and Implemented APIs: C++ with OpenGL , GLUT  and GLUI

Description: Draws nice little swoopy contours based on the equations of Bézier Curves . Using the parametric form, it 'walks' along the line little by little, following the influences of the control cage. The interface works much like common vector drawing programs such as Adobe Illustrator; create and reposition points, and drag tangent lines out to form the curve.

Notes:
  • Start by creating some control points.
  • To create curve tangents, use 'Set Tangents' mode and click and drag on the control points.

  • It's easier to adjust your existing tangents in the last mode, 'Move Control Points;' 'Set Tangents' is just for creating new ones.

Download for Windows Vista/7  
Cubic Bezier Curve Creator says, 'Hey!' Cubic Bezier Curve Creator wants to be your friend :) Cubic Bezier Curve Creator: before the Tangents are set Sad Control Points, before the Tangents are set :( Cubic Bezier Curve Creator: with Tangents visible Happy Control Points with Tangents visible :D Cubic Bezier Curve Creator: with the full Control Cage visible With the full Control Cage visible

Particle Physics Engine

Purpose: Computer Science course in graphics, Purdue University
Language and Implemented APIs: C++ with OpenGL , GLUT  and GLUI

Description: This is so fun to play with! It models simple particles as they collide and bounce, based on Newton's Laws of Motion . The particles are launched in random trajectories out of a cone in the middle of the scene. Each time particles collide with each other or a wall, they flash red for an instant. Seems simple, right? Try adjusting the physics in 7 different ways, and things start to get interesting. You can adjust the particle size, how they are launched, and the scene's gravity. But my favorite is adjusting the collision elasticity  (the amount of energy lost in each bounce), with results ranging from ricocheting golf balls to sticky blobs of play-dough.

Notes:
  • Don't mind the revolving light source floating in the sky. He's just there to give the stuff pretty shadows.

  • If too many particles build up in the scene (or float off into outer space!) things might start to get laggy. Just hit the 'Clear' button if that happens.

Download for Windows Vista/7  
Particle Physics Engine: With plain old default options The scene, with plain old default options Particle Physics Engine: The Firehose Trick The Firehose: a continuous stream that follows your every move
Particles: Rate = Max, Size = Max, Randomness = Min
Gravity: Direction = Camera Down, Scale = 2
Energy Loss = .1, Collision = Off
Click and drag to move the camera around
Particle Physics Engine: The Tower Trick The Tower: a popping corn-cob explodes into life
Particles: Rate = Max, Size = Max, Randomness = Min
Gravity: Direction = World Down, Scale = .8
Turn collision off, click Clear, and then wait a few seconds before turning it back on. Vary the Energy Loss value for gooey/explosive effects!
Particle Physics Engine: The Spout Trick The Spout: random collision events cause chain reactions to shoot through the column
Particles: Rate = 19.75, Size = .05, Randomness = Min
Gravity: Direction = World Down, Scale = 0
Energy Loss = .1, Collision = On
If a coherent stream won't reform, just click Clear. If you're lucky, you can get two distinct jets to form for a moment. Try Size = ~.0475 and Gravity Scale = ~.01 to light the fuse!
Particle Physics Engine: Mitosis Trick, Part 1 Particle Physics Engine: Mitosis Trick, Part 2 Particle Physics Engine: Mitosis Trick, Part 3 Particle Physics Engine: Mitosis Trick, Part 4 Particle Physics Engine: Mitosis Trick, Part 5 Particle Physics Engine: Mitosis Trick, Part 6
Mitosis: in less than a second, a condensed mass bubbles up like multiplying bacteria
Rate = Max, Size = Max, Gravity Scale = .8, Energy Loss = 1. Wait for a big pile to form, then turn off collision, and turn it back on again. Super gross!
Particle Physics Engine: Slow-Motion Explosion Trick, Part 1 Particle Physics Engine: Slow-Motion Explosion Trick, Part 2 Particle Physics Engine: Slow-Motion Explosion Trick, Part 3 Particle Physics Engine: Slow-Motion Explosion Trick, Part 4 Particle Physics Engine: Slow-Motion Explosion Trick, Part 5 Particle Physics Engine: Slow-Motion Explosion Trick, Part 6
Slow-Motion Explosion: watch a ball of particles struggle to reach critical mass and blast away from each other
Size = Max, Gravity Scale = 0, Energy Loss > .1. It seems like it won't gain enough momentum if Energy Loss > ~.25. Try = 2 for a weird nuclear fusion effect!
preloaded image preloaded image