5.1.2 Box

The syntax of the box object is:
BOX:
  box { CORNER1, CORNER2 [BOX_MODIFIERS] }

BOX_MODIFIERS:
 [UV_MAPPING] & [OBJECT_MODIFIERS]

Figure: Boxes
Image /home/andreas/tex/Books/computer-graphics/img//obj_box.png

See also:

The object described is a cube with sides (of possibly different length) parallel to the axes and two opposite vertices CORNER1(=c) and CORNER2(=d):

$\displaystyle \{\langle x_1,x_2,x_3 \rangle: x_1\in \overline{c_1d_1},\;
x_2\in \overline{c_2d_2},\;x_3\in\overline{c_3d_3}\},
$

where $ \overline{c_id_i}$ is the segment $ \{(1-t)\,c_i+t\,d_i:0\leq t\leq 1\}$ from $ c_i$ to $ d_i$.

Again

box { c1, c2 } = box { 0, 1 scale c2-c1 translate c1 }
In order to depict a box with sides being not parallel to the axes we have to apply some rotation to a box as above:
	box { c1, c2 rotate v }

Andreas Kriegl 2003-07-23