Live data from Hacker News

Literate raytracer: a simple implementation of raytracing in Javascript

tmcw.github.io

1–10 of 26 posts

Re: Literate raytracer: a simple implementation of raytracing in Javascript

#3
post #2

Peter Shirley's Raytracing in a Weekend minibooks are another good introduction that goes beyond rendering spheres, and they are now available for free: https://twitter.com/Peter_shirley/status/1029342221139509249

Jamis Buck (wrote Mazes for Programmers) also has a pretty good one in progress. It's very TDD driven, which is an interesting approach.

https://pragprog.com/book/jbtracer/the-ray-tracer-challenge

Re: Literate raytracer: a simple implementation of raytracing in Javascript

#5
I've bodged together a slow python implementation here: https://gist.github.com/JosephRedfern/ea6a7e8f3f59a28296ac30...

I kept variable names roughly the same in order to make it easy to compare the JS version to the Python version. I also translated vector.js to python (for the same reasons), even though you could probably just use numpy directly.

Re: Literate raytracer: a simple implementation of raytracing in Javascript

#7
post #2

Peter Shirley's Raytracing in a Weekend minibooks are another good introduction that goes beyond rendering spheres, and they are now available for free: https://twitter.com/Peter_shirley/status/1029342221139509249

Jamis Buck (wrote Mazes for Programmers) also has a pretty good one in progress. It's very TDD driven, which is an interesting approach. https://pragprog.com/book/jbtracer/the-ray-tracer-challenge

Huge endorsement for this one - I’ve been working my way through it and I’ve found that this has helped me level up in my language skills in a way that no other method has so far.

Re: Literate raytracer: a simple implementation of raytracing in Javascript

#8
I love the focus on implementation. That really connects the underlying ideas with working code.

For those interested in a gentle introduction to those underlying ideas, including a refresher on the required math, I taught a class on how to implement a ray tracer. All the materials are available: https://avik-das.github.io/build-your-own-raytracer/

Re: Literate raytracer: a simple implementation of raytracing in Javascript

#9
I'm intrigued by the concept of literate programming and interested in exploring options for a Scala project I'm working on right now. It looks like this one was done using Docco [1]. Docco supports Scala, and it appears to be a pretty lightweight approach, largely using Markdown. I'm curious whether any literate programming veterans have tooling they prefer?

[1] http://ashkenas.com/docco/

Re: Literate raytracer: a simple implementation of raytracing in Javascript

#10
When I was young, graphics programming is what got me to try coding in the first place. At the time, all books I picked up for intros to graphics programming were more about teaching DirectX, and DirectX in the late 90s before IntelliSense was no fun. I found it horribly arcane and ended up a backend/web engineer.

I think if I had better examples like this to follow I would've gotten a lot farther.

Post reply on HN