Rib
|
The tutorial explains how the world coordinate system is created in a Rib file. A sequence of
transformation commands ( |
|
|
The key points to understand about transformations are that they are,
|
# disk3.rib # applying multiple transformations Display "disk2" "framebuffer" "rgb" Projection "perspective" "fov" 40 Format 320 240 1 Translate 0 0 3 Rotate -40 1 0 0 Rotate -20 0 1 0 |
Two comments about the scene.
|
Translate 0 0 3 Rotate -40 1 0 0 Rotate -20 0 1 0 |
Next, the negative rotation of 40 degrees around the x-axis is applied to the copy. |
Translate 0 0 3 Rotate -40 1 0 0 Rotate -20 0 1 0 |
Move the transformed coordinate system 3 units along the z-axis of the camera. |
WorldBegin |
The copy of the coordinate system now becomes the primary, "world", or current coordinate system. |
Color 1 1 0.7 Polygon "P" [-0.5 0 -0.5 -0.5 0 0.5 0.5 0 0.5 0.5 0 -0.5] "st" [0 0 0 1 1 1 1 0] Color 1 0 0 Disk 0 0.25 360 |
Make yellow the current color. |
WorldEnd |
Conclude the description of the 3D scene. |
© 2002- Malcolm Kesson. All rights reserved.