home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // Sample file
- // By Drew Wells
-
- // Room.dat - Empty room created for CIS Comart Raytracing Group Project
-
- #include "shapes.dat"
- #include "colors.dat"
- #include "textures.dat"
-
- { Camera Facing North}
- view_point
- direction <0.0 0.0 1.5>
- up <0.0 1.0 0.0>
- right <1.333333 0.0 0.0>
- translate < 10.0 5.0 -30.0>
- look_at <0.0 5.0 0.0>
- end_view_point
-
- {***********************************************}
- { Define objects for use in scene }
- { Your object should be DECLAREd here }
- {***********************************************}
-
- #declare North_Wall = object
- plane <0.0 0.0 1.0> 10.0 end_plane
- texture
- granite
- scale <1.0 20.0 1.0>
- end_texture
- color Yellow
- end_object
- { South Wall commented out so camera can see in}
- #declare South_Wall = object
- plane <0.0 0.0 1.0> -10.0 end_plane
- texture
- Cherry_Wood
- 0.05
- scale <10.0 10.0 10.0>
- end_texture
- color CRed
- end_object
-
- { Not visible with current viewpoint}
- { But could be useful for light coming through window etc. }
- #declare East_Wall = object
- plane <1.0 0.0 0.0> 15.0 end_plane
- texture
- Jade
- scale <10.0 10.0 10.0>
- end_texture
- color CGreen
- end_object
- #declare West_Wall = object
- plane <1.0 0.0 0.0> -15.0 end_plane
- texture
- White_Wood
- 0.05
- scale <15.0 20.0 3.0>
- end_texture
- color CBlue
- end_object
- #declare Ceiling = object
- plane <0.0 1.0 0.0> 15.0 end_plane
- texture
- Red_Marble
- scale <10.0 10.0 10.0>
- end_texture
- color White
- end_object
- #declare Floor = object
- plane <0.0 1.0 0.0> 0.0 end_plane
- texture
- Pine_Wood
- 0.05
- scale <40.0 3.0 3.0>
- end_texture
- color Violet
- end_object
-
- {*****************************************}
- { Scene description }
- {*****************************************}
- object
- North_Wall
- end_object
- { Comment out South Wall so camera can see in }
- {object
- South_Wall
- end_object}
- object
- East_Wall
- end_object
- object
- West_Wall
- end_object
- object
- Ceiling
- end_object
- object
- Floor
- end_object
-
- { Colored spheres to help visualize coordinates}
- object {North}
- sphere <0.0 7.0 9.0> 1.0 end_sphere
- texture color Yellow end_texture
- color Yellow
- end_object
- { South sphere not visible in example gif}
- {object {South}
- sphere <0.0 5.0 -10.0> 1.0 end_sphere
- texture color CRed end_texture
- color CRed
- end_object}
- object {East}
- sphere <10.0 7.0 0.0> 1.0 end_sphere
- texture color CGreen end_texture
- color CGreen
- end_object
- object {West}
- sphere <-14.0 7.0 0.0> 1.0 end_sphere
- texture color CBlue end_texture
- color CBlue
- end_object
- object {Up}
- sphere <0.0 14.0 0.0> 1.0 end_sphere
- texture color White end_texture
- color White
- end_object
- object {Down}
- sphere <0.0 1.0 0.0> 1.0 end_sphere
- texture color Violet end_texture
- color Violet
- end_object
-
-
- {Crude Spot light - feel free to add more light sources.}
- object
- intersection
- sphere <0.0 0.0 0.0> 2.0 inverse end_sphere
- sphere <0.0 0.0 0.0> 2.1 end_sphere
- plane <0.0 0.0 1.0> 1.2 end_plane
- end_intersection
- texture
- Brown_Agate
- scale <3.0 3.0 3.0>
- specular 1.0
- end_texture
- rotate <45.0 -40.0 0.0>
- translate <10.0 10.0 -8.0>
- end_object
-
- object
- sphere <0.0 0.0 0.0> 0.0005 end_sphere
- translate <10.0 10.0 -8.0>
- texture
- colour White
- ambient 0.001
- end_texture
- light_source
- colour White
- end_object
-
- { Far light source to light where spot doesn't }
- object
- sphere <0.0 0.0 0.0> 0.0008 end_sphere
- translate <-10.0 10.0 -40.0>
- texture
- colour White
- ambient 0.001
- end_texture
- light_source
- colour White
- end_object
-