# teapot0.rib # Author: Jorge Balbas # Date: 02/03/09 Projection "perspective" "fov" 40 Display "teapot0.tiff" "framebuffer" "rgb" Display "+teapot0.tiff" "file" "rgb" Format 600 400 1 ObjectBegin 1 #define here, as object 1, the bottom of the teapot, you can do this with a (translated) sphere and a disk (whose radius is consistent with hte size of the sphere) ObjectEnd ObjectBegin 2 #define here, as object 2, the top of the teapot, you can do this with a (translated) paraboloid ObjectEnd ObjectBegin 3 #here is the definition of the teapot's lid, it consists of several objects, you may want to modify it so it fits your model, and you can use this as an example of how you define the above objects TransformBegin Translate 0 0 -8.1 Disk 0.0 0.58 360 TransformEnd TransformBegin Translate 0 0 -8.0 Torus 0.6 -.1 0 360 360 TransformEnd TransformBegin Translate 0 0 -8.0 Cylinder 0.6 0 0.4 360 TransformEnd TransformBegin Translate 0 0 -7.6 Disk 0.0 2.15 360 TransformEnd TransformBegin Translate 0 0 -8.8 Paraboloid 2.37 1.2 1.5 360 TransformEnd TransformBegin Translate 0 0 -7.3 Disk 0.0 2.37 360 TransformEnd TransformBegin Translate 0 0 -7.3 Cylinder 2.25 0 0.2 360 TransformEnd TransformBegin Translate 0 0 -7.1 Disk 0.0 2.25 360 TransformEnd ObjectEnd ObjectBegin 4 #define here the spout of the teapot, likely as a paraboloid ObjectEnd ObjectBegin 5 #define here the handle of the teapot, you can use a torus ObjectEnd WorldBegin Translate 0 -3 22 Rotate 85 1 0 0 Rotate -0 0 0 1 LightSource "ambientlight" 1 "intensity" 0.4 LightSource "distantlight" 2 "intensity" 0.7 "from" [-10 12 -20] "to" [10 -12 0] LightSource "distantlight" 2 "intensity" 0.7 "from" [-10 -12 -20] "to" [10 12 0] LightSource "distantlight" 2 "intensity" 0.7 "from" [10 12 -20] "to" [-10 -12 0] LightSource "distantlight" 2 "intensity" 0.7 "from" [10 -12 -20] "to" [-10 12 0] AttributeBegin Surface "plastic" Opacity 1.0 1.0 1.0 Color 1.0 0.2 0.1 #once you have defined the different objects above, you can instanciate them here by removing the comment token (#) #ObjectInstance 1 #ObjectInstance 2 ObjectInstance 3 #ObjectInstance 4 #ObjectInstance 5 AttributeEnd # environment plane + sphere/dome AttributeBegin Surface"matte" AttributeBegin Color 0.3 0.3 0.8 # plane originally placed at z = 10, 10 units infornt of the camera Polygon "P" [ -80 -80 0 80 -80 0 80 80 0 -80 80 0] # floor AttributeEnd AttributeBegin Color 0.5 0.5 0.1 # plane originally placed at z = 10, 10 units infornt of the camera Polygon "P" [ -80 -80 0.1 80 -80 0.1 80 80 0.1 -80 80 0.1] # floor AttributeEnd AttributeBegin Color 0.2 0.1 0.6 # spherical dome of radius 80, originally from z=-80 to camera plane z=0 Sphere 80 -80 0 360 AttributeEnd AttributeEnd WorldEnd