Hacker News new | past | comments | ask | show | jobs | submit login
Scalar Ray-Tracer in 7 Lines of k (nsl.com)
6 points by tosh on Jan 16, 2020 | hide | past | favorite | 3 comments



For the curious without access to a k2/k3 interpreter, here's what this renderer produces (converted to PNG for convenience):

https://i.imgur.com/OOdW5Dm.png

If you change that last line to q:R[3]128 you'll get

https://i.imgur.com/3bDmUhE.png

The high-res version takes me around 6 seconds to render.


See also: Arthur's version. http://nsl.com/k/ray/raya.k


HN prevents Arthur's from being resubmit to the site for some reason, but here's a 40 comment discussion on it from 2009:

https://news.ycombinator.com/item?id=944559




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: