##RenderMan RIB-Structure 1.0
version 3.03
# Comments appear next to single hash marks (#).

# Specify the output file and its size
Display "lab7.tif" "file" "rgba"
Format 640 480 1

# Define the viewpoint
Projection "perspective" "fov" [55 ]
Translate 0 0.25 15
Rotate -15.0 1 0 0
Rotate 15.0 0 1 0

# Draw one frame, define the world
FrameBegin 1
WorldBegin

# Ray-casting shadow calculation is off by default, dont turn it on.
Attribute "light" "shadows" ["on"]

# light sources
LightSource "distantlight" 1 "intensity" [1] "lightcolor" [1 1 1] "from" [25 25 -25] "to" [0 0 0]
LightSource "distantlight" 2 "intensity" [1] "lightcolor" [1 1 1] "from" [-25 25 -25] "to" [0 0 0]
LightSource "distantlight" 3 "intensity" [0.5] "lightcolor" [1 1 1] "from" [0 25 0] "to" [0 0 0]


# walls
AttributeBegin
Attribute "identifier" "name" "wall"
Surface "lab7"
Translate 0 0 0
  TransformBegin
  Polygon "P" [15 10 5  -15 10 5  -15 -5 5  15 -5 5]
  TransformEnd
AttributeEnd

# floor
AttributeBegin
Attribute "identifier" "name" "floor"
Surface "cmarble"
Translate 0 0 0
  TransformBegin
  Rotate 90 1 0 0
  Polygon "P" [15 5 5  -15 5 5  -15 -15 5  15 -15 5]
  TransformEnd
AttributeEnd

# frame
AttributeBegin
Attribute "identifier" "name" "mirror"
Color [0.60 0.4 0.26]
Surface "wood2"
Translate 0 0 0
  TransformBegin
  Polygon "P" [10.5 9.5 4.95  -10.5 9.5 4.95  -10.5 -4.5 4.95  10.5 -4.5 4.95]
  TransformEnd
AttributeEnd


# mirror
AttributeBegin
Attribute "identifier" "name" "mirror"

Surface "shiny" "Kr" 0.7  "Kd" 0.05  "Ks" 0.25  "roughness" 0.05 
Declare "specularcolor" "color"
Attribute "radiosity" "specularcolor" [0.8 0.8 0.8]

Translate 0 0 0
  TransformBegin
  Polygon "P" [10 9 4.9  -10 9 4.9  -10 -4 4.9  10 -4 4.9]
  TransformEnd
AttributeEnd

# sphere
AttributeBegin
Attribute "identifier" "name" "mysphere"
Color [ 0 0 1 ]
Translate 5 -2 0
Sphere 1.5 -1.5 1.5 360
AttributeEnd

# cone
AttributeBegin
Attribute "identifier" "name" "mycone"
Color [ 0 1 0 ]
Rotate -90 1 0 0
Rotate 15 1 0 0
Rotate 15 0 1 0
Cone 3 1.5 360
AttributeEnd

# cube
AttributeBegin
Attribute "identifier" "name" "unitcube"
Color [ 1 0 0 ]
Rotate -15 1 0 0
Rotate -15 0 1 0
Translate -5 -1 0
Scale 2.5 2.5 2.5
# A cube with unit length sides, centered at the origin
Bound -.5 .5 -.5 .5 -.5 .5
TransformBegin
# far face
Polygon "P" [.5 .5 .5  -.5 .5 .5  -.5 -.5 .5  .5 -.5 .5]
Rotate 90  0 1 0
# right face
Polygon "P" [.5 .5 .5  -.5 .5 .5  -.5 -.5 .5  .5 -.5 .5]
# near face
Rotate 90  0 1 0
Polygon "P" [.5 .5 .5  -.5 .5 .5  -.5 -.5 .5  .5 -.5 .5]
# left face
Rotate 90  0 1 0
Polygon "P" [.5 .5 .5  -.5 .5 .5  -.5 -.5 .5  .5 -.5 .5]
TransformEnd
TransformBegin
# bottom face
Rotate 90  1 0 0
Polygon "P" [.5 .5 .5  -.5 .5 .5  -.5 -.5 .5  .5 -.5 .5]
TransformEnd
TransformBegin
# top face
Rotate -90  1 0 0
Polygon "P" [.5 .5 .5  -.5 .5 .5  -.5 -.5 .5  .5 -.5 .5]
TransformEnd
AttributeEnd

# lens
AttributeBegin
Attribute "identifier" "name" "lens"
Surface "glass"
Translate 0 0 -5
Rotate -15 0 1 0
Disk 1 2 360
AttributeEnd


WorldEnd
FrameEnd