WebGL Ray Tracer

Source Code

Sonat Uzun and I created an interative, procedurally generated ray tracer with WebGL. It can display triangles, spheres and cubes.

alt text

It has numerous options. Randomized trace order randomizes pixel rendering order. This results in blurry images instead of slow scans. Use texture creates the spheres with a checkers pattern texture. Moving spheres makes the spheres move in a random direction. Add options create a random sized/colored shape in a random location on screen. Cuf-off depth changes how many ray reflections will be calculated recursively. Reflection changes the new objects’ reflectiviy and transparency changes their transparency. Background color can be also changed.

Users can also move around in the scene by using WASD buttons and mouse to look at the objects from different perspectives.