 MakeSquare - Maple Help

geometry

 MakeSquare
 construct squares Calling Sequence MakeSquare(sqr, l) Parameters

 sqr - the name of the square l - list Description

 • 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. Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{point}\left(A,0,0\right),\mathrm{point}\left(B,2,0\right),\mathrm{point}\left(C,2,2\right),\mathrm{point}\left(F,0,2\right),\mathrm{point}\left(M,1,1\right):$
 > $\mathrm{MakeSquare}\left(\mathrm{s1},\left[A,B,'\mathrm{adjacent}'\right]\right)$
 $\left[{\mathrm{s1_1}}{,}{\mathrm{s1_2}}\right]$ (1)
 > $\mathrm{detail}\left(\mathrm{s1}\right)$
 $\left[\begin{array}{ll}{\text{name of the object}}& {\mathrm{s1_1}}\\ {\text{form of the object}}& {\mathrm{square2d}}\\ {\text{the four vertices of the square}}& \left[\left[{0}{,}{0}\right]{,}\left[{2}{,}{0}\right]{,}\left[{2}{,}{-2}\right]{,}\left[{0}{,}{-2}\right]\right]\\ {\text{the length of the diagonal}}& \sqrt{{8}}\end{array}{,}\begin{array}{ll}{\text{name of the object}}& {\mathrm{s1_2}}\\ {\text{form of the object}}& {\mathrm{square2d}}\\ {\text{the four vertices of the square}}& \left[\left[{0}{,}{0}\right]{,}\left[{2}{,}{0}\right]{,}\left[{2}{,}{2}\right]{,}\left[{0}{,}{2}\right]\right]\\ {\text{the length of the diagonal}}& \sqrt{{8}}\end{array}\right]$ (2)
 > $\mathrm{MakeSquare}\left(\mathrm{s2},\left[A,C,'\mathrm{diagonal}'\right]\right)$
 ${\mathrm{s2}}$ (3)
 > $\mathrm{MakeSquare}\left(\mathrm{s3},\left[A,'\mathrm{center}'=M\right]\right)$
 ${\mathrm{s3}}$ (4)
 > $\mathrm{detail}\left(\mathrm{s3}\right)$
 $\begin{array}{ll}{\text{name of the object}}& {\mathrm{s3}}\\ {\text{form of the object}}& {\mathrm{square2d}}\\ {\text{the four vertices of the square}}& \left[\left[{0}{,}{0}\right]{,}\left[{2}{,}{0}\right]{,}\left[{2}{,}{2}\right]{,}\left[{0}{,}{2}\right]\right]\\ {\text{the length of the diagonal}}& \sqrt{{8}}\end{array}$ (5)
 > $\mathrm{area}\left(\mathrm{s3}\right)$
 ${4}$ (6)