Viewer3D

Viewer3D is my first OpenGL program (actually it's a port of a Pascal "putpixel" raytracer I wrote in highschool...what's wrong with Pascal??). Basically it's a raytracer that supports balls (spheres for the mathematically inclined) and planes.

It does not support any ray acceleration data structure so use it with caution: too many spheres could potentially burn your CPUs!

To implement lighting I used a basic Phong shading model, that supports ambient, diffuse and specular components.

Viewer3D was developed in plain C and OpenGL. The gui was built using the Glut toolkit.

Features

  • Spheres intersections
  • Planes intersections
  • Basic phong shading

Commands

Action Shortcut
r Reset scene
v Raytrace toggle
o World bounds
b Object bounds
+ Increase plane scaling
- Decrease plane scaling
0-9 Light toggle
LMB Rotate camera
Shift + LMB Zoom camera
Ctrl + MMB Pan camera

Downloads

Pics

Scene 1:

Scene 2:



Who:

Code dump:

Wish lists:

  • My Amazon.com Wish List