My Octopress Blog

A blogging framework for hackers.

Raytracer With Anti-aliasing and Reflection

For Graphics II, we had to implement a raytracer, and then add anti-aliasing and a feature of our choice. I selected mirrored surfaces.

First, anti-aliasing. Here are a few pictures of the same image rendered with a different number of passes to change the smoothness.

[caption id=”attachment459” align=”aligncenter” width=”300” caption=”Using one pass”]Using one pass[/caption] [caption id=”attachment460” align=”aligncenter” width=”300” caption=”Using 5 passes.”]Using 5 passes.[/caption] [caption id=”attachment_461” align=”aligncenter” width=”300” caption=”Using 50 passes.”]Using 50 passes.[/caption]

And lastly, here’s a scene of several spheres, some of which are reflective. [caption id=”attachment462” align=”aligncenter” width=”300” caption=”A set of spheres, some of which are mirror-like.”]A set of spheres, some of which are mirror-like.[/caption] [caption id=”attachment467” align=”aligncenter” width=”300” caption=”A reflective sphere next to some triangles.”]A reflective sphere next to some triangles.[/caption] [caption id=”attachment469” align=”aligncenter” width=”300” caption=”A mirrored sphere in the center of four other sphere.”]A mirrored sphere in the center of four other sphere.[/caption] [caption id=”attachment470” align=”aligncenter” width=”300” caption=”More spheres!”]More spheres![/caption]