Literate raytracer: a simple implementation of raytracing in Javascript
1–10 of 26 posts
Re: Literate raytracer: a simple implementation of raytracing in Javascript
#2https://twitter.com/Peter_shirley/status/1029342221139509249
Re: Literate raytracer: a simple implementation of raytracing in Javascript
#3Peter 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
Re: Literate raytracer: a simple implementation of raytracing in Javascript
#4Re: Literate raytracer: a simple implementation of raytracing in Javascript
#5I 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
#6 var lightPoint = scene.lights[0];
this should be var lightPoint = scene.lights[i];Re: Literate raytracer: a simple implementation of raytracing in Javascript
#7Peter 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
#8For 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
#9Re: Literate raytracer: a simple implementation of raytracing in Javascript
#10I think if I had better examples like this to follow I would've gotten a lot farther.