Program The rantings of a lunatic Scientist

Posts marked as Graphics


Java Ray Tracer – Just a test

Graphics Java

A few months ago, inspired by our Graphics Course, I decided to write a Ray Tracer. I had written one once before, in C# of all things, the summer before starting university. But it was crude and took 3 minutes to render one sphere, incorrectly too… I knew I could do better. Here is the result of 3 days worth of playing around with Java between lectures.

I didn’t quite get triangles working at the time. It was an issue to do with Java’s implementation of floats not having enough precision. My next Ray Tracer will be in C++ so that shouldn’t be a problem. (I know… A bad programmer always blames his tools…)

Here are some other choice renders…