##RenderMan RIB-Structure 1.0 version 3.03 # Nima Oreizy (cs184-aj) # lab 7, 11 Nov. 98 # Specify the output file and its size Display "lab7.tif" "file" "rgba" Format 640 480 1 # Define the viewpoint Projection "perspective" "fov" [55 ] Rotate -20 1 0 0 Translate 0 -1 2.1 Rotate -43 0 1 0 # Draw one frame, define the world FrameBegin 1 WorldBegin # Dont use ambient light - improves contrast in this environment LightSource "ambientlight" 1 "intensity" [1] # Turn ray-casting shadow calculation on Attribute "light" "shadows" ["on"] # 2 light sources LightSource "distantlight" 1 "intensity" [3 ] "lightcolor" [1 1 1] "from" [10 8 -8] "to" [0 1 0] LightSource "distantlight" 2 "intensity" [1 ] "lightcolor" [1 1 1] "from" [-10 2 0] "to" [0 1 0] #LightSource "distantlight" 3 "intensity" [3 ] "lightcolor" [1 1 1] "from" [0 10 0] "to" [0 1 0] # shiny balls Declare "frequency" "float" Declare "radius" "float" Declare "swirlfreq" "float" Declare "backcolor" "color" AttributeBegin Attribute "identifier" "name" "ball1" Color [0.2 0.2 0.8] TransformBegin Translate -0.4 0.2 0 Surface "polkadot" "frequency" 10 "backcolor" [0 0 0] Sphere 0.1 -0.1 0.1 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "ball2" Color [0.2 0.5 0.2] TransformBegin Translate -0.2 0.2 0 Surface "polkadot" "frequency" 5 "backcolor" [1 1 1] Sphere 0.1 -0.1 0.1 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "ball3" Color [0.8 0.2 0.2] TransformBegin Translate 0 0.2 0 Surface "polkadot" "frequency" 13 "radius" 0.5 "backcolor" [0.3 0.1 0.3] Sphere 0.1 -0.1 0.1 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "ball4" Color [0.75 0.55 0.04] TransformBegin Translate 0.2 0.2 0 Surface "polkadot" "frequency" 2 "backcolor" [0.08 0.35 0.2] Sphere 0.1 -0.1 0.1 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "ball5" Color [1 0 1] TransformBegin Translate 0.4 0.2 0 Surface "polkadot" "frequency" 7 "radius" 0.6 "backcolor" [0 0 0] Sphere 0.1 -0.1 0.1 360 TransformEnd AttributeEnd # poles coming out of base AttributeBegin Attribute "identifier" "name" "poleFL" Color [0.4 0.2 0.2] TransformBegin Translate -0.8 0 -0.4 Rotate -90 1 0 0 Surface "wood" Cylinder 0.02 0 0.7 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "poleFR" Color [0.4 0.2 0.2] TransformBegin Translate 0.8 0 -0.4 Rotate -90 1 0 0 Surface "wood" Cylinder 0.02 0 0.7 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "poleBL" Color [0.4 0.2 0.2] TransformBegin Translate -0.8 0 0.4 Rotate -90 1 0 0 Surface "wood" Cylinder 0.02 0 0.7 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "poleBR" Color [0.4 0.2 0.2] TransformBegin Translate 0.8 0 0.4 Rotate -90 1 0 0 Surface "wood" Cylinder 0.02 0 0.7 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "crosspoleB" Color [0.4 0.2 0.2] TransformBegin Translate 0 0.7 0.4 Rotate 90 0 1 0 Surface "wood" Cylinder 0.02 -0.82 0.82 360 TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "crosspoleF" Color [0.4 0.2 0.2] TransformBegin Translate 0 0.7 -0.4 Rotate 90 0 1 0 Surface "wood" Cylinder 0.02 -0.82 0.82 360 TransformEnd AttributeEnd # Strings AttributeBegin Attribute "identifier" "name" "string1F" Color [1 1 1] TransformBegin Translate -0.4 0.3 0 TransformBegin Rotate -135 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string1B" Color [1 1 1] TransformBegin Translate -0.4 0.3 0 TransformBegin Rotate -45 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string2F" Color [1 1 1] TransformBegin Translate -0.2 0.3 0 TransformBegin Rotate -135 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string2B" Color [1 1 1] TransformBegin Translate -0.2 0.3 0 TransformBegin Rotate -45 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string3F" Color [1 1 1] TransformBegin Translate 0 0.3 0 TransformBegin Rotate -135 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string3B" Color [1 1 1] TransformBegin Translate 0 0.3 0 TransformBegin Rotate -45 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string4F" Color [1 1 1] TransformBegin Translate 0.2 0.3 0 TransformBegin Rotate -135 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string4B" Color [1 1 1] TransformBegin Translate 0.2 0.3 0 TransformBegin Rotate -45 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string5F" Color [1 1 1] TransformBegin Translate 0.4 0.3 0 TransformBegin Rotate -135 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd AttributeBegin Attribute "identifier" "name" "string5B" Color [1 1 1] TransformBegin Translate 0.4 0.3 0 TransformBegin Rotate -45 1 0 0 Surface "plastic" Cylinder 0.005 0 0.57 360 TransformEnd TransformEnd AttributeEnd # wood base AttributeBegin Attribute "identifier" "name" "myblock" #Color [0.60 0.4 0.26] Color [0.2 0.1 0.1] TransformBegin Scale 0.5 0.5 0.5 Surface "wood" "swirlfreq" 2 TransformEnd #Translate 0 -1.0 0 # A cube with unit length sides, centered at the origin Bound -1.0 -0.1 0.5 1.0 0.1 -0.5 TransformBegin # top face Polygon "P" [1.0 0.1 0.5 -1.0 0.1 0.5 -1.0 0.1 -0.5 1.0 0.1 -0.5] # bottom face Polygon "P" [1.0 -0.1 0.5 -1.0 -0.1 0.5 -1.0 -0.1 -0.5 1.0 -0.1 -0.5] # back face Polygon "P" [1.0 -0.1 0.5 -1.0 -0.1 0.5 -1.0 0.1 0.5 1.0 0.1 0.5] # front face Polygon "P" [1.0 -0.1 -0.5 -1.0 -0.1 -0.5 -1.0 0.1 -0.5 1.0 0.1 -0.5] # right face Polygon "P" [1.0 0.1 0.5 1.0 -0.1 0.5 1.0 -0.1 -0.5 1.0 0.1 -0.5] # left face Polygon "P" [-1.0 0.1 0.5 -1.0 -0.1 0.5 -1.0 -0.1 -0.5 -1.0 0.1 -0.5] TransformEnd AttributeEnd WorldEnd FrameEnd