examples - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Example Use of the Geometry Package

 

Description

Examples

References

Description

• 

To view the output from the following examples in the Standard Worksheet interface, click the Open the current help page in a worksheet window icon. Click the Execute the entire worksheet icon.

Examples

The following shows how to use the geometry package to illustrate theorems in Euclidean geometry.

Reference: Eves, Howard. A Survey of Geometry. Allyn and Bacon, 1972.

Theorem: (Feuerbach's Theorem) The nine-point circle of a triangle is tangent to the incircle and to each of the excircles of the triangle

withgeometry:

Define triangle ABC

triangleT,pointA,0,0,pointB,3,1,pointC,6,2:

Find the incircle inc of ABC

incircleinc,T,'centername'=II:

Find the excircles ex1, ex2, ex3 of ABC

excircleobj,T,ex1I1,ex2I2,ex3I3:

Find the nine-point circles ec of ABC

EulerCircleec,T,'centername'=X:

Check if inc, ex1, ex2, ex3 are tangent to ec

AreTangentec,inc;AreTangentec,ex1;AreTangentec,ex2

AreTangentec,ex3

drawinccolor=yellow,eccolor=plum,ex1color=green,Tcolor=blue,filled=false,filled=true,title=`Illustration of Feuerbach's Theorem`

Theorem: In triangle A1A2A3 let M1, M2, M3 be the midpoints of the sides A2A3, A3A1, A1A2, H1, H2, H3 the feet of the altitudes on these sides, N1, N2, N3 the midpoints of the segments A1H, A2H, A3H, where H is the orthocenter of the triangle. Then the nine points M1, M2, M3, H1, H2, H3, N1, N2, N3 lie on a circle whose center N is the midpoint of the segment joining the orthocenter H to the circumcenter O of the triangle, and whose radius is half the circumradius of the triangle.

withgeometry:

Define the triangle A1A2A3

triangleT,pointA2,0,0,pointA1,2,4,pointA3,7,0:

Find the midpoints of A2A3, A1A3, A1A2

midpointM1,A2,A3:midpointM2,A3,A1:midpointM3,A1,A2:

Find the orthocenter and circumcenter of ABC

orthocenterH,T:circumcirclec,T,'centername'=O:

Find the altitudes of ABC

altitudeA1H1,A1,T,H1:altitudeA2H2,A2,T,H2:

altitudeA3H3,A3,T,H3:

Define the points N1, N2, N3

midpointN1,A1,H:midpointN2,A2,H:midpointN3,A3,H:

circlec1,midpointN,H,O,1radiusc2:

Check if M1, M2, M3, H1, H2, H3, N1, N2, N3 are on circle c1

IsOnCircleM1,c1;IsOnCircleM2,c1;IsOnCircleM3,c1

IsOnCircleH1,c1;IsOnCircleH2,c1;IsOnCircleH3,c1

IsOnCircleN1,c1;IsOnCircleN2,c1;IsOnCircleN3,c1

drawc1filled=true,color='COLOR'RGB,1.00000000,1.00000000,0.8000000000,cfilled=true,color=green,Tcolor=blue,N,M1,M2,M3,H1,H2,H3,N1,N2,N3,H,axes=none

The following shows how to use geometry package to construct curves based on the method called an envelope of circles.

Reference: Pedoe, Dan. Geometry And The Liberal Arts. St. Martin's Press, 1978.

cardioid:

withgeometry:

Define the base circle

circlec0,pointo,0,0,1:

Generate a random point A0 on the circle which is the cusp of

the cardioid

randpointA0,c0:

Generate 80 circles which envelope the constructed cardioid

i1:n80:

whileindorandpointA||i,c0;ifevalfHorizontalCoordA0HorizontalCoordA||i0thencirclec||i,A0,A||i;ii+1end ifend do:drawseqc||i,i=0..n,printtext=false,title=`construction of a cardioid`

limacon de monsieur Pascal

withgeometry:

Define the base circle

circlec0,pointo,0,0,1:

Pick a point outside the circle

pointA0,2,0:

Generate 80 circles which envelope the constructed limacon

i1:n80:

whileindorandpointA||i,c0;ifevalfHorizontalCoordA0HorizontalCoordA||i0thencirclec||i,A0,A||i;ii+1end ifend do:drawseqc||i,i=0..n,printtext=false,title=`construction of a limacon de monsieur Pascal`

limacon without an inner loop

withgeometry:

Define the base circle

circlec0,pointo,0,0,2:

Pick a point which is inside the circle c0

pointA0,1,0:

Generate 80 circles which envelope the constructed limacon

i1:n80:

whileindorandpointA||i,c0;ifevalfHorizontalCoordA0HorizontalCoordA||i0thencirclec||i,A0,A||i;ii+1end ifend do:drawseqc||i,i=0..n,printtext=false,title=`construction of a limacon without an inner loop`

nephroid

withgeometry:

Define the base circle

circlec0,pointo,0,0,1:

Pick a diameter of c0

linel,pointM,0,2,pointN,0,2:

Generates 100 points on the circle, and for each point

Ai, construct a circle with center Ai that touches the line l

n100:

foritondorandpointA||i,c0;circlec||i,A||i,distanceA||i,lend do:drawseqc||i,i=1..n,printtext=false,title=`construction of a nephroid`

The following shows the use of transformations (translation, rotation and dilatation).

withgeometry:

An example of translation, rotation, and dilatation of circles

angletable:

n8:

foritondoanglei2Piinend do:dsegmentdseg,pointA,0,0,pointB,4,0:pointo,0,0:circlec,o,1:homothetyc1,c,32,pointM,1,0:homothetyc2,c,2,pointM,1,0:homothetyc3,c,52,pointM,1,0:translationt,c,dseg:translationtt,c1,dseg:translationttt,c2,dseg:translationtttt,c3,dseg:forito8dorotationt||i,t,anglei,counterclockwise,o;rotationtt||i,tt,anglei,counterclockwise,o;rotationttt||i,ttt,anglei,counterclockwise,o;rotationtttt||i,tttt,anglei,counterclockwise,oend do:squaresqr,pointA,8,8,pointB,8,8,pointC,8,8,pointE,8,8:drawseqopt||icolor=red,tt||icolor=green,ttt||icolor=blue,tttt||icolor=plum,i=1..n,sqrcolor='COLOR'RGB,1.00000000,1.00000000,0.8000000000,printtext=false,filled=true,axes=none,title=`An example of translation, rotation, dilatation of a circle`

References

  

Eves, Howard.  A Survey of Geometry. Allyn and Bacon, 1972.

  

Pedoe, Daniel.  Geometry and the Liberal Arts. St. Martin's Press, 1978.

See Also

geometry