rterl
A Simple Erlang Raytracer
I started this project to "get into" functional programming. It's a basic ray tracer and was the first thing I developed in Erlang. It relies on a python script to actually create the image file (due to the pain of getting an environment set up to do so from Erlang), but I think overall it works pretty well. To run it, you need Erlang and python with PIL installed. If any Erlang masters are out there and see some areas of improvement in this app, please let me know! I am eager to learn about better ways of doing things.
A few things I can improve but haven't "gotten around to":
- Remove the need for the python script to build the PNG.
- Split up the processing load more intelligently: right now a new Erlang process is spawned for every single pixel. This is probably non-optimal; it would probably be better to come up with a partitioning scheme.
- The projection coordinate system is kind of lazy.
- Implement different kinds of objects and textures!
- The framework for colored lights is there, but it's not actually implemented.
- Only non-attenuated point lights are currently implemented. Directional, spot and attenuated lights are not but would probably be pretty easy to do.
Feel free to use this for anything you'd like. It's licensed under the BSD License.
Back to the Projects Page © 2007 Ryan Crum