raytracer.js is a simple raytracer for the Phong shading model implemented in JS. For more information see here.
Raytracing is an elegant technique which allows to determine the radiance of light inciding on the eye of the observer from a particular direction by following the ray backwards out into the scene and examining the surface it was emitted from.
I have implemented the simplest version of these ideas in a ray tracer written in JavaScript. Ray tracing is quite a computationally expensive algorithm and therefore implementing it in a scripting language is a spectacularly bad idea. Nonetheless, the attractive aspects about it where that it can be directly delivered into the browser.
The project relies on the following dependencies:
- require.js
- jquery (only for user interface)
- jquery-ui (only for user interface)