The pyramid object has a rectangular cross section and tapers to a point. The following statement will display a pyramid with the center of the rectangular base at (5,2,0), pointing parallel to the x axis with a base that is 6 high (in y), 4 wide (in z), and with a length 12 from base to tip:
The pyramid object has the following attributes and default values, like those for cylinders: pos which is the center of the rectangular base (0,0,0), x (0), y(0), z(0), axis (1,0,0), length (1), color (1,1,1) which is color.white, red (1), green (1), blue (1), and up (0,1,0). Additional pyramid attributes:
height In the y direction in the simple case, default is 1
width In the z direction in the simple case, default is 1
size (length, height,
width), default is (1,1,1)
mypyramid.size=(20,10,12) sets length=20,
height=10, width=12
Note that the pos attribute for cylinder, arrow, cone, and pyramid corresponds to one end of the object, whereas for a box, sphere, or ring it corresponds to the center of the object.