geometry
MakeSquare
construct squares
Calling Sequence
Parameters
Description
Examples
MakeSquare(sqr, l)
sqr
-
the name of the square
l
list
The routine constructs a square from the given list l.
The list l can be one of the followings:
+ [p1,p2,'diagonal']: construct the square from two opposite vertices. The output is sqr which is a square.
+ [p1,p2,'adjacent']: construct the square from two adjacent vertices. The output sqr is a list of two squares.
+ [p1,'center'=c]: where p1, c are two points denoting a vertex, and the center of the square respectively. The output is sqr which is a square.
For more details on the squares, use the routine detail, i.e., detail(sqr)
The command with(geometry,MakeSquare) allows the use of the abbreviated form of this command.
with⁡geometry:
point⁡A,0,0,point⁡B,2,0,point⁡C,2,2,point⁡F,0,2,point⁡M,1,1:
MakeSquare⁡s1,A,B,adjacent
s1_1,s1_2
detail⁡s1
name of the objects1_1form of the objectsquare2dthe four vertices of the square0,0,2,0,2,−2,0,−2the length of the diagonal8,name of the objects1_2form of the objectsquare2dthe four vertices of the square0,0,2,0,2,2,0,2the length of the diagonal8
MakeSquare⁡s2,A,C,diagonal
s2
MakeSquare⁡s3,A,center=M
s3
detail⁡s3
name of the objects3form of the objectsquare2dthe four vertices of the square0,0,2,0,2,2,0,2the length of the diagonal8
area⁡s3
4
See Also
geometry[square]
Download Help Document