Previous Up Next

12.8.3  Rectangles in space: rectangle

See section 11.9.3 for rectangles in the plane.

The rectangle command returns and draws a rectangle. It takes as arguments one of the following:

rectangle takes optional fourth and fifth arguments, which are variables assigned to vertices C and D.
Input:

rectangle(A,B,P,C,D)

then:

simplify(coordinates(C)), simplify(coordinates(D))

Output:

[-(sqrt(6))/2,-(sqrt(6))/2,sqrt(6)],
[(-(sqrt(6))+6)/2,(-(sqrt(6))+6)/2,sqrt(6)+3]

Previous Up Next