Showing posts with label Graphics. Show all posts
Showing posts with label Graphics. Show all posts

Tuesday, 23 June 2009

Ray Tracer Progress

Here is the image file that I generated using the ray tracer that I have written in C#.

The ray tracer handles difuse colour of objects, lighting colours and uses the Blinn Phong method of calculating specular shading. It super-samples each pixel 16 times in order to produce a very graduated anti-alias effect.

Unfortunately at the moment the only objects that are supported in the scene are spheres. When I get some time I will add code for planes.

If my C++ skills improve I may try a C++ version to compare performance. If I manage it I'll let you know how I get on.

Wednesday, 10 June 2009

Write a Ray Tracer - For Fun!

If you have a couple of hours to waste over a few evenings what better fun could you have than to have a go at writing a ray tracer? Actually I can think of several things that might be more fun, but if you want to give it a go I have found a nice tutorial here: http://www.codermind.com/articles/Raytracer-in-C++-Introduction-What-is-ray-tracing.html.

I'm working through it myself, although I'm writing c# code. I'll let you know how I get on.