Previous Up Next

27.7.3  Rectangles in space

See Section 26.8.3 for rectangles in the plane.

The rectangle command returns and draws a rectangle. It can take its arguments in two different ways.

  1. Three points.
  2. Three points and a real number.

Examples

A,B,P:=point(0,0,0),point(3,3,3),point(0,0,3); rectangle(A,B,P)
A,B,P:=point(0,0,0),point(3,3,3),point(0,0,3); rectangle(A,B,[P,1/2])
rectangle(A,B,P,C,D); simplify(coordinates(C)),simplify(coordinates(D))
     



6
2
,−
6
2
,
6



,


6
+6
2
,
6
+6
2
,
6
+3


          

Previous Up Next