[Laser 2.0 Documentation]

Laser 2.0 Sample Code

URL String variables have been defined in the Laser global environment for all of these files. You can evaluate the code on this page with the Laser expression (include FILE.lsr) where FILE is the name of the file as listed below.

Scenes
Models
Procedures

Note: Some of the aliasing and other defects in the images below are from the GIF and JPEG reconstruction algorithm, and are not representative of the quality of Laser ray traced images


Scenes:

Ripple

A sample of Ripple bump mapping. This program evaluates to a scene of a sphere of water in the center of a rippled plane. The plane is really flat; the rippling surface is created by changing the normal based on distance from the center of the plane. Laser supports simultaneous mapping of any surface feature, such as texture mapping, transparency, emissivity, surface normal, surface intersection, etc.

Spheres

Evaluates to a scene of a reflective, metalic sphere with four golden tentacles stretching out and back inside itself. The tentacles are created using recursive procedures.

Cubes

Evaluates to a scene filled with random reflective cubes. Creates a procedure make-random-cube, then calls it multiple times to fill the scene. The default color space environment map is used, with a rotated viewer to see the yellow/red portion.

Checker

Evaluates to a scene of a reflective red sphere on a black and white reflective checker board (texture mapped) plane.

Underwater

An underwater scene demonstrating the use of bump mapping, environment diffusion, and optimization. To simulate an under sea location, the water surface is wavy and reflective, and the environment is filled with translucent blue water. The sandy bottom is bump mapped, and for rendering speed, cannot cast shadows.

Default

Evaluates to the default scene; a gray sphere with a colorspace environment map. Diffuse shading and specular hilight from the default directional light (upper left hand light source) can be seen.


Models:

Submarine

A simple submarine model consisting of seven primitives.

Scenebox

A purple checkered box with the front face removed. Convenient for placing scene objects in.

Ring

A reflective gold ring with a translucent diamond set in it.


Procedures:

Showmodel

A procedure which tilts, scales and lights models for convenient viewing.


© 1996, Morgan McGuire ([email protected]) and Laura Wollstadt ([email protected]).
All rights reserved

LBW 12/06/96