a simple raytracer

Raytracers are fun, maybe you want to check out my quick experiment: https://gist.github.com/944687. It’s called fray (fast ray – although it’s not that fast) and is capable of rendering planes and spheres. The raytracer currently calculates lighting (diffuse and specular shading) and reflections and will be extended to do refractions. It could be optimized by implementing a kd-tree to subdevide the scene and only render the sub-parts with objects in them. But meh, maybe at some point.

This is the output calculated from the test scene in main.cpp:

test scene

Advertisements

One thought on “a simple raytracer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s