/* Google Analytics --------------- */ /* ----------------------------- */

-----> PLAY SWARDTRIS NOW! <-----

Saturday, November 26, 2005

Java Ray Tracer - Screenshot

I spent a good chunk of time today working on my new Java ray tracer. I'm thinking I might post some source code, but for now a screenshot will have to suffice; it's late and I have to get to bed.

I must say, so far this ray tracer translation process has been enlightening. I've lately been reading this book called Code Complete. One suggestion the author makes is to "program into your language" rather than "programming in your language." The distinction is a subtle one, but the way I understand it, he means to say to solve problems in your head in rather general terms, then only translate them into Java or C++ or SmallTalk or what have you when it comes time to actually do the coding.

In this process of translating my code from C++ to Java, I've found several spots where I was clearly programming in C++ rather than programming into it. Some of it really didn't translate into Java at all, so I've had to restructure it a bit.

So far it's been fun and educational. Just what I wanted!


Java Ray Tracer

I decided I would try my hand at porting my C++ ray tracer to Java. I have a few reasons for wanting to do this. Let me list them in no particular order: 1) You'll get to see it in action when I make a Java applet out of it, 2) I'm interested in comparing the performance between my C++ and my Java versions, and 3) Programming is pretty much always fun.

I've begun some of the groundwork and I'll keep you posted as I make significant progress.