# demonstration program for creating a reflection in a flat surface # define the objects ObjectBegin 1 Sphere 1 -1 1 360 ObjectEnd ObjectBegin 2 Polygon "P" [-5 -5 0 5 -5 0 5 5 0 -5 5 0] ObjectEnd ObjectBegin 3 Cylinder .05 0 .75 360 ObjectEnd ObjectBegin 4 Patch "bilinear" "P" [0 1 0 1 1 0 0 1 .5 1 1 .5] ObjectEnd ObjectBegin 5 Cone .4 .2 360 ObjectEnd # + X FrameBegin 1 Display "/u/bo/prman/textures/px.tif" "file" "rgba" Format 256 256 1 ShadingRate 1 CropWindow 0 1 0 1 ScreenWindow -1.333 1.333 -1 1 Projection "perspective" "fov" [95] Rotate -90 0 1 0 Translate 0 0 -0.2 WorldBegin Sides 2 #Declare "shadowname" "uniform string" #Declare "distant.shadow" "uniform string" #Declare "spot.shadow" "uniform string" TransformBegin Translate 0 0 5 Rotate 150 1 0 0 Rotate 45 0 0 1 LightSource "shadowdistant" 1 "intensity" 1.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "shadowname" "distant.shadow" TransformEnd TransformBegin Translate -1 0 4 Rotate 160 0 1 0 Rotate 0 0 0 1 LightSource "shadowspot" 1 "intensity" 30.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "coneangle" 10.0 "conedeltaangle" 0.0 "beamdistribution" 200.0 "shadowname" "spot.shadow" TransformEnd LightSource "ambientlight" 2 "intensity" .3 Surface "plastic" "Ka" [0.3] "Kd" [0.4] "Ks" [0.3] # sphere #AttributeBegin # Displacement "dented" "depth" [0.05] # Color [1 .6 .3] # Translate 0 0 0.2 # Scale .2 .2 .2 # ObjectInstance 1 #AttributeEnd # bottom plane AttributeBegin Color [1 .8 .6] Scale 1.0 1.0 1.0 ObjectInstance 2 AttributeEnd # cylinders AttributeBegin Color [.8 1 1] Translate .4 .1 -.1 Scale 1 1 .5 ObjectInstance 3 Translate 0 .3 0 Color [.8 .9 1] ObjectInstance 3 AttributeEnd WorldEnd FrameEnd # - X FrameBegin 2 Display "/u/bo/prman/textures/nx.tif" "file" "rgba" Format 256 256 1 ShadingRate 1 CropWindow 0 1 0 1 ScreenWindow -1.333 1.333 -1 1 Projection "perspective" "fov" [95] Rotate 90 0 1 0 Translate 0 0 -0.2 WorldBegin Sides 2 #Declare "shadowname" "uniform string" #Declare "distant.shadow" "uniform string" #Declare "spot.shadow" "uniform string" TransformBegin Translate 0 0 5 Rotate 150 1 0 0 Rotate 45 0 0 1 LightSource "shadowdistant" 1 "intensity" 1.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "shadowname" "distant.shadow" TransformEnd TransformBegin Translate -1 0 4 Rotate 160 0 1 0 Rotate 0 0 0 1 LightSource "shadowspot" 1 "intensity" 30.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "coneangle" 10.0 "conedeltaangle" 0.0 "beamdistribution" 200.0 "shadowname" "spot.shadow" TransformEnd LightSource "ambientlight" 2 "intensity" .3 Surface "plastic" "Ka" [0.3] "Kd" [0.4] "Ks" [0.3] # sphere #AttributeBegin # Displacement "dented" "depth" [0.05] # Color [1 .6 .3] # Translate 0 0 0.2 # Scale .2 .2 .2 # ObjectInstance 1 #AttributeEnd # bottom plane AttributeBegin Color [1 .8 .6] Scale 1.0 1.0 1.0 ObjectInstance 2 AttributeEnd # cylinders AttributeBegin Color [.8 1 1] Translate .4 .1 -.1 Scale 1 1 .5 ObjectInstance 3 Translate 0 .3 0 Color [.8 .9 1] ObjectInstance 3 AttributeEnd WorldEnd FrameEnd # + Y FrameBegin 3 Display "/u/bo/prman/textures/py.tif" "file" "rgba" Format 256 256 1 ShadingRate 1 CropWindow 0 1 0 1 ScreenWindow -1.333 1.333 -1 1 Projection "perspective" "fov" [95] Rotate 90 1 0 0 Translate 0 0 -0.2 WorldBegin Sides 2 #Declare "shadowname" "uniform string" #Declare "distant.shadow" "uniform string" #Declare "spot.shadow" "uniform string" TransformBegin Translate 0 0 5 Rotate 150 1 0 0 Rotate 45 0 0 1 LightSource "shadowdistant" 1 "intensity" 1.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "shadowname" "distant.shadow" TransformEnd TransformBegin Translate -1 0 4 Rotate 160 0 1 0 Rotate 0 0 0 1 LightSource "shadowspot" 1 "intensity" 30.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "coneangle" 10.0 "conedeltaangle" 0.0 "beamdistribution" 200.0 "shadowname" "spot.shadow" TransformEnd LightSource "ambientlight" 2 "intensity" .3 Surface "plastic" "Ka" [0.3] "Kd" [0.4] "Ks" [0.3] # sphere #AttributeBegin # Displacement "dented" "depth" [0.05] # Color [1 .6 .3] # Translate 0 0 0.2 # Scale .2 .2 .2 # ObjectInstance 1 #AttributeEnd # bottom plane AttributeBegin Color [1 .8 .6] Scale 1.0 1.0 1.0 ObjectInstance 2 AttributeEnd # cylinders AttributeBegin Color [.8 1 1] Translate .4 .1 -.1 Scale 1 1 .5 ObjectInstance 3 Translate 0 .3 0 Color [.8 .9 1] ObjectInstance 3 AttributeEnd WorldEnd FrameEnd # - Y FrameBegin 4 Display "/u/bo/prman/textures/ny.tif" "file" "rgba" Format 256 256 1 ShadingRate 1 CropWindow 0 1 0 1 ScreenWindow -1.333 1.333 -1 1 Projection "perspective" "fov" [95] Rotate -90 1 0 0 Translate 0 0 -0.2 WorldBegin Sides 2 #Declare "shadowname" "uniform string" #Declare "distant.shadow" "uniform string" #Declare "spot.shadow" "uniform string" TransformBegin Translate 0 0 5 Rotate 150 1 0 0 Rotate 45 0 0 1 LightSource "shadowdistant" 1 "intensity" 1.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "shadowname" "distant.shadow" TransformEnd TransformBegin Translate -1 0 4 Rotate 160 0 1 0 Rotate 0 0 0 1 LightSource "shadowspot" 1 "intensity" 30.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "coneangle" 10.0 "conedeltaangle" 0.0 "beamdistribution" 200.0 "shadowname" "spot.shadow" TransformEnd LightSource "ambientlight" 2 "intensity" .3 Surface "plastic" "Ka" [0.3] "Kd" [0.4] "Ks" [0.3] # sphere #AttributeBegin # Displacement "dented" "depth" [0.05] # Color [1 .6 .3] # Translate 0 0 0.2 # Scale .2 .2 .2 # ObjectInstance 1 #AttributeEnd # bottom plane AttributeBegin Color [1 .8 .6] Scale 1.0 1.0 1.0 ObjectInstance 2 AttributeEnd # cylinders AttributeBegin Color [.8 1 1] Translate .4 .1 -.1 Scale 1 1 .5 ObjectInstance 3 Translate 0 .3 0 Color [.8 .9 1] ObjectInstance 3 AttributeEnd WorldEnd FrameEnd # + Z FrameBegin 5 Display "/u/bo/prman/textures/pz.tif" "file" "rgba" Format 256 256 1 ShadingRate 1 CropWindow 0 1 0 1 ScreenWindow -1.333 1.333 -1 1 Projection "perspective" "fov" [95] Translate 0 0 -0.2 WorldBegin Sides 2 #Declare "shadowname" "uniform string" #Declare "distant.shadow" "uniform string" #Declare "spot.shadow" "uniform string" TransformBegin Translate 0 0 5 Rotate 150 1 0 0 Rotate 45 0 0 1 LightSource "shadowdistant" 1 "intensity" 1.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "shadowname" "distant.shadow" TransformEnd TransformBegin Translate -1 0 4 Rotate 160 0 1 0 Rotate 0 0 0 1 LightSource "shadowspot" 1 "intensity" 30.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "coneangle" 10.0 "conedeltaangle" 0.0 "beamdistribution" 200.0 "shadowname" "spot.shadow" TransformEnd LightSource "ambientlight" 2 "intensity" .3 Surface "plastic" "Ka" [0.3] "Kd" [0.4] "Ks" [0.3] # sphere #AttributeBegin # Displacement "dented" "depth" [0.05] # Color [1 .6 .3] # Translate 0 0 0.2 # Scale .2 .2 .2 # ObjectInstance 1 #AttributeEnd # bottom plane AttributeBegin Color [1 .8 .6] Scale 1.0 1.0 1.0 ObjectInstance 2 AttributeEnd # cylinders AttributeBegin Color [.8 1 1] Translate .4 .1 -.1 Scale 1 1 .5 ObjectInstance 3 Translate 0 .3 0 Color [.8 .9 1] ObjectInstance 3 AttributeEnd WorldEnd FrameEnd # - Z FrameBegin 6 Display "/u/bo/prman/textures/nz.tif" "file" "rgba" Format 256 256 1 ShadingRate 1 CropWindow 0 1 0 1 ScreenWindow -1.333 1.333 -1 1 Projection "perspective" "fov" [95] Rotate 180 0 1 0 Translate 0 0 -0.2 WorldBegin Sides 2 #Declare "shadowname" "uniform string" #Declare "distant.shadow" "uniform string" #Declare "spot.shadow" "uniform string" TransformBegin Translate 0 0 5 Rotate 150 1 0 0 Rotate 45 0 0 1 LightSource "shadowdistant" 1 "intensity" 1.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "shadowname" "distant.shadow" TransformEnd TransformBegin Translate -1 0 4 Rotate 160 0 1 0 Rotate 0 0 0 1 LightSource "shadowspot" 1 "intensity" 30.0 "lightcolor" [1 1 1] "from" [0 0 0] "to" [0 0 1] "coneangle" 10.0 "conedeltaangle" 0.0 "beamdistribution" 200.0 "shadowname" "spot.shadow" TransformEnd LightSource "ambientlight" 2 "intensity" .3 Surface "plastic" "Ka" [0.3] "Kd" [0.4] "Ks" [0.3] # sphere #AttributeBegin # Displacement "dented" "depth" [0.05] # Color [1 .6 .3] # Translate 0 0 0.2 # Scale .2 .2 .2 # ObjectInstance 1 #AttributeEnd # bottom plane AttributeBegin Color [1 .8 .6] Scale 1.0 1.0 1.0 ObjectInstance 2 AttributeEnd # cylinders AttributeBegin Color [.8 1 1] Translate .4 .1 -.1 Scale 1 1 .5 ObjectInstance 3 Translate 0 .3 0 Color [.8 .9 1] ObjectInstance 3 AttributeEnd WorldEnd FrameEnd # # CONVERT IMAGES INTO ENVIRONMENT TEXTURE # MakeCubeFaceEnvironment "/u/bo/prman/textures/px.tif" "/u/bo/prman/textures/nx.tif" "/u/bo/prman/textures/py.tif" "/u/bo/prman/textures/ny.tif" "/u/bo/prman/textures/pz.tif" "/u/bo/prman/textures/nz.tif" "/u/bo/prman/textures/env.tex" 95 "gaussian" 2 2