portsmouth / snellytracer

Ray dispersion visualization in WebGL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snelly

Snelly is a webGL dispersion visualization (inspired by Tantalum).

A large number of light rays are cast into a transparent object from a laser, and drawn to the framebuffer. The resulting normalized image converges to a visualization (actually a volume rendering) of the "fluence" (i.e. energy density) of the light in the scene.

  • Scenes are specified by a signed distance field, where regions with negative signed distance lie in the interior of the refracting material, assumed homogeneous. Thanks to Shadertoy it is easy to create lots of interesting scenes this way.

  • A number of physically correct dielectric models are provided, obtained from refractiveindex.info

  • The emitter is a laser pointer with adjustable radius and spread. The emitted light spectrum is specifiable as either a flat band, a monochromatic line, or blackbody radiation at a specified temperature.

Controls

  • left-click and drag to rotate view
  • right-click and drag to pan
  • right-click on surface to target emitter on hit point (right-click off surface to clear target)
  • H to toggle GUI
  • F11 to toggle fullscreen

alt tag alt tag alt tag alt tag alt tag alt tag

About

Ray dispersion visualization in WebGL


Languages

Language:JavaScript 90.4%Language:GLSL 7.7%Language:HTML 1.2%Language:Python 0.3%Language:CSS 0.3%Language:PHP 0.0%