Friday, March 16, 2012

Simple Raytracer

Simple raytracer that calculates colors for individual pixels. The raytracer is able to calculate shadows, diffuse lighting, specular reflection, as wells as actual reflection up to three levels of recursion. Executable found here and a sample parameter file here.

Formating for the parameters:

NEAR <n>
LEFT <l>
TOP <t>
RES <x> <y>
SPHERE <name> <pos x> <pos y> <pos z> <scl x> <scl y> <scl z> <r> <g> <b> <Ka> <Kd> <Ks> <Kr> <n>
LIGHT <name> <pos x> <pos y> <pos z> <Ir> <Ig> <Ib>
BACK <r> <g > <b>
AMBIENT <Ir> <Ig> <Ib>
OUTPUT <name>

No comments:

Post a Comment