Previous Up Next

11.9.1  Squares in the plane: square

See section 12.8.1 for squares in space.

The square command takes two mandatory arguments and one or two optional arguments. The mandatory arguments are points A and B.

square returns and draws the square ABCD, where the square is traversed counterclockwise.
Input:

square(0,1+i)

Output:

The optional third fourth arguments need to be variable names, which will be assigned to vertex C (and D).
Input:

square(0,1+i,C,D)

Output:

Input:

affix(C), affix(D)

Output:

2*i, -1 + i

Previous Up Next