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

Display "lab7.tif" "file" "rgba"
Format 640 480 1
#########################################
# Name: Thinh Nguyen
# Acct: cs184-ar
# SID: 13278454
########################################

PixelVariance 0.01

Projection "perspective" "fov" [11 ]

Translate 0.0 -0.4 15.0
Rotate -12.4214 1 0 0
Rotate 23.9625 0 1 0

FrameBegin 1
WorldBegin

# Turn ray-casting shadow calculation on
Attribute "light" "shadows" ["on"]

#LightSource "ambientlight" 1 "intensity" [0.8]
LightSource "distantlight" 2 "intensity" [2 ] "lightcolor" [0.5 0.5 0.5] "from" [10 10 -20] "to" [0 4 0]
LightSource "distantlight" 3 "intensity" [2 ] "lightcolor" [0.4 0.5 0.4] "from" [50 10 0] "to" [0 4 0]
LightSource "distantlight" 4 "intensity" [2 ] "lightcolor" [0.4 0.25 0.25] "from" [50 10 200] "to" [0 0 0]
LightSource "spotlight" 5 "intensity" [1000] "lightcolor" [1.0 1.0 0.0] "from" [10 10 10] "to" [0 8 0]

#####################################
# The hat: A Hyperboloid shape and disks
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "Hat"
Color [0.2 0.2 0.2]
Declare "backcolor" "color"
Declare "dotcolor" "color"
Declare "dotradius" "float"
Declare "dotspacing" "float"
Surface "lab7" "backcolor" [0 0 1] "dotcolor" [1 1 0] "dotradius" 0.1 "dotspacing" 0.1
Rotate  90 1 0 0
Rotate  10 0 1 0
Translate 0.2 0.0 -1.63
Hyperboloid 0.0 -0.2 0.0 0.15 0.0 0.3 360
AttributeEnd

#####################################
# The hat: A Hyperboloid shape and disks
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "HatDisk"
Declare "backcolor" "color"
Declare "dotcolor" "color"
Declare "dotradius" "float"
Declare "dotspacing" "float"
Surface "lab7" "backcolor" [0 0 1] "dotcolor" [1 1 0] "dotradius" 0.1 "dotspacing" 0.1
Rotate  90 1 0 0
Rotate  10 0 1 0
Translate 0.2 0.0 -1.33
#Hyperboloid 0.0 -0.2 0.0 0.15 0.0 0.3 360
Disk 0.0 0.3 360
AttributeEnd

#####################################
# The body of i: A marble stand
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "Ibody"
Surface "lab7" 
Rotate  90 1 0 0
Translate 0.0 0.0 -0.8
Hyperboloid 0.0 -0.2 0.0 0.2 0.0 0.8 360
AttributeEnd

#####################################
# The dot on top of i: A glass ball
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "glassBall"
Color [0.8 0.8 0.0]
Surface "glass"
Translate 0.0 1.2 0.0
Sphere 0.2 -0.2 0.2 360
AttributeEnd

####################################
# Dotted Wall in front of i
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "frontwall"
Declare "backcolor" "color"
Declare "dotcolor" "color"
Declare "dotradius" "float"
Declare "dotspacing" "float"
Surface "lab7" "backcolor" [0.4 0.0 0.4] "dotcolor" [1 1 1] "dotradius" 0.1 "dotspacing" 0.05
Translate 0.0 0.0 1.0
  TransformBegin
  Polygon "P" [2 2 0  -2 2 0  -2 -2 0  2 -2 0]
  TransformEnd
AttributeEnd

####################################
# Floor 
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "floor"
Color [0 0.5 0]
Translate 0.0 0.0 -1.0
TransformBegin
  Polygon "P" [3 0 3   -3 0 3   -3 0 -3   3 0 -3 ]
TransformEnd
AttributeEnd

####################################
#  Wall on left 
#-----------------------------------
AttributeBegin
Attribute "identifier" "name" "leftwall"
Surface "plastic" 
Translate -1.5 1.0 0.0
  TransformBegin
  Polygon "P" [0 2 2  0 2 -2  0 -2 -2   0 -2 2 ]
  TransformEnd
AttributeEnd

WorldEnd
FrameEnd