This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Smalltalk ray tracing
Feed Title: David Buck - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/buck-rss.xml
Feed Description: Smalltalk can do that
As some of you may know, I wrote a ray tracer many years ago (1986) called DKBTrace. That ray tracer became the basis of POV-Ray. The original DKBTrace (and even the modern POV-Ray) benefited from some object oriented ideas taken from Smalltalk which I had learned even earlier (1984).
I recently decided to write a very simple Smalltalk raytracer to demonstrate the basic techniques. Even though Smalltalk isn't terribly fast at floating point calculations, this raytracer only runs about 4 times slower than POV-Ray (which isn't bad considering the fact that POV-Ray is heavily optimized in C).
The Smalltalk ray tracer has nowhere near the capabilities of POV-Ray - if you want to do serious raytracing, use POV-Ray. For learning how raytracing works, however, it's a good example.
You can get it from the Cincom public store repository under the bundle "Ray Tracing" or from my web site. If you change the code, let me know what you've done and I'll upload it for others to share.