Raycast & gif10.08.15 · go
Computer graphics programming is hard. Like, really hard. At minimum, you have to account for models, cameras, lights, and the scene. And that’s before you can even think about textures, movement, shaders, or interaction. No matter what software package you’re using, there’s a steep learning curve.
This week, I came across Guillermo Estrada’s command line raycaster, Rayito. It’s written in Go and uses flat text files to define and render 3D scenes. Here’s an example from the repo and the text file with all the scene parameters:
Admittedly, the documentation isn’t great and it looks like the only supported geometry is a sphere, but Rayito isn’t a commercial package, it’s fast, renders crisply, and it’ll will help you understand the complexity of 3D graphics.
I took advantage of Rayito’s speed to create a gif, by progressively adjusting the position of the lights and looping the frames together with ImageMagick: