https://github.com/geraintluff/js-raytrace-demo
A Monte-Carlo raytracing demo in JavaScript
https://github.com/geraintluff/js-raytrace-demo
Last synced: about 1 year ago
JSON representation
A Monte-Carlo raytracing demo in JavaScript
- Host: GitHub
- URL: https://github.com/geraintluff/js-raytrace-demo
- Owner: geraintluff
- Created: 2013-09-22T23:30:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-25T07:21:53.000Z (over 12 years ago)
- Last Synced: 2025-01-28T21:18:24.996Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 863 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-raytrace-demo
### Monte-Carlo raytracing in JavaScript
The demo scene is two interlocking spheres (with varying scattering behaviour), with tiled floor/ceiling, and two luminescent spheres out-of-shot.
* [`index.html`](http://geraintluff.github.io/js-raytrace-demo/index.html) - single image, 400x240
* [`stereographic.html`](http://geraintluff.github.io/js-raytrace-demo/stereographic.html) - two-camera setup, 200x120
The raytracer attempts to estimate the error in the image (based on neighbourhood noise), and selectively renders certain pixels to attempt to get an even level of noise.
The preview/display *adds* noise to the image to simulate an even level of noise. The idea is to prevent the viewer from attributing noise to object texture. [Here](http://geraintluff.github.io/js-raytrace-demo/index-no-noise.html) is what it looks like *without* that noise.
Here's a 800x480 version I left running overnight:
