r/tinycode • u/Yeknom • Jan 09 '13
Ray tracer in 140 SLOC of python with picture
I have be playing with raytracing for a while now and wanted to write something that was simple to understand but produced a cool effect. There is defiantly many more features that could be added, like reflections and multiple light sources, but I wanted to stay as minimalistic possible.
Source: http://pastebin.com/F8f5GHJZ
Image: http://imgur.com/prPGk
70
Upvotes
2
u/[deleted] Jan 10 '13
Weird, IO is super costly on my machine.