# a simple demonstration of the capabilities of the raytracer: # a scene consisting of each of the possible object types, and some of the # surface types. # the scene is 400 pixels by 400 pixels by 255 colors scene (400 x 400 x 255 ) { viewpoint: (150 0 3000) lightsource { at: (300 -1000 2500) intensity: 1.0 } environment { rgb: (0.0 0.0 0.0) shadow: 0.4 } # an infinite plane at Y=300, with a woodgrain texture map plane { at: (0 1 0 -300) ka: 0.2 kd: 0.2 ks: 0.4 ppm: "ash.ppm" } # an infinite backplane at Z=0, with noise-based cloud generation plane { at: (0 0 1 0) ka: 0.3 kd: 0.3 cloud: 32.0 } # a quadric. at present, this is the only way to specify these, # i'm afraid. this one's a radius 75 infinite cylinder at x=z=100, # along the Y axis; the letters here just specify the coefficients # for the quadric. unspecified coefficients are 0. quadric { a: 1.0 d: -100.0 h: 1.0 i: -100.0 j: 17500.0 ka: 0.3 kd: 0.3 ks: 0.2 it: 1.0 kt: 0.6 rgb: (0.3 0.0 0.0) } # a sphere, with a texture map from a ppm file. the texture is wrapped # sensibly around the sphere. sphere { at: (275 200 100) radius: 100 ka: 0.3 kd: 0.6 ks: 0.1 n: 5.0 ppm: "peters.ppm" } # a right triangle, with a black-and-red checkerboard texturemap. polygon { vertices: ((10 100 200) (10 300 200) (200 300 200)) ka: 0.3 kd: 0.6 checkerboard: (32 (0.0 0.0 0.0) (1.0 0.0 0.0)) } # a sphere with a colorful texturemap and holes; the float value here # is the divisor for the noise function. the smaller the divisor, the # smaller the noise features. by making the thing just diffuse, with # an index of refractivity equal to that of air, we get something that # really looks like it has holes. sphere { at: (200 250 275) radius: 50 ka: 0.3 kd: 0.6 it: 1.0002 kt: 1.0 holes: 16.0 bozo: 16.0 } }