post Simple, heavily commented C# raytracer

Filed under Code by Iain (5:26 pm, August 25th, 2009)

Here’s a little educational recursive raytracer I wrote recently to teach a friend the fundamentals.

simpleray

Read on for full source download.

This simple C# raytracer supports spheres and planes with diffuse and specular shading and reflections. I stopped at that point to keep this as a useful tool for learning the basics.

Only trig and basic vector maths is used, with no matrices, and the maths is kept simple. Almost every line is commented, so if you like learning from source this could be for you.

Download source and binary (20Kb RAR file)

1 Comment »

  1. [...] on from my simple C# raytracer, here’s the same codebase adapted as a [...]

    Pingback by c o l d c i t y » Simple, educational C# Pathtracer — Nov 7 2009 @ 7:42 pm

Leave a comment

ruld rurd
© 2001-2009 Iain Craig RSS Feeds Entries | Comments