Ray Tracer

About

Project Status:   Prototype | Development | Alpha | Beta | Production

The ray tracer is currently a work-in-progress for testing and demonstrating LxWeb, a javascript engine for visualization and simulation.

It is composed of a JQuery plug-in, an LxWeb based tracing engine, and a few support libraries.

Warning:  As this is most definitely in the prototype stage, it has only been tested on the latest version of Google Chrome.

Demonstration

     download

These options are in development and are only partly functional.

Options
Scene
Presets
Resolution
Sample Count
Render

Simple Examples

The ray traced images below are cached after the first render: click here to clear the local cache.

Multisampling

The first image is rendered with multisampling enabled; the second has multisampling disabled.

Procedural Patterns

{ DIFFUSE : "return lx.patterns.checker( lx.mappers.spherical(fragment.positionOc, [8, 4]) ) ? [ .15, .15, .15] : [ .85, .85, .90];" } { DIFFUSE : "return lx.patterns.spot( lx.mappers.spherical(fragment.positionOc, [8, 4]) ) ? [ .15, .35, .92] : [ .35, .55, .65];" } { DIFFUSE : "return lx.patterns.stripe( lx.mappers.spherical(fragment.positionOc, [32, 8]) ) ? [ .15, .19, .92] : [ .65, .65, .02];" } { DIFFUSE : "return lx.patterns.tile( lx.mappers.spherical(fragment.positionOc, [12, 6]) ) ? [ .95, .19, .52] : [ .65, .05, .22];" }

{ DIFFUSE : "return lx.patterns.diamond( lx.mappers.spherical(fragment.positionOc, [32, 8]) ) ? [ .15, .89, .32] : [ .65, .95, .02];" } { DIFFUSE : "return lx.patterns.wave( lx.mappers.spherical(fragment.positionOc, [32, 8]) ) ? [ .95, .35, .12] : [ .35, .15, .12];" } { DIFFUSE : "return lx.patterns.star( lx.mappers.spherical(fragment.positionOc, [12, 12]) ) ? [ .95, .99, .88] : [ .05, .05, .12];" } { DIFFUSE : "return lx.patterns.ribbon( lx.mappers.spherical(fragment.positionOc, [12, 12]) ) ? [ .25, .25, .52] : [ .51, .51, .82];" }

{ DIFFUSE : "return lx.patterns.checkerSmooth( lx.mappers.spherical(fragment.positionOc, [8, 4]) ) ? [ .99, .00, .10] : [ .99, .99, .89];" } { DIFFUSE : "return lx.patterns.gateLattice( lx.mappers.spherical(fragment.positionOc, [16, 8]) ) ? [ .92, .95, .42] : [ .05, .05, .12];" } { DIFFUSE : "return lx.patterns.circlepattern( lx.mappers.spherical(fragment.positionOc, [6, 3]) ) ? [ .00, .99, .38] : [ .85, .95, .72];" } { DIFFUSE : "return lx.patterns.mirrortau( lx.mappers.spherical(fragment.positionOc, [12, 12]) ) ? [ .85, .85, .99] : [ .11, .21, .12];" }

{ DIFFUSE : "return lx.patterns.fatlattice( lx.mappers.spherical(fragment.positionOc, [10, 5]) ) ? [ .85, .89, .72] : [ .95, .45, .42];" } { DIFFUSE : "return lx.patterns.circle( lx.mappers.spherical(fragment.positionOc, [32, 16]) ) ? [ .65, .35, .22] : [ .35, .35, .62];" } { DIFFUSE : "return lx.patterns.roundedTile( lx.mappers.spherical(fragment.positionOc, [24, 12]) ) ? [ .95, .99, .78] : [ .05, .05, .12];" } { DIFFUSE : "return lx.patterns.spotwave( lx.mappers.spherical(fragment.positionOc, [16, 8]) ) ? [ .25, .25, .72] : [ .18, .11, .12];" }

{ DIFFUSE : "return lx.patterns.spotdiamondxor( lx.mappers.spherical(fragment.positionOc, [12, 6]) ) ? [ .65, .69, .32] : [ .96, .90, .02];" } { DIFFUSE : "return lx.patterns.gridBump( lx.mappers.spherical(fragment.positionOc, [8, 4]) ) ? [ .95, .05, .12] : [ 1.0, .50, .50];" } { DIFFUSE : "return _lxbb_mix_vec3_vec3_float([ .00, .10, .02], [ .05, .35, .99], lx.patterns.weave( lx.mappers.spherical(fragment.positionOc, [8, 4])) );" }

Architecture & Implementation

Todo