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.

C++ Tutorials and Exercises

I think that it is good for all programmers to have an idea of programming with C and C++, mainly due to the number of platforms that you can write code for using them.

For reasons that are completely unknown to me I have decided to have another go at writing software for my Series 60 mobile phone. I'd rather write software for it in Java as it is much faster to code but some of the phone's feature just simply aren't available in Java applications.

For this reason I want to improve my extremely patchy knowledge of C and C++ so I decided to look on the internet for some tutorials and exercises to help me. I've found the following useful:



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.