with(plots): ###################################################################### ##Pverne: Save this file as Pverne . To use it, stay in the # ##same directory, get into Maple (by typing: maple ) # ##and then type: read Pverne : # ##Then follow the instructions given there # ## # ##Written by Doron Zeilberger, Rutgers University , # #zeilberg@math.rutgers.edu. # ####################################################################### #Based on PictRENE print(`This Maple package was used to create the beautiful pictures in the`): print(` webbook http://www.math.rutgers.edu/~zeilberg/PG/Nemorin.html`): print(`it is the graphical package accompanying the article`): print(` A Quick (.1 seconds!) proof of Gigoujeu's Two-Circle Theorem`): print(`By Shalosh B. Ekhad`); print(` For help with the only procedure, FNGp1, type: ezra(); `): ezra:=proc() if args=NULL then print(`Contains the following procedure: `): print(`FNGp1 `): elif nargs=1 and args[1]=FNGp1 then print(`FNGp1(a,r,theta): draws the Gigoujeau scenario `): print(` with O' being the unit circle, O is the `): print(` circle radius r center [a,0] and the point is `): print(` [a+r*cos(theta),r*sin(theta)] `): print(` Try: `): print(` FNGp1(3,2,Pi/3); `): fi: end: ezraDraw:=proc() if args=NULL then print(`Contains the following procedures: `): print(` DrawCe,DrawCeWR`): print(`DrawEl, DrawLe, DrawPt, DrawTe , ParamCircle1, zavit`): fi: end: ezraDef:=proc() if args=NULL then print(`Contains the following procedures for pictures for definitions: `): print(` AltitudeP, AREAP, CETP, CeP, CenterP, CentroidP, CircumcenterP `): print(` CircumradiusP, ColinearP, CommonTangentsMeetingPtP `): print(` ConcurrentCesP, ConcurrentP , ConcyclicP , ConicThroughPointsP `): print(` ContactP , DeSqP , `): print(` DrawPtCeChord `): print(` FtP, IncenterP , IncircleP, InradiusP `): print( ` ItIsEquilateralP, ItIsParallelogramP, ItIsSquareP, LeP,`): print(` LePtAngleP, LePtSlopeP, MidPtP `): print(` MirRefLeLeP , MirRefPtLeP, NinePointCircleP ,NormalToEllipseP `): print(` OrthocenterP , OtherCeCeP, ParEllipseP, ParPtPerBisectP,`): print(`ParamCircleP , ParamLineP , PedalP , PerpPQP, PtP, PtLeCeP `): print(` PtLiesOnCurveP, QuadP, RadicalLineP, RadiusP, SlopeP`): print(` TangentToEllipseP , TeP, TouchCeCeP`): fi: if nargs=1 and args[1]=AREAP then print(`AREAP(A,B,C): Draws the diagram for the definition of area`): print(`For example, try AREAP([0,0],[10,0],[4,3]);`): fi: if nargs=1 and args[1]=AltitudeP then print(`AltitudeP(P,A,B) `): print(`Draws the diagram for the altitude from point P to line joining A`): print(`and B (The perpendicular to line AB that passes through point P)`): print(`For example, try AltitudeP([10,0],[-2,-2],[6,6]);`): fi: if nargs=1 and args[1]=CETP then print(`CETP(A,B): Draws the diagram for the CET defintion,`): print(`For example, try CETP([0,0],[1,4]);`): fi: if nargs=1 and args[1]=CeP then print(`CeP(A,B,C): draws the circle through the three points A, B, and C`): print(`For example, try: CeP([0,0],[10,0],[6,7]);`): fi: if nargs=1 and args[1]=CenterP then print(` CenterP(c,d) Draws the diagram for the Center difinition`): print(` for the ellipse whosee center is c and axes given by the 2-list d`): print(` example, type CenterP([0,0],[2,1]); `): fi: if nargs=1 and args[1]=CentroidP then print(`CentroidP(A,B,C): Draws the diagram`): print(`for the definition of the Centroid `): print(` where A,B,C, are arbitrary points`): print(` For example, try: CentroidP([0,0],[10,0],[7,13]);`): fi: if nargs=1 and args[1]=CircumcenterP then print(` CircumcenterP(A,B,C): draws the center`): print(`of the circle through the three points A, B, and C`): print(` For example, try: CircumcenterP([0,0],[10,0],[6,7]);`): fi: if nargs=1 and args[1]=CircumradiusP then print(` CircumradiusP(A,B,C): draws the radius`): print(`of the circle through the three points A, B, and C`): print(` For example, try: CircumradiusP([0,0],[10,0],[6,7]);`): fi: if nargs=1 and args[1]=ColinearP then print(`ColinearP(L): Given a line L, draws the diagram for`): print(` the definition of Colinear`): print(` For example, try: ColinearP(y-2*x-5);`): fi: if nargs=1 and args[1]=CommonTangentsMeetingPtP then print(`CommonTangentsMeetingPtP(m,n,t1,t2) : Draws the diagram for`): print(`CommonTangentsMeetingPt Defition for the lines of slopes `): print(`TS(m,n), TS(m,n-n) and centers [t1,t1*m], [t2,t2*m]`): print(`For example, try CommonTangentsMeetingPtP(1,1/3,30,80); `): fi: if nargs=1 and args[1]=ConcurrentCesP then print(` ConcurrentCesP(C1,C2,C3): Given three points C1,C2,C3`): print(` draws the diagram for ConcurrentCes definition`): print(` for the circles that have their centers at C1,C2,C3`): print(` and pass through the origin`): print(` For example, try: ConcurrentCesP([15,5],[-3,7],[-5,-8]);`): fi: if nargs=1 and args[1]=ConcurrentP then print(`ConcurrentP(m,n,k): Given three slopes:m,n,k`): print(`draws the diagram for Concurrent definition`): print(`with the concurrency point the origin and the three`): print(`lines being of slopes m,n,k`): print(` For example, try: ConcurrentP(1,2,-3);`): fi: if nargs=1 and args[1]=ConcyclicP then print(` ConcyclicP(a,b,c,d) `): print(`draws the diagram for Concyclic definition`): print(` with the points being at angles a,b,c,d `): print(` For example, try: ConcyclicP(1,2,3,4);`): fi: if nargs=1 and args[1]=ConicThroughPointsP then print(` ConicThroughPointsP(d,a1,a2,a3,a3,a4,a5):`): pritn(`draws the diagram for ConicThroughPoints definition`): print(` with the points being at angles a1,a2,a3,a4,a5`): print(` For example, try: ConicThroughPointsP([2,1],0,1,2,3.5 ,5);`): fi: if nargs=1 and args[1]=ContactP then print(`ContactP(m,n): draws the diagram for the definition of`): print(`the contact triangle of the standard triangle Te(m,n)`): print(`For example, try ContactP(1/2,1/3);`): fi: if nargs=1 and args[1]=DeSqP then print(` DeSqP(A,B): draws the diagram for the definition of`): print(` DeSq(A,B) For example, try DeSqP([0,0],[7,4]);`): fi: if nargs=1 and args[1]=DrawPtCeChord then print(`DrawPtCeChord(P): the picture of the`): print(`tangents from a point P`): print(`to the unit circle, and the line joining them`): print(`Try: DrawPtCeChord([2,0]):`): fi: if nargs=1 and args[1]=FtP then print(` Draws the diagram for the Ft(P,Le(A,B))`): print(` For example, try FtP([10,0],[-2,-2],[6,6]);`): fi: if nargs=1 and args[1]=IncenterP then print(` IncenterP(m,n): draws the diagram for the definition of`): print(` the Incenter of the standard triangle Te(m,n)`): print(` For example, try IncenterP(1/2,1/3);`): fi: if nargs=1 and args[1]=IncircleP then print(` IncircleP(m,n): draws the diagram for the definition of`): print(` the Incircle of the standard triangle Te(m,n)`): print(` For example, try IncircleP(1/2,1/3);`): fi: if nargs=1 and args[1]=InradiusP then print(` InradiusP(m,n): draws the diagram for the definition of`): print(` the Inradius of the standard triangle Te(m,n)`): print(` For example, try InradiusP(1/2,1/3);`): fi: if nargs=1 and args[1]=ItIsEquilateralP then print(`ItIsEquilateralP(A,B): Draws the diagram for the `): print(`ItIsEquilateral defintion, with the drawn triangle being`): print(`A,C, CET(A,B)`): print(`For example, try ItIsEquilateralP([0,0],[1,24]);`): fi: if nargs=1 and args[1]=ItIsParallelogramP then print(` ItIsParallelogramP(A,B): Draws the diagram for the `): print(` ItIsParallelogram defintion, with the vertices [0,0]`): print(` A,B,A+B `): print(` For example, try ItIsParallelogramP([2,3],[5,2]); `): fi: if nargs=1 and args[1]=ItIsSquareP then print(`ItIsSquareP(A): Draws the diagram for the `): print(`ItIsSquare defintion, with the vertices [0,0]`): print(` A,B,A+B where B=[-A[2],A[1]]:`): print(` For example, try ItIsSquareP([2,3]);`): fi: if nargs=1 and args[1]=LeP then print(`LeP(A,B): Draws the diagram for Le(A,B)`): print(`For example, try :LeP([0,0],[7,4]);`): fi: if nargs=1 and args[1]=LePtAngleP then print(`LePtAngleP(A,B): draws the diagram for the definition of`): print(`LePtAngle(A,arctan(Slope(A,B))`): print(` For example, try LePtAngleP([0,0],[7,4])`): fi: if nargs=1 and args[1]=LePtSlopeP then print(`LePtSlopeP(A,B): draws the diagram for the definition of`): print(`LePtSlope(A,Slope(A,B)) For example, try LePtSlopeP([0,0],[8,16])`): fi: if nargs=1 and args[1]=MidPtP then print(`MidPtP(A,B): Draws the diagram for MitPt(A,B)`): print(`For example, try :MidPtP([0,0],[7,4]);`): fi: if nargs=1 and args[1]=MirRefLeLeP then print(`MirRefLeLeP(m,n): Draws the diagram for MirRefLeLeP(L1,L) `): print(`where L1=y-x*TS(m,-n) and L=y-x*m for example, try`): print(`MirRefLeLeP(1,1/2) `): fi: if nargs=1 and args[1]=MirRefPtLeP then print(`MirRefPtLeP(m,n): Draws the diagram for MirRefPtLeP(P,L) `): print(`where L1=y-x*TS(m,-n) and L=y-x*m for example, try`): print(`and P is on L1 with x=5`): print(`For example, try: MirRefPtLeP(1,1/2) `): fi: if nargs=1 and args[1]=NinePointCircleP then print(`NinePointCircleP(A,B,C): Given three points, A,B,C`): print(`draws the diagram showing the Nine Point Circle Definition`): print(`For example, try: NinePointCircleP([0,0],[10,0],[7,12]);`): fi: if nargs=1 and args[1]=NormalToEllipseP then print(`NormalToEllipseP(d,theta0): Draws the diagram for the`): print(`NormalToEllipse Definition for the ellipse center [0,0]`): print(` with major and minor axes d[1],d[2], and at the point with`): print(` parameter theta0 radians For example, `): print(` try NormalToEllipseP([2,1.4],2.3);`): fi: if nargs=1 and args[1]=OrthocenterP then print(`OrthocenterP(A,B,C):Given three specific (numerical) points`): print(` A,B,C, draws the diagram for the Orthocenter Definition `): print(` For example, try OrthocenterP([0,0],[10,0],[7,8]);` ): fi: if nargs=1 and args[1]=OtherCeCeP then print(`OtherCeCeP(P,Q,R,S): Given four points P,Q,R,S, draws the `): print(` diagram for Q=OtherCeCe(C1,C2,P) where C1=Ce(P,Q,R), and `): print(` C2=Ce(P,Q,S)`): print(`For example, try: OtherCeCeP([-5,-5],[5,5],[-4,0],[6,12])`): fi: if nargs=1 and args[1]=ParEllipseP then print(`ParEllipseP(d,theta0) : Draws the diagram for the`): print(`ParEllipse Definition for the ellipse center [0,0]`): print(`with major and minor axes d[1],d[2], and at the point with`): print(`parameter theta0 radians For example, try ParEllispseP([2,1.4],2.3);`): fi: if nargs=1 and args[1]=ParPtPerBisectP then print(`ParPtPerBisectP(A,B,s): Draws the diagram for ParPtPerBisect(A,B,s)`): print(`For example, try :ParPtPerBisectP([0,0],[7,4],2);`): fi: if nargs=1 and args[1]=ParamCircleP then print(`ParamCircleP(R,theta0) : Draws the diagram for the`): print(`PararmCircle Definition for the circle center [0,0]`): print(` and radius R`): print(` parameter theta0 radians For example, try ParamCircleP(2,2.3);`): fi: if nargs=1 and args[1]=ParamLineP then print(`ParamLineP(m,b,t): Draws the diagram for ParamLine(m,b,t)`): print(`For example, try : ParamLineP(1,2,2)`): fi: if nargs=1 and args[1]=PedalP then print(`PedalP(A,B,C,P): draws the diagram for the definition of`): print(` Pedal(A,B,C,P) `): print(` For example, try PedalP([0,0],[10,0],[7,10],[6,4]);`): fi: if nargs=1 and args[1]=PerpPQP then print(`PerpPQP(P,Q): Draws the diagram for PerpPQP(P,Q)`): print(`For example, try :PerpPQP([0,0],[7,4]);`): fi: if nargs=1 and args[1]=PtP then print(`PtP(A,B,C,D): Draws the diagram for PtP(Le(A,B),Le(C,D))`): print(`For example, try :PtP([-10,-4],[10,7],[-5,-5],[7,8]);`): fi: if nargs=1 and args[1]=PtLeCeP then print(`PtLeCeP(R,theta0): Draws the diagram for the PtLeCe`): print(`Definition for the circle center [0,0] and radius R`): print(`and at the point with`): print(`parameter theta0 radians For example, try PtLeCeP(4,2.3);`) fi: if nargs=1 and args[1]=PtLiesOnCurveP then print(`PtLiesOnCurveP(d,theta0): Draws the diagram for PtLiesOnCurve`): print(`for the ellipse center [0,0] and axes d`): print(`and at the point with`): print(`parameter theta0 radians For example, try PtLiesOnCurveP([4,2],2.3);`): fi: if nargs=1 and args[1]=QuadP then print(`QuadP(A,B,C,D): Draws the diagram for Quad(L1,L2,L3,L4)`): print(` for the four lines Le(A,B), Le(B,C), Le(C,D), Le(D,A)`): print(` For example, try QuadP([0,0],[2,1],[2.3,2],[1,2]);`): fi: if nargs=1 and args[1]=RadicalLineP then print(`RadicalLineP(M,R): Draws the diagram for RadicalLine(C1,C2)`): print(`for circles C1=x^2+y^2-1 and circle center M radius R`): print(`For example, try RadicalLineP([4,2],2);`): fi: if nargs=1 and args[1]=RadiusP then print(`RadiusP(R) Draws the diagram for the Radius(C) difinition`): print(` example, type RadiusP(2) `): fi: if nargs=1 and args[1]=SlopeP then print(`SlopeP(A,B): draws the diagram for the definition of`): print(`Slope(A,B) For example, try SlopeP([0,0],[7,4])`): fi: if nargs=1 and args[1]=TeP then print(` TeP(m,n): draws the diagram for the definition of`): print(` the the standard triangle Te(m,n)`): print(` For example, try TeP(1/2,1/3) `): fi: if nargs=1 and args[1]=TangentToEllipseP then print(`TangentToEllipseP(d,theta0): Draws the diagram for the`): print(`NormalToEllipse Definition for the ellipse center [0,0]`): print(` with major and minor axes d[1],d[2], and at the point with`): print(` parameter theta0 radians For example, `): print(` try TangentToEllipseP([2,1.4],2.3);`): fi: if nargs=1 and args[1]=TouchCeCeP then print(`TouchCeCeP(P): Draws the diagram for TouchCeCeP`): print(`by displaying the unit circle and the circle with center P`): print(`that touches it`): print(`For example, try: TouchCeCeP([1.5,2]));`): fi: end: ezraOri:=proc() if args=NULL then print(`For help with Drawing routines: type: ezraD();`): print(`For help with Drawing Definitions routines: type: ezraDef();`): print(`This package proves many theorems in Plane Geometry, and`): print(`draws the diagrams. To see the list of all theorems, type:`): print(` Theorems; To see the list of all Definitions, type: Definitions; `): print(`To view the statement of a given theorem: type: op(TheoremName);`): print(`To actually have Maple prove it, type: TheoremName();`): print(`To see how to draw a picture: type: ezra(TheoremNameP);`): print(` and follow the instructions.`): print(``): print(` For example, to see the statement`): print(`Of Morley's theorem, type: op(Morley); To prove it, type:`): print(` Morley(); , To see how to draw a diagram, type: ezra(MorleyP); `): print(` To draw a diagram, type, e.g., MorleyP(1/2,1/3); `): ptint(``): print(`Contains the following drawing procedures: `): print(` BrianchonP, ButterflyP, CarnotP, CentroidExistsP, CevaP `): print(` CliffordP ,DesarguesP , EightPointCircleExistsP `): print(`EulerLineExistsP , EulerTriangleFormulaP , FeuerbachP`): print(` FeuerbachConicP , FinslerHadwigerP, FNGp `): print(` FoxTalbotP , FregierP `): print(` FuhrmannP , GergonneP, GriffithsP , HerronP , HoehnP`): print(` IncenterExistsP, JohnsonP , LehmusP, LemoineP , LeonAnneP, `): print(` MenelausP, MiquelP, MongeP, MorleyP , NagelP, NapoleonP`): print(` NinePointCircleExistsP , NobbsP , OrthocenterExistsP, PappusP `): print(` PascalP , PivotP, PtolemyP, RadicalCenterExistsP , SimsonP `): print(` ThebaultP , VarignonP, VivianiP `): fi: if nops([args])=1 and op(1,[args])=BrianchonP then print(`BrianchonP(d,t): Draws Brianchon's Theorem, d is a`): print(`list of length 2 indicationg the major and minor axes`): print(`and t is a list of length 6 denoting the parameters`): print(`of the 6 points`): print(`For example, try: BrianchonP([2,3],[0,1,2,3,4,5]`); fi: if nops([args])=1 and op(1,[args])=ButterflyP then print(`ButterflyP(t): Given a list of 4 (numerical) angles in radians,`): print(`indicating the position on the circle of points A,B,C,D`): print(`draws the Butterly theorem w.r.t to chords AC, BD`): print(`For example, try: ButterflyP([0,1,2,3]):`): fi: if nops([args])=1 and op(1,[args])=CarnotP then print(`CarnotP(m,n): Draws the diagram for Carnot's Theorem`): print(`for the triangle Te(m,n). For example, try CarnotP(1/2,1/5)`): fi: if nops([args])=1 and op(1,[args])=CentroidExistsP then print(`CentroidExistsP(A,B,C): Draws the diagram`): print(`for the theorem that the Centroid Exists`): print(`where A,B,C, are arbitrary points`): print(`For example try: CentroidExistsP([0,0],[5,0],[1,4])`): fi: if nops([args])=1 and op(1,[args])=CevaP then print(`CevaP(A1,B1,C1,O1): Draws the diagram for Ceva's theorem`): print(`where A1,B1,C1, are the vertices of a triangle and`): print(`O1 is an arbitrary point for example, try`): print(`CevaP([0,0],[20,0],[10,30],[8,15]);`): fi: if nops([args])=1 and op(1,[args])=CliffordP then print(`CliffordP(a,b): Given two lists of length 4, a, b`): print(`illustrates Clifford's theorem for the four circles`): print(`x^2+y^2+a[i]*x+b[i]*y (that all pass through the origin)`): print(`For example, try: CliffordP([3,1,-3,2],[0.5,2,1,-2]);`) ; fi: if nops([args])=1 and op(1,[args])=DesarguesP then print(`DesarguesP(m,t,s):Given three numerical lists m,t,s`): print(`draws the diagram for Desagrues's Theorem where`): print(`m contain the slopes of the three collinear lines`): print(`and t and s the locations of the points of the two triangles`): print(`for example, try DesarguesP([-1/2,0,1/2],[1,2.3,3],[3.2,5.3,5.7]);`): fi: if nops([args])=1 and op(1,[args])=DrawCe then print(`DrawCe(Cir): draws the circle Cir`): fi: if nops([args])=1 and op(1,[args])=DrawCeWR then print(`DrawCeWR(Cir,theta,R,tseva): draws the circle Cir with a radius`): print(`at angle theta, labelled R of color tseva`): fi: if nops([args])=1 and op(1,[args])=DrawCeWL then print(`DrawCeWL(Cir,theta,c,tseva): draws the circle Cir with a `): print(`labal at angle theta, labelled c, with color tseva`): fi: if nops([args])=1 and op(1,[args])=DrawEl then print(`DrawEl(c,d,tseva): Given a point c, and a list of length 2, d`): print(`draws the ellipse The ellipse (x-c[1])^2/d[1]^2+(y-c[2])^2/d[2]^2=1`): pritn(` of color tseva `): print(`For example, try: DrawEl([1,2],[2,1],red);`): fi: if nops([args])=1 and op(1,[args])=DrawLe then print(`DrawLe(A,B,NA,NB): Given points A,B, and names`): print(`NA,NB draws the line segment AB with the labels NA,NB`): fi: if nops([args])=1 and op(1,[args])=DrawLeDashedC then print(`DrawLeDashedC(A,B,NA,NB,tseva): Given points A,B, and names`): print(`NA,NB draws the line segment AB with the labels NA,NB`): print(`dashed. and in color tseva`): print(`in blue `): fi: if nops([args])=1 and op(1,[args])=DrawPt then print(`DrawPt(A,NA): Given a point A, and a name NA`): print(`puts the label NA at A`): fi: if nops([args])=1 and op(1,[args])=DrawTe then print(`DrawTe(A,B,C,NA,NB,NC): Given points A,B,C, and names`): print(`NA,NB,NC, draws the triangle ABC with the labels NA,NB,NC`): fi: if nops([args])=1 and op(1,[args])=EightPointCircleExistsP then print(`EightPointCircleExistsP(e,f,g,h): Draws the diagram for the`): print(`Eight-Point Circle Theorem, with the four initial points`): print(`being A=[0,-e], B=[f,0], C=[0,g], and D=[-h,0]`): print(`for example, try: EightPointCircleExistsP(1,2,3,6);`): fi: if nops([args])=1 and op(1,[args])=EulerLineExistsP then print(`EulerLineExistsP(A,B,C): Draws the diagram for the`): print(`theorem that Euler Line Exists`): print(`For example, try:EulerLineExistsP([0,0],[20,0],[5,10]):`): fi: if nops([args])=1 and op(1,[args])=EulerTriangleFormulaP then print(`EulerTriangleFormulaP(m,n): Draws the diagram for`): print(`Euler's Triangle Formula for the standard triangle`): print(`with parameters m,n. For example, try:`): print(` EulerTriangleFormulaP(1/3,1/5):`): fi: if nops([args])=1 and op(1,[args])=FeuerbachP then print(`FeuerbachP(m,n):Draws the diagram for Feuerbach's Theorem`): print(`for the standart triangle with parameters m and n`): print(`for example, try FeuerbachP(1/2,1/4)`): fi: if nops([args])=1 and op(1,[args])=FeuerbachConicP then print(`FeuerbachConicP(c,d): Draws the diagram for the Feuerbach Conic`): print(`theorem for the triangle whose vertices are [0,0],[1,0],[c,d]`): print(`Needs more work to make it less messy`): print(`For example try:FeuerbachConicP(2/5,4/5);`): fi: if nops([args])=1 and op(1,[args])=FinslerHadwigerP then print(`FinslerHadwigerP(a,b) : draws the diagram for Finsler-Hadwiger's `): print(`theorem, with one of the squares being with vertices`): print(`[0,0],[-1,0],[-1,1],[0,1] and the other [0,0], [a,b] etc. .`): print(`For example: try FinslerHadwigerP(2,5) `): fi: if nargs=1 and args[1]=FNGp then print(`FNGp(a,r,theta): draws the Gigoujeau scenario`): print(`with O' being the unit circle, O is the`): print(`circle radius r center [a,0] and the point is`): print(`[a+r*cos(theta),r*sin(theta)]`): print(`Try:`): print(`FNGp(5,2,Pi/3);`): fi: if nops([args])=1 and op(1,[args])=FoxTalbotP then print(`FoxTalbotP(C,D,E): Given five points, A=[0,0],B=[1,0],and C,D,E `): print(`draws the diagram for the Fox-Talbot theorem`): print(` for the five lines: AB, BC, CD, DE, EA `): print(`For example, try: FoxTalbotP([3,2],[5/2,4],[1/3,5])`): fi: if nops([args])=1 and op(1,[args])=FregierP then print(`FregierP(d,thera):Diagram for Fergier's Theorem for an ellipse`): print(`where d is a list of length 2 [MajorAxis,MinorAxis]`): print(`and theta is the parameter of P[0]`): print(`For example, try: FregierP([2,1],Pi/3);`): fi: if nops([args])=1 and op(1,[args])=FuhrmannP then print(`FuhrmannP(t): Given a list of 6 angles (in radians)`): print(`draws the diagram for Fuhrmann's Theorem`): print(` For example, try: FuhrmannP([0,1,2,3,4,6]`): fi: if nops([args])=1 and op(1,[args])=ParamCircle then print(`ParamCircle1(c,R,t):`): print(`A Generic point on a Parametric circle center [c[1],c[2]]`): print(` and radius R, while t is a numerical (an angle in radians)`): fi: if nops([args])=1 and op(1,[args])=GergonneP then print(`GergonneP(m,n): Draws the diagram for Gergonne's Theorem`): print(`for the standard triangle Te(m,n)`): print(`For example, try: GergonneP(1/2,3/4);`): fi: if nops([args])=1 and op(1,[args])=GriffithsP then print(`GriffithsP(a,b,m,x1,x2): Draws the diagram for Griffiths's`): print(`Theorem for the triangle with vertices [0,0],[10,0],[a,b],`): print(`and a line of slope m (throgh the circumcenter) and two points`): print(`on that line, whose x-coordinates differ `): print(`from the x-coordinate of the circumcenter by x1 and x2 `): print(`For example, try GriffithsP(9,7,3,1,3);`): fi: if nops([args])=1 and op(1,[args])=HerronP then print(`HerronP(): Draws the diagram for Herron's Formula`): fi: if nops([args])=1 and op(1,[args])=HoehnP then print(`HohenP(V3,V4,V5): draws the diagram for Hoehn's theorem for`): print(`the pentagram whose vertices are [0,0],[10,0] and the points `): print(` V3,V4,V5 `): print(`For example, try HoehnP([14,5],[10,10],[5,8])`); fi: if nops([args])=1 and op(1,[args])=IncenterExistsP then print(`IncenterExistsP(m,n): draws the diagram for the theorem that`): print(`the three angle-bisectors are concurrent`): print(`For example, try: IncenterExistsP(1/2,1/3)`): fi: if nops([args])=1 and op(1,[args])=JohnsonP then print(`JohnsonP(t):Draws the diagram for Johnson's Thm for`): print(`the 3 points on the unit circle with angles given `): print(`in radians by the list of length 3, t`): print(`For exampla, try: JohnsonP([0,2,4]);`): fi: if nops([args])=1 and op(1,[args])=LehmusP then print(`LehmusP(m,n): Draws the diagram for Lehmus's Theorem`): print(`for the standard triangle Te(m,n)`): print(`For example, try: LehmusP(1/2,1/3);`): fi: if nops([args])=1 and op(1,[args])=LemoineP then print(`LemoineP(m,n): Draws the diagram for Lemoine's theorem that`): print(`the Lemoine point exists for the standard triangle`): print(`Te(m,n). For example, try LemoineP(1/2,1/3)`): fi: if nops([args])=1 and op(1,[args])=LeonAnneP then print(`LeonAnneP(A,B,C,D,x1): Given four points A,B,C,D, and`): print(`a real number x1, draws the diagram for Leon Anne's Theorem`): print(`For example, try: LeonAnneP([0,0],[4,0],[3,2],[1,1],2/3);`): fi: if nops([args])=1 and op(1,[args])=MenelausP then print(`MenelausP(A1,B1,C1,z1,y1): Draws the Diagram for Menalaus's`): print(`Theorem. Where A1, B1,C1 are points,z1>1 and 01 and 00 then lu:=lu[1]: else lu:=lu[2]: fi: eq2:=TouchCeLe1(Ci1,Le(A,M)): eq2:=numer(normal(subs(p2=lu,eq2))): lua:=solve(eq2,p1): SOL:=[seq([lua[i], subs(p1=lua[i],lu)],i=1..nops([lua]))]: for i from 1 to nops(SOL) do for j from i+1 to nops(SOL) do if Colinear(I1,SOL[i],SOL[j]) then pic:=pic,DrawPtP(I1,` I `,[0,.03]): pic:=pic,plot([I1,SOL[i]],color=blue),plot([I1,SOL[j]],color=blue), plot([SOL[i],SOL[j]],color=blue): Ci1a:=(x-SOL[i][1])^2+(y-SOL[i][2])^2-SOL[i][2]^2: Ci1b:=(x-SOL[j][1])^2+(y-SOL[j][2])^2-SOL[j][2]^2: pic:=pic,DrawCeG(Ci1a),DrawCeG(Ci1b): fi: od: od: pic:=pic,DrawCeB(Ci),DrawPtP(M, ` M `,[0,-.04]),plot([T[3],M],color=black): pic:=pic,plotP({M,I1}): display(pic): end: #VarignonP(A): Given a list A of four points, draws #the diagram for Varignon's Theorem for the convex #quadilateral A[1]A[2]A[3]A[4], for example #try: VarignonP([[0,0],[10,0],[10,15],[4,9]]); VarignonP:=proc(A) local M,i,pic: for i from 0 to 3 do M[i+1]:= MidPt(A[i+1],A[(i+1 mod 4)+1]) od: pic:=plot([A[1],A[2],A[3],A[4],A[1]],axes=none,title=`Varignon's Thm`, scaling=CONSTRAINED): pic:=pic,plot([M[1],M[2],M[3],M[4],M[1]],color=blue): pic:=pic, DrawPtP(A[1],` A0`,[-0.3,-.5]),DrawPtP(A[2],` A1`,[0,-.5]), DrawPtP(A[3],` A2`,[.4,.4]), DrawPtP(A[4],` A3`,[-.4,.4]): pic:=pic,DrawPtP(M[1],` M0`,[0,-.5]), DrawPtP(M[2],` M1`,[.7,0]),DrawPtP(M[3],` M2`,[-.7,0.3]), DrawPtP(M[4],` M3`,[-.6,0.2]): pic:=pic,plotP({M[1],M[2],M[3],M[4],A[1],A[2],A[3],A[4]}): display(pic): end: #VivianiP(P): Draws the diagram for Viviani's Theorem #for the point P inside the unit standard equlilaterla #trianglle. For example, try VivianiP([2/3,1/5]); VivianiP:=proc(P) local T,A,B,C,pic,A1,B1,C1,C11: T:=Te(1/sqrt(3),1/sqrt(3)): A:=T[1]:B:=T[2]:C:=T[3]: pic:=plot([A,B,C,A],axes=none,title=`Viviani's Theorem`,scaling=CONSTRAINED): pic:=pic,DrawPt(P, ` P `): C1:=Ft(P,Le(A,B)): B1:=Ft(P,Le(A,C)): A1:=Ft(P,Le(B,C)): C11:=Ft(C,Le(A,B)): pic:=pic,plot([P,C1],color=blue,linestyle=2), plot([P,A1],color=blue,linestyle=2), plot([P,B1],color=blue,linestyle=2),plot([C,C11],color=gold,linestyle=2): pic:=pic,DrawPtP(A,` A `,[-.05,0]), DrawPtP(B,` B `,[.05,0]),DrawPtP(C,` C `,[0,.05]): pic:=pic,DrawPtP(A1,` A1`,[.07,0.02]), DrawPtP(B1,` B1`,[-.05,.02]),DrawPtP(C1,` C1`,[0,-.05]), DrawPtP(C11,` C2`,[0,-.05]): pic:=pic,plotP({A,B,C,A1,B1,C1,C11,P}): display(pic): end: ########################################################### #RENE: A MAPLE PACKAGE FOR STATING AND PROVING # #THEOREMS IN GEOMETRY; Save as RENE, go into # # Maple, and type: read RENE: # ########################################################### #Written by Doron Zeilberger, Rutgers University #Version of Sept. 28, 1999 #Tested on Maple V, ver. 5 and below #Thanks to Wolfram Koepf for pointing out that the previous version #did not work on Maple V, ver. 5 #First Version Written: May 8, 1998 #Thanks: May 31, 1998 (thanks to Michael Somos for spotting a bug) #The most current version is available from #http://www.math.rutgers.edu/~zeilberg/ Theorems:=[AreaFormula,Bretschneider,Brianchon,Butterfly,Carnot,Casey, CentroidExists,Ceva,Clifford,Desargues,EightPointCircleExists, EulerLineExists,EulerTetrahedronVolumeFormula,EulerTriangleFormula, Feuerbach,FeuerbachConic,FinslerHadwiger,FoxTalbot,Fregier,Fuhrmann,Gergonne, Griffiths,Herron,Hoehn,IncenterExists,Johnson,Lehmus,Lemoine,LeonAnne, MarionMorgan, MedianTriangleLocus,Menelaus,MiquelRandom,Monge,Morley,Napoleon, NinePointCircleExists,Nobbs,OrthocenterExists,Pappus,Pascal,Pivot,Poncelet, Ptolemy,Purser,RadicalCenterExists,Simson,Soddy,Thebault,Varignon,Viviani, vonAubel,Wittenbauer]: Definitions:=[Altitude,AntiMedial, AnyPtBetween, AREA,Billiard, BilliardSym,Ce,Center, Centroid,CentroidQ,CET,Circumcenter,Circumradius, Colinear,ComTangLgtSq,Concyclic,Concurrency,Concurrent,ConicThroughPoints, Contact,De,DePtLeSq, DeSq,DeSqG,EulerLine,Ft,GegonnePt,Incenter,Incircle,Inradius,ItIsEquilateral, ItIsParallelogram, ItIsSquare, ItIsZero,Kiss,Le,LePtAngle, LePtSlope, MDOS,MidPt,MirRefPtLe,MirRfPtPt,MirRefOf0,NinePointCircle, NormalToEllipse,Orthocenter,OtherCeCe,ParamCircle,ParamLine,ParEllipse,Pedal, PerpMid,PerpPQ, pmidpt, pqPt, Powe, Pt,PtCeCe, PtLeCe,PtLiesOnCurve,Quad,RadicalCenter, RadicalLine, Radius, Slope,Sqabc,SSR,SSR1,Te,TS, Tangent,TangentToEllipse, CommonTangentsMeetingPt,TouchCe,TouchCe1,TouchCeLe, TouchCeLe1,TcCesOut]: MonthlyProblems:=[P10637,P10673, P10678, P10693, P10703,P10710,P10734, P10749,P10780, P10783, P10796, P10804,P10845,P10874,P10895]: IMO:=[I78_4, I79_3, I82_2, I82_5]: ##########################Part I: THEOREMS############ AreaFormula:=proc() local A,B,C: ItIsZero(DeSq(A,B)*DeSq(C,Ft(C,Le(A,B)))/4-AREA(A,B,C)^2):end: Bretschneider:=proc() local A,B,C,D: ItIsZero(16*(AREA(A,B,C)+AREA(A,C,D))^2- 4*DeSq(A,C)*DeSq(B,D)+(DeSq(B,C)+DeSq(D,A)-DeSq(A,B)-DeSq(C,D))^2):end: Brianchon:=proc() local Li,t,i,c,d,P: for i from 0 to 5 do Li[i]:=TangentToEllipse(c,d,t[i]): od: for i from 0 to 5 do P[i]:=Pt(Li[i],Li[i+1 mod 6]): od: Concurrent(Le(P[0],P[3]),Le(P[1],P[4]),Le(P[2],P[5])):end: Butterfly:=proc() local P,t,i,R,Li,M,X,Y:for i from 1 to 4 do P[i]:=ParamCircle([0,0],R,t[i]) od:M:=Pt(Le(P[1],P[3]),Le(P[2],P[4])): Li:=PerpPQ([0,0],M):X:=Pt(Le(P[1],P[4]),Li):Y:=Pt(Le(P[2],P[3]),Li): ItIsZero(DeSq(M,X)-DeSq(M,Y)):end: Carnot:=proc() local m,n,T,O,O1,O2,O3,gu:T:=Te(m,n):O:=Circumcenter(T): O1:=Ft(O,Le(T[2],T[3])):O2:=Ft(O,Le(T[1],T[3])):O3:=Ft(O,Le(T[1],T[2])): SSR1([DeSq(O,O1),DeSq(O,O2),DeSq(O,O3),Circumradius(T)^2,Inradius(m,n)^2],0): end: Casey:=proc() local t,P,C,R,i,j:t[1]:=1: for i from 1 to 4 do P[i]:=ParamCircle([0,0],1,t[i]): od: for i from 1 to 4 do C[i]:=[(1-R[i])*P[i][1],(1-R[i])*P[i][2]]:od: for i from 1 to 4 do for j from i+1 to 4 do t[i,j]:=simplify( ComTangLgtSq(C[i],R[i],C[j],R[j])^2,symbolic): od:od: SSR1([t[1,2]*t[3,4],t[1,3]*t[2,4],t[1,4]*t[2,3]],0):end: CentroidExists:=proc() local A,B,C: Concurrent(Le(MidPt(A,B),C),Le(MidPt(A,C),B),Le(MidPt(B,C),A)):end: Ceva:=proc() local A,B,C,O,D,E,F: A:=[0,0]: B:=[1,0]: D:=Pt(Le(B,C),Le(A,O)):E:=Pt(Le(A,C),Le(B,O)):F:=Pt(Le(A,B),Le(C,O)):ItIsZero( DeSq(B,D)*DeSq(C,E)*DeSq(A,F)-DeSq(D,C)*DeSq(E,A)*DeSq(F,B)): end: #The Contact Triangle of the Standard Triangle Te(m,n) Contact:=proc(m,n) local T,C:T:=Te(m,n):C:=Incenter(m,n): Ft(C,Le(T[2],T[3])),Ft(C,Le(T[1],T[3])),Ft(C,Le(T[1],T[2])):end: Clifford:=proc()local a,b,C,i,j,P,k: a[1]:=-2: b[1]:=0: for i from 1 to 4 do C[i]:=x^2+y^2+a[i]*x+b[i]*y: od: for i from 1 to 4 do for j from i+1 to 4 do P[i,j]:=OtherCeCe(C[i],C[j],[0,0]):od:od: for i from 1 to 4 do for j from i+1 to 4 do for k from j+1 to 4 do C[i,j,k]:= Ce(P[i,j],P[i,k],P[j,k]):od:od:od: ConcurrentCes(C[1,2,3],C[1,2,4],C[1,3,4],C[2,3,4]): end: Desargues:=proc() local A,B,i,m,t,s: for i from 1 to 3 do A[i]:=ParamLine(m[i],0,t[i]): B[i]:=ParamLine(m[i],0,s[i]):od: Colinear(Pt(Le(A[1],A[2]),Le(B[1],B[2])),Pt(Le(A[1],A[3]),Le(B[1],B[3])), Pt(Le(A[2],A[3]),Le(B[2],B[3]))):end: EightPointCircleExists:=proc() local A,B,C,D,e,f,g,h,a,b,c,d,a1,b1,c1,d1: A:=[0,-e]:B:=[f,0]:C:=[0,g]:D:=[-h,0]: a:=MidPt(A,B):b:=MidPt(B,C):c:=MidPt(C,D):d:=MidPt(D,A): a1:=Ft(a,Le(C,D)):b1:=Ft(b,Le(D,A)):c1:=Ft(c,Le(A,B)):d1:=Ft(d,Le(B,C)): Concyclic(a,b,c,d,a1,b1,c1,d1):end: EulerLineExists:=proc() local A,B,C,H,M,O: H:=Orthocenter(A,B,C):O:=Circumcenter(A,B,C):M:=Centroid(A,B,C): Colinear(H,M,O):end: EulerTetrahedronVolumeFormula:=proc() local P1,P2,P3,P4,P,Q,R,A,B,C,Vol, p31,p32,p41,p42,p43: with(linalg):P1:=[0,0,0]: P2:=[1,0,0]:P3:=[p31,p32,0]: P4:=[p41,p42,p43]:P:=DeSqG(P1,P4,3):Q:=DeSqG(P2,P4,3):R:=DeSqG(P3,P4,3): A:=DeSqG(P2,P3,3):B:=DeSqG(P3,P1,3):C:=DeSqG(P1,P2,3): Vol:=AREA([p31,p32],[1,0],[0,0])*p43/3:evalb(normal(det(array([[0,P,Q,R,1], [P,0,C,B,1],[Q,C,0,A,1],[R,B,A,0,1],[1,1,1,1,0]]))/Vol^2/288)=1):end: EulerTriangleFormula:=proc() local T,m,n,A,B,C,d,R,r,O,I1: T:=Te(m,n):A:=T[1]:B:=T[2]:C:=T[3]:I1:=Incenter(m,n): O:=Circumcenter(A,B,C):r:=Inradius(m,n):R:=Circumradius(A,B,C): d:=sqrt(DeSq(O,I1)): ItIsZero((d^2-R^2)^2-4*r^2*R^2):end: Feuerbach:=proc() local m,n:TouchCe(NinePointCircle(Te(m,n)),Incircle(m,n)):end: FeuerbachConic:=proc() local A,B,C,H,C1,c,d: A:=[0,0]:B:=[1,0]:C:=[c,d]: H:=Orthocenter(A,B,C): C1:=Center(ConicThroughPoints([A,B,C,H])): PtLiesOnCurve(C1,NinePointCircle(A,B,C)):end: FinslerHadwiger:=proc() local a,b,A,B,C,D,B1,C1,D1,Q,R,S,T:A:=[0,0]:B:=[-1,0]: C:=[-1,1]:D:=[0,1]:B1:=[a,b]:C1:=[a+b,b-a]:D1:=[b,-a]:Q:=MidPt(D,B1): S:=MidPt(B,D1):R:=Pt(Le(B,D),Le(A,C)):T:=Pt(Le(B1,D1),Le(A,C1)): ItIsSquare(Q,T,S,R):end: FinslerHadwigerOld:=proc() local a,b,A,B,C,D,B1,C1,D1,Q,R,S,T:A:=[0,0]:B:=[-1,0]: C:=[-1,1]:D:=[0,1]:B1:=[a,b]:C1:=[B1[1]+b,B1[2]-a]:D1:=[b,-a]:Q:=MidPt(D,B1): S:=MidPt(B,D1):R:=Pt(Le(B,D),Le(A,C)):T:=Pt(Le(B1,D1),Le(A,C1)):evalb( ItIsZero(DeSq(Q,T)-DeSq(T,S)) and ItIsZero(DeSq(Q,T)-DeSq(Q,R)) and ItIsZero(DeSq(Q,T)-DeSq(R,S)) and ItIsZero(Slope(Q,R)*Slope(Q,T)+1)):end: FoxTalbot:=proc() local q,L,i,a,b,c,j,M: L[1]:=x: for i from 2 to 5 do L[i]:= a[i]*x+b[i]*y+c[i]: od: for i from 1 to 5 do q:=Quad(seq(L[j],j=1..i-1),seq(L[j],j=i+1..5)):M[i]:=Le(MidPt(q[1],q[3]), MidPt(q[2],q[4])):od: Concurrent(seq(M[i],i=1..5)):end: Fregier:=proc()local d,t0,t1,s1,t2,s2,P0,P1,P2,Q0,Q1,Q2,X1,X2: P1:=ParEllipse([0,0],d,t1): P2:=ParEllipse([0,0],d,t2): Q1:=ParEllipse([0,0],d,s1): Q2:=ParEllipse([0,0],d,s2): P0:=ParEllipse([0,0],d,t0): P2:=subs(t2=solve(Slope(P0,P1)*Slope(P0,P2)=-1,t2),P2): Q2:=subs(s2=solve(Slope(P0,Q1)*Slope(P0,Q2)=-1,s2),Q2): Concurrent(NormalToEllipse([0,0],d,t0),Le(P1,P2),Le(Q1,Q2)): end: Fuhrmann:=proc() local P,Q,R,L,M,N,a,b,c,a1,b1,c1,e,f,g,t2,t3,t4,t5,t6,A,B,gu: P:=ParamCircle([0,0],1,1):Q:=ParamCircle([0,0],1,t2): R:=ParamCircle([0,0],1,t3):L:=ParamCircle([0,0],1,t4): M:=ParamCircle([0,0],1,t5):N:=ParamCircle([0,0],1,t6): a:=DeSq(L,M):b:=DeSq(R,Q):c:=DeSq(N,P):a1:=DeSq(P,Q):b1:=DeSq(M,N): c1:=DeSq(L,R): e:=DeSq(R,N):f:=DeSq(L,P):g:=DeSq(M,Q): SSR1([a*a1*e,b*b1*f,c*c1*g,a*b*c,a1*b1*c1,e*f*g],0):end: Gergonne:=proc() local m,n,T,Ci,A,B,C: T:=Te(m,n):A:=T[1]:B:=T[2]:C:=T[3]: Ci:=Incircle(m,n): Concurrent(Le(A,PtLeCe(Le(B,C),Ci)),Le(B,PtLeCe(Le(A,C),Ci)), Le(C,PtLeCe(Le(A,B),Ci))):end: Griffiths:=proc() local a,b,A,B,C,D,P1,P2,m,x1,x2,c1,c2,c3: A:=[0,0]:B:=[1,0]:C:=[a,b]: D:=Circumcenter(A,B,C): P1:=[D[1]+x1,D[2]+m*x1]: P2:=[D[1]+x2,D[2]+m*x2]: c1:=Ce(Pedal(A,B,C,P1)):c2:=Ce(Pedal(A,B,C,P2)):c3:=NinePointCircle(A,B,C): ConcurrentCes(c1,c2,c3): end: Herron:=proc() local q,a,b,c,s,A,B,C,b1,a2,b2,Area:A:=[0,0]:B:=[0,b1]: C:=[a2,b2]:a:=sqrt(DeSq(B,C)):b:=sqrt(DeSq(A,C)):c:=sqrt(DeSq(A,B)): s:=(a+b+c)/2: ItIsZero(AREA(A,B,C)^2-s*(s-a)*(s-b)*(s-c)):end: Hoehn:=proc() local V1,V2,V3,V4,V5,W1,W2,W3,W4,W5:V1:=[0,0]:V2:=[10,0]: W1:=Pt(Le(V1,V3),Le(V2,V5)):W2:=Pt(Le(V1,V3),Le(V2,V4)):W3:=Pt(Le(V3,V5), Le(V2,V4)):W4:=Pt(Le(V1,V4),Le(V3,V5)):W5:=Pt(Le(V1,V4),Le(V2,V5)): ItIsZero(DeSq(V1,W1)*DeSq(V2,W2)*DeSq(V3,W3)*DeSq(V4,W4)*DeSq(V5,W5)- DeSq(V1,W5)*DeSq(V2,W1)*DeSq(V3,W2)*DeSq(V4,W3)*DeSq(V5,W4)):end: IncenterExists:=proc() local m,n,A,B,C,T:T:=Te(m,n):A:=T[1]:B:=T[2]: C:=T[3]:Concurrent(LePtSlope(A,m),LePtSlope(B,-n),LePtSlope(C,TS(m,1/n))): end: IncenterExistsOld:=proc() local m,n,A,B,C,T:T:=Te(m,n):A:=T[1]:B:=T[2]: C:=T[3]:Concurrent(y-m*x,y+n*x-n,y-C[2]-(x-C[1])*TS(m,1/n)):end: Johnson:=proc() local C,t,i,R,P,O: O:=[0,0]: for i from 0 to 2 do C[i]:=ParamCircle(O,R,t[i]): od: for i from 0 to 2 do P[i]:=MirRefPtLe(O,Le(C[i],C[i+1 mod 3])) : od: ItIsZero(Radius(Ce(P[0],P[1],P[2]))^2-R^2): end: Lehmus:=proc() local N,M,m,n,T,A,B,C: T:=Te(m,n):A:=T[1]:B:=T[2]:C:=T[3]: N:=Pt(LePtSlope(A,TS(m,m)),LePtSlope(B,TS(-n))): M:=Pt(LePtSlope(A,TS(m)),LePtSlope(B,TS(-n,-n))): ItIsZero(subs(m=n,factor(DeSq([1,0],N)-DeSq([0,0],M)))):end: Lemoine:=proc() local m,n,T,A,B,C,G,BisectorA,BisectorB,BisectorC: T:=Te(m,n):A:=T[1]:B:=T[2]:C:=T[3]: BisectorA:=LePtSlope(A,m): BisectorB:=LePtSlope(B,-n): BisectorC:=LePtSlope(C,TS(m,1/n)): G:=Centroid(T): Concurrent (MirRefLeLe(Le(A,G),BisectorA), MirRefLeLe(Le(B,G),BisectorB), MirRefLeLe(Le(C,G),BisectorC) ): end: LeonAnne:=proc() local A,B,C,D,O,l,p,M1,M2: M1:=MidPt(A,C): M2:=MidPt(B,D): O:=AnyPtBetween(M1,M2,p): ItIsZero(1/2-(AREA(A,B,O)+AREA(C,D,O))/(AREA(A,B,C)+AREA(A,C,D) )):end: #The Morgan generalization of Marion Walter's Theorem MarionMorgan:=proc() local a,b,n,A,B,C,A1,A2,B1,B2,C1,C2,P1,P2,P3,P4,P5,P6: A:=[0,0]: B:=[1,0]: C:=[a,b]: C1:=pmidpt(A,B,n/(2*n+1)):C2:=pmidpt(A,B,(n+1)/(2*n+1)): A1:=pmidpt(B,C,n/(2*n+1)):A2:=pmidpt(B,C,(n+1)/(2*n+1)): B1:=pmidpt(C,A,n/(2*n+1)):B2:=pmidpt(C,A,(n+1)/(2*n+1)): P1:= Pt(Le(A,A1),Le(B,B2)):P2:= Pt(Le(A,A1),Le(C,C2)):P3:=Pt(Le(B,B1),Le(C,C2)): P4:=Pt(Le(B,B1),Le(A,A2)):P5:=Pt(Le(C,C1),Le(A,A2)):P6:=Pt(Le(C,C1),Le(B,B2)): ItIsZero((AREA(P1,P2,P3)+AREA(P1,P3,P4)+AREA(P1,P4,P5)+ AREA(P1,P5,P6))/AREA(A,B,C)-2/(3*n+1)/(3*n+2)): end: MedianTriangleLocus:=proc() local s,p,A,B,C,T,R,P,Q,a,b,c,m,n,gu: T:=AntiMedial(Te(m,n)):A:=T[1]:B:=T[2]:C:=T[3]:R:=Pedal(Te(m,n),Incenter(m,n)): c:=-sqrt(factor(DeSq(A,B))):b:=-sqrt(factor(DeSq(A,C))): a:=sqrt(factor(DeSq(C,B))):s:=normal((a+b+c)/2): P:=[A[1]+(p/c)*(B[1]-A[1]),A[2]+(p/c)*(B[2]-A[2])]:Q:=[A[1]+((s-p)/b)* (C[1]-A[1]),A[2]+((s-p)/b)*(C[2]-A[2])]: gu:=AREA(R[2],R[3],MidPt(P,Q)):gu:=simplify(gu,symbolic):gu:=simplify(gu): ItIsZero(gu):end: Menelaus:=proc() local A,B,C,X,Y,Z,l,m,b: l:=y-m*x-b: X:=Pt(Le(B,C),l): Y:=Pt(Le(A,C),l):Z:=Pt(Le(A,B),l):ItIsZero( DeSq(B,X)*DeSq(C,Y)*DeSq(A,Z)-DeSq(C,X)*DeSq(A,Y)*DeSq(B,Z)): end: Miquel:=proc() local r,A,P,C,t,i,s: print(`This is too big for Maple, so it is here for the future versions`): print(`Meanwhile try MiquelRandom();`): for i from 0 to 3 do A[i]:=ParamCircle([0,0],1,t[i]): od: for i from 0 to 3 do C[i]:=ParPtPerBisect(A[i],A[(i+1) mod 4],s[i]): od: for i from 0 to 3 do P[i]:=MirRefPtLe(A[i],Le(C[(i-1) mod 4],C[i])):od: Concyclic(P[0],P[1],P[2],P[3]):end: MiquelRandom:=proc() local r,A,P,C,t,i,s:print(`This is too big for Maple`): print(`Hence, let's pick random values, giving an empirical proof`): r:=rand(1..1000): for i from 0 to 3 do t[i]:=r():s[i]:=r():od: for i from 0 to 3 do A[i]:=ParamCircle([0,0],1,t[i]): od: for i from 0 to 3 do C[i]:=ParPtPerBisect(A[i],A[(i+1) mod 4],s[i]): od: for i from 0 to 3 do P[i]:=MirRefPtLe(A[i],Le(C[(i-1) mod 4],C[i])):od: print(`Miquel's theorem is (empirically)`):Concyclic(P[0],P[1],P[2],P[3]):end: Monge:=proc() local d1,d2,d3,C1,C2,C3,R1,R2,R3,a,b: d2:=d3*sin(b)/sin(a+b):d1:=d3*sin(a)/sin(a+b): C1:=[0,0]: C2:=[d3,0]: C3:=[d2*cos(a),d2*sin(a)]: Colinear(CommonTangentsMeetingPt(C1,R1,a,d2,R3), CommonTangentsMeetingPt(C3,R3,-b,d1,R2), CommonTangentsMeetingPt(C1,R1,0,d3,R2)):end: Morley:=proc() local a,b,c,A,B,C,D,E,F,TriA1,TriA2,AC,BC, TriB1,TriB2,TriC1,TriC2: A:=[0,0]:B:=[1,0]: c:=Pi/3-a-b: AC:=LePtAngle(A,3*a): BC:=LePtAngle(B,-3*b): C:=Pt(AC,BC): TriA1:=LePtAngle(A,a):TriA2:=LePtAngle(A,2*a): TriB1:=LePtAngle(B,-b):TriB2:=LePtAngle(B,-2*b): TriC1:=LePtAngle(C,3*a+c):TriC2:=LePtAngle(C,3*a+2*c): D:=Pt(TriA1,TriB1): E:=Pt(TriA2,TriC1): F:=Pt(TriB2,TriC2): ItIsEquilateral(D,E,F):end: MorleyFast:=proc() local m,n,A,B,C,D,E,F:A:=[0,0]:B:=[1,0]: C:=Pt(y-TS(m,m,m)*x,y+TS(n,n,n)*(x-1)):D:=Pt(y-m*x,y+n*x-n): E:=Pt(y-TS(m,m)*x,y-C[2]-(x-C[1])*TS(m,m,-n,sqrt(3))): F:=Pt(y+TS(n,n)*(x-1),y-C[2]+(x-C[1])*TS(n,n,-m,sqrt(3))): ItIsEquilateral(D,E,F):end: Nagel:=proc() local m,n,T:T:=Te(m,n):Concurrent( Le(T[1],PtLeCe(Le(T[2],T[3]),Incircle(m,-1/n))), Le(T[2],PtLeCe(Le(T[1],T[3]),Incircle(-1/m,n))), Le(T[3],PtLeCe(Le(T[1],T[2]),Incircle(-1/m,-1/n)))):end: Napoleon:=proc() local A,B,C: ItIsEquilateral(CET(A,B),CET(B,C),CET(C,A)): end: NinePointCircleExists:=proc() local A,B,C,O,D,E,F,G,H,I,K,L,M: D:=Ft(A,Le(B,C)):E:=Ft(B,Le(A,C)):F:=Ft(C,Le(A,B)): G:=MidPt(A,B):H:=MidPt(A,C):I:=MidPt(B,C):O:=Orthocenter(A,B,C): K:=MidPt(O,A):L:=MidPt(O,B):M:=MidPt(O,C):Concyclic(D,E,F,G,H,I,K,L,M):end: Nobbs:=proc() local m,n,T,S:T:=Te(m,n):S:=Contact(m,n): Colinear(Pt(Le(T[1],T[2]),Le(S[1],S[2])),Pt(Le(T[2],T[3]),Le(S[2],S[3])), Pt(Le(T[1],T[3]),Le(S[1],S[3]))):end: OrthocenterExists:=proc() local A,B,C: Concurrent(Altitude(A,Le(B,C)),Altitude(B,Le(A,C)),Altitude(C,Le(A,B))):end: Pappus:=proc() local t,s,m,b,m1,b1,i,P,Q: for i from 1 to 3 do P[i]:=ParamLine(m,b,t[i]): Q[i]:=ParamLine(m1,b1,s[i]): od: Colinear(Pt(Le(P[1],Q[2]),Le(P[2],Q[1])),Pt(Le(P[1],Q[3]),Le(P[3],Q[1])), Pt(Le(P[2],Q[3]),Le(P[3],Q[2]))):end: Pascal:=proc() local c,d,s,t,i,P,Q: for i from 1 to 3 do P[i]:=ParEllipse( c,d,t[i]):Q[i]:=ParEllipse(c,d,s[i]):od:Colinear(Pt(Le(P[1],Q[2]),Le(P[2],Q[1])), Pt(Le(P[1],Q[3]),Le(P[3],Q[1])),Pt(Le(P[2],Q[3]),Le(P[3],Q[2]))):end: Pivot:=proc() local A,B,C,A1,B1,C1,t1,t2,t3,P1,P2: A:=[0,0]: B:=[1,0]: A1:=[t1*B[1]+(1-t1)*C[1],t1*B[2]+(1-t1)*C[2]]: B1:=[t2*C[1]+(1-t2)*A[1],t2*C[2]+(1-t2)*A[2]]: C1:=[t3*A[1]+(1-t3)*B[1],t3*A[2]+(1-t3)*B[2]]: ConcurrentCes(Ce(A,B1,C1),Ce(B,A1,C1),Ce(C,A1,B1)): end: PivotOld:=proc() local A,B,C,A1,B1,C1,t1,t2,t3,P1,P2: A:=[0,0]: B:=[1,0]: A1:=[t1*B[1]+(1-t1)*C[1],t1*B[2]+(1-t1)*C[2]]: B1:=[t2*C[1]+(1-t2)*A[1],t2*C[2]+(1-t2)*A[2]]: C1:=[t3*A[1]+(1-t3)*B[1],t3*A[2]+(1-t3)*B[2]]: P1:=OtherCeCe(Ce(A,B1,C1),Ce(B,A1,C1),C1): P2:=OtherCeCe(Ce(B,A1,C1),Ce(C,A1,B1),A1): evalb(normal([expand(P1[1]-P2[1]),expand(P1[2]-P2[2])])=[0,0]): end: Poncelet:=proc() local t0,t1,t2,t3,A,B,C,t,R,Q,Q1,Q2,P,c,L1,L2,L3,eq: print(`Works, on Maple V, 0-5, except ver.3`): L1:=TangentToEllipse([0,0],[1,1],t1):L2:=TangentToEllipse([0,0],[1,1],t2): L3:=TangentToEllipse([0,0],[1,1],t3):L1:=subs(t1=1,L1):A:=Pt(L1,L2): B:=Pt(L1,L3):C:=Pt(L2,L3):R:=Circumradius(A,B,C):c:=Circumcenter(A,B,C): R:=simplify(R,symbolic): P:=ParamCircle(c,R,t0):Q:=ParamCircle(c,R,t): eq:=solve(TouchCeLe1(x^2+y^2-1,Le(P,Q)),t):Q1:=subs(t=eq[1],Q): Q2:=subs(t=eq[2],Q):TouchCeLe(x^2+y^2-1,Le(Q1,Q2)):end: Ptolemy:=proc() local P,i,t,R,A,B,C,D: for i from 1 to 4 do P[i]:=ParamCircle([0,0],R,t[i]): od: A:=P[1]:B:=P[2]:C:=P[3]:D:=P[4]: Sqabc(DeSq(A,B)*DeSq(C,D), DeSq(B,C)*DeSq(D,A),DeSq(A,C)*DeSq(B,D)):end: Purser:=proc() local r,t1,t2,t3,A,B,C,a,b,c,u,v,t,M,f,X,Y: A:=ParamCircle([0,0],1,t1):B:=ParamCircle([0,0],1,t2): C:=ParamCircle([0,0],1,t3):M:=[1+r,0]:a:=DeSq(B,C):b:=DeSq(A,C):c:=DeSq(A,B): v:=DeSq(C,M)-r^2:u:=DeSq(B,M)-r^2: t:=DeSq(A,M)-r^2: f:=SSR(X,3,Y): evalb(expand(subs({X[1]=a*t,X[2]=b*u,X[3]=c*v,Y=0},f))=0):end: RadicalCenterExists:=proc() local C,R: Concurrent(RadicalLine(C[1],R[1],C[2],R[2]),RadicalLine(C[1],R[1],C[3],R[3]), RadicalLine(C[2],R[2],C[3],R[3])):end: Simson:=proc() local t,i,P,R:for i from 1 to 4 do P[i]:=ParamCircle([0,0],R,t[i]): od: Colinear(Ft(P[4],Le(P[1],P[2])), Ft(P[4],Le(P[2],P[3])),Ft(P[4],Le(P[3],P[1]))):end: Soddy:=proc() local q,e1,e2,e3,e4,c,d,e,TC,R,r,s,t,p:with(grobner): R:=1:TC:=TcCesOut:c:=[r+R,0]:q:=gbasis({TC(c,r,d,s),TC(c,r,e,t),TC(d,s,e,t), TC([0,0],R,c,r),TC([0,0],R,d,s),TC([0,0],R,e,t)},[d[1],e[1],d[2],e[2],r,s,t], tdeg):e4:=1/R:e1:=1/r:e2:=1/s:e3:=1/t: p:=-2*(e1^2+e2^2+e3^2+e4^2)+(e1+e2+e3+e4)^2:p:=numer(normal(p)): ItIsZero(normalf(p,q,[d[1],e[1],d[2],e[2],r,s,t],tdeg)):end: Thebault:=proc() local m,n,t,p1,p2, I1,T,A,M,eq1,eq2,lu,Ci,Ci1,i,j,SOL,lua: T:=Te(m,n):A:=T[3]:I1:=Incenter(m,n):M:=[t,0]: Ci:=Ce(T): Ci1:=(x-p1)^2+(y-p2)^2-p2^2: eq1:=TouchCe1(Ci1,Ci): lu:=solve(eq1,p2): if subs({m=1/3,n=1/3,t=1/2,p1=1/2},lu[1])>0 then lu:=lu[1]: else lu:=lu[2]: fi: eq2:=TouchCeLe1(Ci1,Le(A,M)): eq2:=numer(normal(subs(p2=lu,eq2))): lua:=solve(eq2,p1): SOL:=[seq([lua[i], subs(p1=lua[i],lu)],i=1..nops([lua]))]: for i from 1 to nops(SOL) do for j from i+1 to nops(SOL) do if Colinear(I1,SOL[i],SOL[j]) then RETURN(true): fi: od: od: false: end: Varignon:=proc() local A,M,i: for i from 0 to 3 do M[i]:=MidPt(A[i],A[i+1 mod 4]) od: ItIsParallelogram(M[0],M[1],M[2],M[3]):end: Viviani:=proc() local A,B,C,A1,B1,C1,C2,T,P,f,X,Y: T:=Te(1/sqrt(3),1/sqrt(3)): A:=T[1]:B:=T[2]:C:=T[3]: A1:=Ft(P,Le(A,B)):B1:=Ft(P,Le(A,C)):C1:=Ft(P,Le(B,C)): C2:=Ft(C,Le(A,B)): f:=SSR(X,3,Y): ItIsZero(subs({X[1]=DeSq(P,A1),X[2]=DeSq(P,B1), X[3]=DeSq(P,C1),Y=sqrt(DeSq(C,C2))},f)): end: vonAubel:=proc() local A,B,C,D,P,Q,R,S: P:=MDOS(A,B):Q:=MDOS(B,C):R:=MDOS(C,D):S:=MDOS(D,A): ItIsZero(Slope(P,R)*Slope(Q,S)+1) and ItIsZero(DeSq(P,R)-DeSq(Q,S)):end: Wittenbauer:=proc() local A,P,l,i: for i from 0 to 3 do l[i]:=Le([(2/3)*A[i][1]+1/3*A[i+1 mod 4][1],(2/3)*A[i][2]+1/3*A[i+1 mod 4][2]], [(2/3)*A[i][1]+1/3*A[i-1 mod 4][1],(2/3)*A[i][2]+1/3*A[i-1 mod 4][2]]):od: for i from 0 to 3 do P[i]:=Pt(l[i],l[i+1 mod 4]): od:evalb(normal( Pt(Le(P[0],P[2]),Le(P[1],P[3])))=normal(CentroidQ(A[0],A[1],A[2],A[3]))):end: ########################PART II:DEFINITIONS########################## #Def (The perpendicular to line Le1 that passes through point Pt1 Altitude:=proc(Pt1,Le1): expand(coeff(expand(Le1),x,1)*(y-Pt1[2])- coeff(expand(Le1),y,1)*(x-Pt1[1])): end: #The triangle whose medial triangle is DEF AntiMedial:=proc(D,E,F) local A,B,C,eq,var:eq:={D[1]=(A[1]+B[1])/2,D[2]= (A[2]+B[2])/2,E[1]=(A[1]+C[1])/2,E[2]=(A[2]+C[2])/2,F[1]=(B[1]+C[1])/2,F[2]= (B[2]+C[2])/2}:var:={A[1],B[1],C[1],A[2],B[2],C[2]}: var:=solve(eq,var): subs(var,[A[1],A[2]]),subs(var,[B[1],B[2]]),subs(var,[C[1],C[2]]):end: #AnyBetween(P,Q,p): An arbitrary point on the line joining P and Q AnyPtBetween:=proc(P,Q,p): [p*P[1]+(1-p)*Q[1],p*P[2]+(1-p)*Q[2]]:end: #Def(Area of triangle ABC) AREA:=proc(A,B,C):normal(expand((B[1]*C[2]-B[2]*C[1]-A[1]*C[2]+A[2]*C[1] -B[1]*A[2]+B[2]*A[1])/2)):end: #Def The refl. of line L1 through line L2 Billiard:=proc(L1,L2) local gu,L1a,L2a,a,b,c,d,e,f: L1a:=a*x+b*y+c:L2a:=d*x+e*y+f:gu:=BilliardSym(L1a,L2a): subs({a=coeff(expand(L1),x,1),b=coeff(expand(L1),y,1),c=subs(y=0,subs(x=0,L1)), d=coeff(expand(L2),x,1),e=coeff(expand(L2),y,1),f=subs(y=0,subs(x=0,L2))},gu): end: #Def (The refl. of gen. line L1 through gen. line L2) BilliardSym:=proc(L1,L2) local P,m,n,sl: m:=-coeff(L1,x,1)/coeff(L1,y,1):n:=-coeff(L2,x,1)/coeff(L2,y,1): P:=Pt(L1,L2): sl:=TS(n,n,-m):numer(normal((y-P[2])-sl*(x-P[1]))):end: #Def (The Circumcircle of the inputed Points) Ce:=proc() local eq,a,b,c,i,q:eq:=x^2+y^2+a*x+b*y+c:q:=solve({seq(subs( {x=args[i][1],y=args[i][2]},eq),i=1..nargs)} ,{a,b,c}):expand(subs(q,eq)):end: #Def(The Center of a Conic) Center:=proc(Conic): subs(solve({diff(Conic,x),diff(Conic,y)},{x,y}),[x,y]): end: #Def (The intersection of the three medians) Centroid:=proc(A,B,C):Concurrency(Le(MidPt(A,B),C),Le(MidPt(A,C),B), Le(MidPt(B,C),A)):end: #The centroid of the quadrilateral ABCD CentroidQ:=proc(A,B,C,D) local P,Q,a,b:P:=Centroid(A,B,C):Q:=Centroid(A,C,D): a:=AREA(A,B,C): b:=AREA(A,C,D): [a/(a+b)*P[1]+b/(a+b)*Q[1],a/(a+b)*P[2]+b/(a+b)*Q[2]]:end: #Def(Circumcenter of the equilateral triangle two of whose vertices are A and B) CET:=proc(A,B):Circumcenter(A, B, [(B[1]+A[1])/2-(A[2]-B[2])*3^(1/2)/2, B[2]/2+(A[1]-B[1])*3^(1/2)/2+A[2]/2]):end: #Def (The Circumcenter of the triangle ABC) Circumcenter:=proc(A,B,C):Center(Ce(A,B,C)):end: #Def (Circumradius of the triangle ABC) Circumradius:=proc(A,B,C):Radius(Ce(A,B,C)):end: #Def (The inputed points all on the same line?) Colinear:=proc() local i: if nargs<2 then ERROR(`Need at least two Pts`): fi: for i from 3 to nargs do if AREA(args[1],args[2],args[i])<>0 then RETURN(false):fi:od:true:end: #Length of a common tangent to the circles centered C1(C2) with radius R1(R2) ComTangLgtSq:=proc(C1,R1,C2,R2) local a,d:d:=sqrt(DeSq(C1,C2)):a:=d*R2/(R1-R2): sqrt((d+a)^2-R1^2)-sqrt(a^2-R2^2):end: #Def (Are the inputed points all on the same circle?) Concyclic:=proc() local i,C1:C1:=Ce(args[1],args[2],args[3]): for i from 4 to nargs do if not ItIsZero(C1-Ce(args[1],args[2],args[i])) then RETURN(false): fi: od: true: end: #Def (The common point of the inputed lines) Concurrency:=proc() local q: q:=solve({args},{x,y}):[subs(q,x),subs(q,y)]: end: #Def (Are the inputed lines concurrent?) Concurrent:=proc(): not evalb(solve({args},{x,y})=NULL): end: #Def (Are the inputed circles concurrent?) ConcurrentCes:=proc() local p,i: p:=subs(solve({seq(args[1]-args[i],i=2..nargs)},{x,y}),[x,y]): for i from 1 to nargs do if not PtLiesOnCurve(p,args[i]) then RETURN(false): fi: od: true: end: #Def (the conic(s) through the list of points PointList) ConicThroughPoints:=proc(PointList) local Conic,A,B,C,D,E,F,i: Conic:=A*x^2+B*x*y+C*y^2+D*x+E*y+F: subs( solve({seq(subs({x=PointList[i][1],y=PointList[i][2]},Conic), i=1..nops(PointList))},{A,B,C,D,E,F}),Conic): end: #Def (the distance between point A and point B) (use with caution) De:=proc(A,B):sqrt(DeSq(A,B)):end: #Def (Square of Distance of point P to line L) DePtLeSq:=proc(P,L):DeSq(Pt(Altitude(P,L),L),P):end: #Def (The square of the distance of points A and B) DeSq:=proc(A,B):(A[1]-B[1])^2+(A[2]-B[2])^2: end: #Def (The square of the distance of points A and B, in dim-dimensional space) DeSqG:=proc(A,B,dim) local i :sum((A[i]-B[i])^2,i=1..dim): end: #Def(Excircles of standard triangle Te(m,n) Excircles:=proc(m,n) local C,T,a,b,c,gu,i: T:=Te(m,n):C:=x^2+y^2+a*x+b*y+c: gu:=solve({TouchCeLe1(C,Le(T[1],T[2])),TouchCeLe1(C,Le(T[1],T[3])), TouchCeLe1(C,Le(T[2],T[3]))},{a,b,c}): {seq(subs(gu[i],C),i=1..nops([gu]))} minus {Incircle(m,n)}:end: #Def (The line through Circumcenter, Orthocenter, and Centroid) EulerLine:=proc(A,B,C):Le(Orthocenter(A,B,C),Circumcenter(A,B,C)):end: #Def (Projection of point Pt1 on line Le1) Ft:=proc(Pt1,Le1) :Pt(Altitude(Pt1,Le1),Le1):end: #Def (Gergonne Point of Standard Triangle Te(m,n)) GergonnePt:=proc(m,n) local T,C1:T:=Te(m,n):C1:=Incircle(m,n): Pt(Le(T[1],PtLeCe(Le(T[2],T[3]),C1)),Le(T[2],PtLeCe(Le(T[1],T[3]),C1))):end: #Def(The incenter of the triangle whose vertices are A(0,0), B(1,0), #and the slopes of AB and BC are TS(m,m),TS(n,n),resp.) Incenter:=proc(m,n): Pt(y-m*x,y+n*x-n):end: #Def: The eq. of the incircle through the standard triangle Incircle:=proc(m,n) local C,R:R:=Inradius(m,n):C:=Incenter(m,n): expand((x-C[1])^2+(y-C[2])^2-R^2):end: #Def(The inradius of the standard triangle ) Inradius:=proc(m,n): Incenter(m,n)[2]: end: #Def(Is the triangle ABC equilateral?) ItIsEquilateral:=proc(A,B,C):evalb(simplify(normal ({DeSq(A,B)-DeSq(A,C),DeSq(B,C)-DeSq(C,A)}))={0}):end: #Def(Are the points Q,T,S,R vertices of a parallogram?) ItIsParallelogram:=proc(Q,T,S,R): evalb(ItIsZero(Slope(Q,T)-Slope(S,R)) and ItIsZero(Slope(T,S)-Slope(R,Q))): end: #Def(Are the points Q,T,S,R vertices of a square?) ItIsSquare:=proc(Q,T,S,R) evalb( ItIsZero(DeSq(Q,T)-DeSq(T,S)) and ItIsZero(DeSq(Q,T)-DeSq(Q,R)) and ItIsZero(DeSq(Q,T)-DeSq(R,S)) and ItIsZero(Slope(Q,R)*Slope(Q,T)+1)): end: #Def(Is it zero?) ItIsZero:=proc(a):evalb(normal(a)=0):end: #Kiss(Pt1,Pt2,Ce1): The point P, that lies on Ce1, and such that #the Circle through Pt1,Pt2,P touches Ce1 at P Kiss:=proc(Pt1,Pt2,Ce1) local x1,y1,gu1,gu2,lu,Pt3: gu1:=Tangent(Ce1,[x1,y1]):gu2:=Tangent(Ce(Pt1,Pt2,[x1,y1]),[x1,y1]): lu:=solve({subs({x=x1,y=y1},Ce1),coeff(gu2,x,1)*coeff(gu1,y,1)- coeff(gu1,x,1)*coeff(gu2,y,1)},{x1,y1}): Pt3:=subs(lu[1],[x1,y1]): if not Colinear(Pt1,Pt2,Pt3) then RETURN(Pt3): else RETURN(subs(lu[2],[x1,y1])): fi: end: #Def (The eq. of the line joining A and B) Le:=proc(A,B) AREA(A,B,[x,y]):end: #LePtAngle(P,a): the line through Point P making angle a with x-axis LePtAngle:=proc(P,a): LePtSlope(P,tan(a)):end: #LePtSlope(P,m): the line through Point P with slope m LePtSlope:=proc(P,m): expand((y-P[2])-m*(x-P[1])):end: #MDOS(A,B): The point where the diagonals of the Outside Square on AB meet MDOS:=proc(A,B) local a,b: a:=B[1]-A[1]:b:=B[2]-A[2]: Pt(Le(A,[A[1]+a+b,A[2]+b-a]),Le(B,[A[1]+b,A[2]-a])):end: #Def (The midpoint between A and B) MidPt:=proc(A,B):[(A[1]+B[1])/2,(A[2]+B[2])/2]:end: #Def (Mirror reflection of line L1 w.r.t. line L MirRefLeLe:=proc(L1,L) local O,P: O:=Pt(L,L1):P:=[3/11, solve(subs(x=3/11,L1),y)]: Le(O,MirRefPtLe(P,L)):end: #Def (Mirror reflection of the origin w.r.t. to the line AB) MirRefOf0:=proc(A,B) local q: q:=Ft([0,0],Le(A,B)): [2*q[1],2*q[2]]:end: #Def (Mirror reflection of the point P w.r.t. to the line L) MirRefPtLe:=proc(P,L) local Q: Q:=Ft(P,L): normal([Q[1]-(P[1]-Q[1]),Q[2]-(P[2]-Q[2])]):end: #Def (the reflection of the point P1 w.r.t. the point P2 MirRefPtPt:=proc(P1,P2): normal([P2[1]-(P1[1]-P2[1]),P2[2]-(P1[2]-P2[2])]):end: #Def(Nagel Point of the standard triangle Te(m,n)) NagelPt:=proc(m,n) local T:T:=Te(m,n):Pt(Le(T[1],PtLeCe(Le(T[2],T[3]), Incircle(m,-1/n))),Le(T[2],PtLeCe(Le(T[1],T[3]),Incircle(-1/m,n)))):end: #Def (Euler's Nine-point circle for triangle ABC) NinePointCircle:=proc(A,B,C): Ce(MidPt(A,B),MidPt(A,C),MidPt(B,C)):end: #Def(Normal to the parametric ellipse at the parametric point NormalToEllipse:=proc(c,d,t) local P: P:=ParEllipse(c,d,t): diff(P[2],t)*(y-P[2])+diff(P[1],t)*(x-P[1]):end: #Def (The intersection of the three perpendicular projections) Orthocenter:=proc(A,B,C):Concurrency(Altitude(A,Le(B,C)),Altitude(B,Le(A,C)), Altitude(C,Le(A,B))):end: #OtherCeCe(C1,C2,P): The other meeting Pt of two circles C1,C2 meet at the P OtherCeCe:=proc(C1,C2,P) if normal(subs({x=P[1],y=P[2]},C1))<>0 or normal(subs({x=P[1],y=P[2]},C2))<>0 then ERROR(`The circles do not meet at`, P) : fi: MirRefPtLe(P,Le(Center(C1),Center(C2))):end: #Def (Generic point on a Parametric circle center [c[1],c[2]] and radius R) ParamCircle:=proc(c,R,t):[c[1]+R*(t+1/t)/2,c[2]+R*(t-1/t)/2/I]:end: #Def (Generic point on a parametric line) ParamLine:=proc(m,b,t):[t,m*t+b]:end: #Def (Generic point on a Parametric ellipse, center [c[1],c[2]]) ParEllipse:=proc(c,d,t):[c[1]+d[1]*(t+1/t)/2,c[2]+d[2]*(t-1/t)/2/I]:end: #Parametric Point on the Perpendicular Bisector of AB ParPtPerBisect:=proc(A,B,s)local M:M:=MidPt(A,B):[M[1]+s,M[2]-s/Slope(A,B)]: end: #The Pedal Triangle of the Triangle ABC w.r.t to pt P Pedal:=proc(A,B,C,P) Ft(P,Le(A,B)),Ft(P,Le(A,C)),Ft(P,Le(B,C)): end: #Def(Line through Midpoint of PQ perpendicular to PQ) PerpMid:=proc(P,Q):PerpPQ(P,MidPt(P,Q)):end: #Def(Line through Q perpendicular to PQ) PerpPQ:=proc(P,Q):expand((y-Q[2])*(P[2]-Q[2])+(x-Q[1])*(P[1]-Q[1])):end: #Def(Point between A and B that is the `p-point') pmidpt:=proc(A,B,p): normal([A[1]+p*(B[1]-A[1]),A[2]+p*(B[2]-A[2])]):end: #Def( Pt X such that DeSq(P,X)=p^2, DeSq(X,Q)=q^2) pqPt:=proc(P,Q,p,q) [(q*P[1]+p*Q[1])/(p+q),(q*P[2]+p*Q[2])/(p+q)]: end: #Def( Power of pt Pt w.r.t. circle with Center C and radius R) Powe:=proc(C,R,Pt):DeSq(C,Pt)-R^2:end: #Def (The point of intersection of lines Le1 and Le2) Pt:=proc(Le1,Le2) local q:q:=solve( {numer(normal(Le1)),numer(normal(Le2))},{x,y}): [normal(simplify(subs(q,x))),normal(simplify(subs(q,y)))]:end: #Def(The common point of two circls that touche each other) PtCeCe:=proc(C1,C2):subs(solve({C1-C2,C1},{x,y}),[x,y]):end: #Def(The common point of a circle and a line that touches it) PtLeCe:=proc(L1,C1):subs(solve({L1,C1},{x,y}),[x,y]):end: #Def(PtLiesOnCurve(P1,C1), returns true iff point P1 lies on curve C1) PtLiesOnCurve:=proc(P1,C1):ItIsZero(subs({x=P1[1],y=P1[2]},C1)):end: #Def(Quadrilateral through four lines L1,L2,L3,L4) Quad:=proc(L1,L2,L3,L4):Pt(L1,L2),Pt(L2,L3),Pt(L3,L4),Pt(L4,L1):end: #Def (the radical center of circles with centers (radiii) C1,C2,C3,R1,R2,R3 RadicalCenter:=proc(C1,R1,C2,R2,C3,R3) local C,R: Pt(RadicalLine(C1,R1,C2,R2),RadicalLine(C1,R1,C3,R3)):end: #Def( Radical line of circles with Centers C1,C2 and Radii R1, R2 RadicalLine:=proc(C1,R1,C2,R2):expand(Powe(C1,R1,[x,y])-Powe(C2,R2,[x,y])): end: #Def(The Radius of a circle Circ) Radius:=proc(Circ) local q: q:=Center(Circ):sqrt(normal(subs({x=q[1],y=q[2]},-Circ))):end: #Def (The slope of the line joining points A and B) Slope:=proc(A,B):normal((B[2]-A[2])/(B[1]-A[1])):end: #Def( Is it true that sqrt(a)+sqrt(b)=sqrt(c) ?) Sqabc:=proc(a,b,c):ItIsZero((c-a-b)^2-4*a*b):end: #SSR(A,n,B): the polynomial in A[1], ..., A[n], B #whose vanishing is equivalent to B equaling the sum #of the square roots of A[1],..., A[n] SSR:=proc(A,n,B) local gu,x,i,d:if n=1 then RETURN(B^2-A[1]): fi:gu:= expand(subs(B=B-x,SSR(A,n-1,B))):d:=degree(gu,x)/2:expand(sum(coeff(gu,x,2*i)* A[n]^i,i=0..d)^2-A[n]*sum(coeff(gu,x,2*i+1)*A[n]^i,i=0..d)^2):end: #SSR1(A,B): given a list A returns true if B is the sum #(of one of the possibilities of sums of square roots of #the elements of A SSR1:=proc(A,B) local gu,i,j,mu,lu: gu:={0}: for i from 1 to nops(A) do mu:={}: lu:=simplify(sqrt(A[i])): for j from 1 to nops(gu) do mu:=mu union {gu[j]+lu,gu[j]-lu}: od:gu:=mu:od: for i from 1 to nops(gu) do if expand(simplify(simplify(expand(gu[i]^2-B^2),symbolic)))= 0 then RETURN(true):fi:od:false:end: #Tangent(Ce1,Pt1): Given a circle Ce1, and a point Pt1 #on it, finds the equation of the tangent Tangent:=proc(Ce1,Pt1) local A,x0,y0: A:=coeff(Ce1,x,2):x0:=Pt1[1]: y0:=Pt1[2]: numer(normal((y-y0)*(2*A*y0+coeff(Ce1,y,1))+(x-x0)*(2*A*x0+coeff(Ce1,x,1)))): end: #Def(Tangent to the parametric ellipse at the parametric point TangentToEllipse:=proc(c,d,t) local P: P:=ParEllipse(c,d,t): diff(P[1],t)*(y-P[2])-(x-P[1])*diff(P[2],t):end: #CommonTangentsMeetingPt(C1,R1,b,d,R2): Intersection of common Tangents of Circle1 #with center C1 and radius R1 and Cirlce2 with center C2,distance d from C1 #such that the angle betwen C1C2 and the x-axis is b radians CommonTangentsMeetingPt:=proc(C1,R1,b,d,R2) local a: a:=d/(R2/R1-1):normal(expand([C1[1]-a*cos(b),C1[2]-a*sin(b)])):end: #Def: The condition that two circles, with given centers and radii touch TcCesOut:= proc(C1,R1,C2,R2):expand((R1+R2)^2-(C1[1]-C2[1])^2-(C1[2]-C2[2])^2):end: #Def(Standard Triangle whose vertices are A(0,0),B(1,0) and angles #CAB and CBA are 2*arctan(m) and 2*arctan(-n) resp. Te:=proc(m,n):[0,0],[1,0],Pt(y-TS(m,m)*x,y+TS(n,n)*(x-1)):end: #Def(Given two circles C1,C2, decides whether they touch) TouchCe:=proc(C1,C2) local gu: gu:=expand(subs(y=solve(C1-C2,y),C1)): ItIsZero(4*coeff(gu,x,2)*coeff(gu,x,0)-coeff(gu,x,1)^2): end: #Def(The expression whose vanishing guarantess that the symbolic #circles touch) TouchCe1:=proc(C1,C2) local gu: gu:=expand(subs(y=solve(C1-C2,y),C1)): numer(normal(4*coeff(gu,x,2)*coeff(gu,x,0)-coeff(gu,x,1)^2)): end: #Def(Given a circle C1, and a line L1, decides whether they touch) TouchCeLe:=proc(C1,L1) local gu: gu:=expand(subs(y=solve(L1,y),C1)): ItIsZero(4*coeff(gu,x,2)*coeff(gu,x,0)-coeff(gu,x,1)^2): end: #Def(The expression whose vanishing guarantess that the symbolic #circle C1 and Line L1 touch) TouchCeLe1:=proc(C1,L1) local gu: gu:=expand(subs(y=solve(L1,y),C1)): numer(normal(4*coeff(gu,x,2)*coeff(gu,x,0)-coeff(gu,x,1)^2)): end: #Def:tan(a_1+a_2+...) expressed in terms li[1]:=tan(a_1), li[2]:=tan(a_2) .. TS:=proc(li) local i,t:if nargs=1 then RETURN(args[1]) else t:=TS(seq(args[i],i=2..nargs)): RETURN((args[1]+t)/(1-t*args[1])):fi:end: ###################MONTHLY PROBLEMS############################ #Monthly Problem Problem 10637 by C.F. Parry P10637:=proc() local A,B,C,a,b,O1,H,alp,bet,gam,alp1,bet1,gam1,EL,m,P: A:=[0,0]: B:=[1,0]: C:=[a,b]: O1:=Circumcenter(A,B,C):H:=Orthocenter(A,B,C): m:=Slope(O1,H):alp:=y-A[2]-m*(x-A[1]):bet:=y-B[2]-m*(x-B[1]): gam:=y-C[2]-m*(x-C[1]): alp1:=Billiard(alp,Le(B,C)):bet1:=Billiard(bet,Le(C,A)): gam1:=Billiard(gam,Le(A,B)):Concurrent(alp1,bet1,gam1):P:=Concurrency (alp1,bet1,gam1):Concurrent(alp1,bet1,gam1) and ItIsZero(DeSq(O1,P)-4*Circumradius(A,B,C)^2):end: #Monthly Problem Problem 10673 by Mazur P10673:=proc() local m,n,C,s1,s2,T,t1,t2,t3,A1,A2,A3,F1,F2,F3,P1,P2,P3,F1a,F2a,F3a: T:=Te(m,n):C:=Incenter(m,n):A1:=T[1]:A2:=T[2]:A3:=T[3]: F3:=Ft(C,Le(A1,A2)):F2:=Ft(C,Le(A1,A3)):F1:=Ft(C,Le(A2,A3)): P1:=[A2[1]+s1*(A2[1]-A3[1]),A2[2]+s1*(A2[2]-A3[2])]: P2:=[A1[1]+s2*(A3[1]-A1[1]),A1[2]+s2*(A3[2]-A1[2])]: P3:=Pt(Le(Pt(Le(P1,A1),Le(P2,A2)),A3),Le(A1,A2)): F3a:=MirRefPtLe(F3,expand(Le(C,P3))): F2a:=MirRefPtLe(F2,expand(Le(C,P2))): F1a:=MirRefPtLe(F1,expand(Le(C,P1))): t1:=Le(P1,F1a):t2:=Le(P2,F2a):t3:=Le(P3,F3a): Colinear(Pt(t1,Le(P2,P3)),Pt(t2,Le(P3,P1)),Pt(t3,Le(P1,P2))): end: #Monthly Problem P10678, Aug./Sep. 1998, proposed by Clark #Kimberling and Peter Yff P10678:=proc() local m,n,T,Ce1,A1,A2,A3,B1,B2,B3: T:=Te(m,n): Ce1:=Incircle(m,n):A1:=T[1]:A2:=T[2]:A3:=T[3]: B3:=Kiss(A1,A2,Ce1):B2:=Kiss(A1,A3,Ce1):B1:=Kiss(A2,A3,Ce1): Concurrent(Le(A1,B1),Le(A2,B2),Le(A3,B3)): end: sin1:=proc(a):(a-1/a)/I/2:end:cos1:=proc(a):(a+1/a)/2:end: tan1:=proc(a):sin1(a)/cos1(a):end: #Monthly Problem P10693, Nov. 1998, proposed by Wu Wei Chao P10693:=proc() local a,b,c, AB,BP,Q,R,D,PC,D1,Q1,R1: AB:=sin1(b^2)/sin1(a^2*b^2):BP:=sin1(a^2*c^2)*AB/sin1(c^2):PC:=1-BP: D:=[Incenter(tan1(a),tan1(b))[1],0]:Q:=Incenter(tan1(a),tan1(c)): Q:=[BP*Q[1],BP*Q[2]]:R:=Incenter(1/tan1(c),tan1(b)):R:=[BP+PC*R[1],PC*R[2]]: D1:=[Incenter(-1/tan1(a),-1/tan1(b))[1],0]:Q1:=Incenter(-1/tan1(a),-1/tan1(c)): Q1:=[BP*Q1[1],BP*Q1[2]]:R1:=Incenter(-tan1(c),-1/tan1(b)): R1:=[BP+PC*R1[1],PC*R1[2]]:evalb(normal(Slope(R,D)*Slope(Q,D))=-1 and nops(normal({DeSq(Q,D)/DeSq(R1,D1),DeSq(D,R)/DeSq(D1,Q1), DeSq(R,Q)/DeSq(Q1,R1)}))=1 and Concurrent(y,Le(Q,R),Le(Q1,R1))): end: #Monthly Problem P10703, Dec. 1998, proposed by Jean Anglesio P10703:=proc() local m,n,T,I1,C1,O1,H1,W1,G1,N1,S1,T1,U1,V1: T:=Te(m,n):I1:=Incenter(m,n):C1:=Centroid(T):O1:=Circumcenter(T): H1:=Orthocenter(T):W1:=Center(NinePointCircle(T)):G1:=GergonnePt(m,n): N1:=NagelPt(m,n):S1:=Pt(Le(I1,G1),Le(O1,C1)):T1:=Pt(Le(I1,G1),Le(O1,N1)): U1:=Pt(Le(I1,G1),Le(W1,N1)):V1:=Pt(Le(I1,G1),Le(H1,N1)): [ItIsZero(normal(DeSq(C1,H1)/DeSq(H1,S1)-1/9)), [ItIsZero(normal(DeSq(S1,T1)/DeSq(S1,I1)-(10/15)^2)), ItIsZero(normal(DeSq(S1,T1)/DeSq(S1,U1)-(10/18)^2)), ItIsZero(normal(DeSq(S1,T1)/DeSq(S1,V1)-(10/30)^2))], [ItIsZero(normal(DeSq(N1,O1)/DeSq(T1,O1)-(3/1)^2)), ItIsZero(normal(DeSq(N1,W1)/DeSq(U1,W1)-(5/3)^2)), ItIsZero(normal(DeSq(N1,H1)/DeSq(V1,H1)-1))]]:end: #Monthly Problem P10710, Jan. 1999, proposed by Bogdan Suceava P10710:=proc() local m,n,T,A,B,C,D,E,F,I,M,N,P,Q:T:=Te(m,n):A:=T[1]: B:=T[2]: C:=T[3]:I:=Incenter(m,n):D:=Ft(I,Le(B,C)):E:=Ft(I,Le(A,C)):F:=Ft(I,Le(A,B)): M:=Pt((y-A[1])-Slope(B,C)*(x-A[2]),Le(D,E)):N:=Pt((y-A[1])-Slope(B,C)*(x-A[2]), Le(D,F)):P:=MidPt(D,M):Q:=MidPt(D,N):Concyclic(A,E,F,I,P,Q):end: #Monthly Problem 10734, proposed by Floor van Lamoen, May 1999 P10734:=proc() local m,n,T,SL,A,B,C,H,I1,O,AB,AC,BC: T:=Te(m,n):A:=T[1]: B:=T[2]: C:=T[3]: AB:=sqrt(DeSq(A,B)):AC:=-simplify(sqrt(DeSq(A,C)),symbolic): BC:=-simplify(sqrt(DeSq(B,C)),symbolic): H:=Orthocenter(T):I1:=Incenter(m,n): O:=Circumcenter(T): evalb(RadicalCenter(A,AC+AB,B,AB+BC,C,BC+AC)= MirRefPtPt(MirRefPtPt(H,O),I1)):end: #Monthly Problem 10749, proposed by Alain Grigis, Aug.-Sep. 1999 P10749:=proc() local A,B,C,p,P,Q,R,S,X,p0: B:=[0,0]: A:=[sqrt(3),0]: C:=[0,1]: P:=[0,p]: Q:=Pt(Billiard(Le(A,P),Le(B,C)),Le(A,C)): R:=Pt(Billiard(Le(P,Q),Le(A,C)),Le(A,B)): S:=Pt(Billiard(Le(Q,R),Le(A,B)),Le(A,C)): p0:=solve(normal(subs({x=0,y=0},Billiard(Le(R,S),Le(A,C)))/p),p): P:=subs(p=p0,P):Q:=subs(p=p0,Q):R:=subs(p=p0,R):S:=subs(p=p0,S): X:=Concurrency(Le(A,P),Le(Q,R),Le(S,B) ): evalb( Concurrent(Le(A,P),Le(Q,R),Le(S,B)) and Slope(B,X)=sqrt(3)/2 and Slope(X,S)=sqrt(3)/2 and simplify(De(A,X)-De(X,P)-De(P,Q)-De(Q,X))=0 and simplify(De(A,X)-De(X,R)-De(R,S)-De(S,X))=0 and simplify(De(A,X)-2*De(X,B))=0) end: #P10780a(m,n,r,Base): Proves that #The radius of the partner of the circle #of radius r touching the sides CA and AB in the triangle #ABC where length(AB)=Base, and angle CAB=2*arctan(m) #and angle ABC=2*arctan(n) equals (-n/m)*r+(n/(1-n*m))*Base) P10780a:=proc() local m,n,r,Base,T,P1,P2,C,Cir1,Cir2,Li,gu1,gu2,m1,r2,lu: C:=Te(m,n)[3]: Li:=(y-C[2])-(x-C[1])*m1:P1:=[r/m,r]: P2:=[1-r2/n, r2]: Cir1:=expand((x-P1[1])^2+(y-P1[2])^2-P1[2]^2): Cir2:=expand((x-P2[1])^2+(y-P2[2])^2-P2[2]^2): gu1:=factor(normal(TouchCeLe1(Cir1,Li)/(m1-TS(m,m)))): gu2:=factor(normal(TouchCeLe1(Cir2,Li)/(m1-TS(-n,-n)))): lu:=normal({solve(factor(numer(normal(solve(gu1,m1)-solve(gu2,m1)))),r2)}): if nops(lu)=2 then if degree(numer(lu[1]),m)normal((-n/m)*r+(n/(1-n*m))*C): T:=Te(m,n): k:=1/TS(m,n): BC:=sqrt(factor(DeSq(T[2],T[3]))):CA:=sqrt(factor(DeSq(T[3],T[1]))): lu:=f(m,n,r,1);lu:=f(n,k,lu,BC);lu:=f(k,m,lu,CA);lu:=f(m,n,lu,1); lu:=f(n,k,lu,BC);lu:=f(k,m,lu,CA);evalb(lu=r):end: #Monthly Problem 10783, proposed by Wu Wei Chao, Feb. 2000 P10783:=proc() local t2,t3,t4,A,B,C,D,E,F,G,H,m,n: A:=ParamCircle([0,0],1,1):B:=ParamCircle([0,0],1,t2): C:=ParamCircle([0,0],1,t3):D:=ParamCircle([0,0],1,t4): E:=[m*C[1]+(1-m)*D[1],m*C[2]+(1-m)*D[2]]: F:=[n*C[1]+(1-n)*D[1],n*C[2]+(1-n)*D[2]]: G:=Circumcenter(B,C,E):H:=Circumcenter(A,D,F): F:=subs(n=solve(AREA(Pt(Le(A,B),Le(C,D)),G,H),n),F): evalb(Ce(A,B,E)=Ce(A,B,F)):end: #Problem 10796, proposed by Floor van Lamoen, April 1999 P10796:=proc() local A,B,C,D,A1,B1,C1: A:=[0,0]:B:=[1,0]: A1:=Ft(A,Le(B,C)):B1:=Ft(B,Le(A,C)):C1:=Ft(C,Le(A,B)): D:=Concurrency(EulerLine(A,B1,C1),EulerLine(A1,B,C1),EulerLine(A1,B1,C)): ItIsZero(subs({x=D[1],y=D[2]},NinePointCircle(A,B,C))): end: #Monthly Problem 10804, proposed by Achilleas Sinefakopoulos, May 2000 P10804:=proc() local A,B,C,D,t,L,P,E,F,i,lu1,lu2: for i from 1 to 4 do P[i]:=ParEllipse([0,0],[1,1],t[i]): L[i]:=TangentToEllipse([0,0],[1,1],t[i]):od: A:=Pt(L[1],L[2]):B:=Pt(L[2],L[3]): C:=Pt(L[3],L[4]):D:=Pt(L[4],L[1]): E:=P[2]:F:=P[4]: lu1:=factor(numer(normal(Ce(A,B,C)-Ce(A,B,D)))): lu2:=factor(numer(normal(DeSq(A,E)/DeSq(E,B)-DeSq(D,F)/DeSq(F,C)))): evalb({solve(lu1,t[3])} intersect {solve(lu2,t[3])} minus {t[1]}<>{}): end: #Monthly Problem 10845, Jan. 2001 P10845:=proc() local A,B,C,a,b,c,T,T1,IntBisA,ExtBisA,m,n,E,F,G: m:=TS(a,c): n:=TS(b,c):T:=Te(m,n):T1:=Te(a,b): B:=T[1]: A:=T[2]:C:=T[3]:E:=T1[2]: IntBisA:=y-A[2]-expand((x-A[1])*TS(m,1/n)): ExtBisA:=x-A[1]+expand((y-A[2])*TS(m,1/n)): F:=Ft(E,IntBisA):G:=Ft(E,ExtBisA): Colinear(F,G,MidPt(B,C)): end: #Montly Problem 10874, May 2001, proposed by Wu Wei Chao P10874:=proc() local a,b,c,d,A,B,C,D1,P,U,V: A:=ParEllipse([0,0],[1,1],a): B:=ParEllipse([0,0],[1,1],b): C:=ParEllipse([0,0],[1,1],c):D1:=ParEllipse([0,0],[1,1],d): P:=Pt(Le(A,C),Le(B,D1)):U:=Circumcenter(A,P,B):V:=Circumcenter(C,P,D1): evalb(Slope([0,0],U)=Slope(P,V) and Slope([0,0],V)=Slope(U,P)), factor(AREA([0,0],U,V))=0: end: #Monthly Problem 10895 (Oct. 2001) proposed by A. Wendijk P10895:=proc() local A,B,Ci1,Ci2,S,a,b,var,D,E,F,m,F1,F2,t: A:=[0,0]: B:=[t,0]: Ci1:=(x-1/2)^2+(y-0)^2-(1/2)^2: Ci2:=(x-(1+t)/2)^2+(y-0)^2-((1-t)/2)^2: S:=(x-(a+t))^2+(y-b)^2-a^2: var:=solve({TouchCe1(Ci1,S),TouchCe1(Ci2,S)},{a,b}): F:=subs(var, [a+t,b]): S:=subs(var,S): a:=subs(var,a): D:=pqPt([(1+t)/2,0],F,(1-t)/2,a): E:=Pt(x-t,Le([(1+t)/2,0],F)): ItIsZero(simplify(DeSq(D,E))-DeSq(A,B)): end: ############END################################################### #############IMO PROBLEMS############################## I78_4:=proc() local m,T,B,C,A,D,P,Q,Ce1,Ce2,t,lu,M,J,i: T:=Te(m,m):B:=T[1]: C:=T[2]:A:=T[3]:P:=[B[1]+t*(A[1]-B[1]),B[2]+t*(A[2]-B[2])]: Q:=[C[1]+t*(A[1]-C[1]),B[2]+t*(A[2]-C[2])]:D:=Pt(PerpPQ(A,P),PerpPQ(A,Q)): J:=Incenter(m,m):Ce1:=Ce(A,B,C):Ce2:=expand((x-D[1])^2+(y-D[2])^2-DeSq(D,P)): lu:={solve(TouchCe1(Ce1,Ce2),t)}: M:=MidPt(P,Q): member(J,{seq(normal(subs(t=lu[i],M)),i=1..nops(lu))}):end: I79_3:=proc() local t,P,Q,lu,t1,t2: P:=t->[cos(t),sin(t)]: Q:=proc(t):evalc(1-R*exp(-t0*I)+R*exp(I*(t-t0))):[coeff(",I,0),coeff(",I,1)]: end:evalb(diff(Pt(PerpMid(P(t1),Q(t1)),PerpMid(P(t2),Q(t2))),t1)=0):end: I82_2:=proc() local m,n,T,A1,A2,A3,D,M1,M2,M3,T1,T2,T3,S1,S2,S3: T:=Te(m,n): A1:=T[1]:A2:=T[2]:A3:=T[3]: D:=Incenter(m,n):M1:=MidPt(A2,A3):M2:=MidPt(A1,A3):M3:=MidPt(A1,A2): T1:=Ft(D,Le(A2,A3)):T2:=Ft(D,Le(A1,A3)):T3:=Ft(D,Le(A1,A2)): S1:=MirRefPtLe(T1,y-m*x):S2:=MirRefPtLe(T2,y+n*x-n): S3:=MirRefPtLe(T3,y-A3[2]-expand((x-A3[1])*TS(m,1/n))): Concurrent(Le(M1,S1),Le(M2,S2),Le(M3,S3)):end: I82_5:=proc() local A,B,C,D,E,F,P,i,gu,M,N,r: for i from 0 to 5 do gu:=evalc(exp(i*2*Pi*I/6)): P[i]:=[coeff(gu,I,0),coeff(gu,I,1)]: od: A:=P[0]:B:=P[1]:C:=P[2]:D:=P[3]:E:=P[4]:F:=P[5]: M:=[A[1]+r*(C[1]-A[1]),A[2]+r*(C[2]-A[2])]: N:=[C[1]+r*(E[1]-C[1]),C[2]+r*(E[2]-C[2])]:solve(AREA(B,M,N),r):end: #######################END#################### #####Ancestors ##Fathers of Theorems ABBA[AreaFormula]:={ItIsZero,DeSq,AREA}: ABBA[Bretschneider]:={ItIsZero,DeSq,AREA}: ABBA[Brianchon]:={ TangentToEllipse,Pt,Concurrent,Le}: ABBA[Butterfly]:={ParamCircle,Pt,Le,PerpPQ,DeSq,ItIsZero}: ABBA[Carnot]:={Te,SSR1,Circumcenter,Ft,Le,ItIsZero,DeSq,Circumradius,Inradius}: ABBA[Casey]:={ParamCircle,ComTangLgtSq,ItIsZero}: ABBA[CentroidExists]:={Concurrent,Le,MidPt,Le}: ABBA[Ceva]:={Pt,Le,ItIsZero,DeSq}: ABBA[Clifford]:={OtherCeCe}: ABBA[deLongchamps]:={Circumcenter,Orthocenter,EulerLine,ItIsZero}: ABBA[Desargues]:={ParamLine,Colinear,Pt,Le}: ABBA[EightPointCircleExists]:={MidPt,Concyclic,Ft,Le}: ABBA[EulerLineExists]:={Colinear,Orthocenter,Circumcenter,Centroid}: ABBA[EulerTetrahedronVolumeFormula]:={DeSqG,AREA}: ABBA[EulerTriangleFormula]:= {Te,Incenter,Circumcenter,Inradius,Circumradius,DeSq,ItIsZero}: ABBA[Feuerbach]:={TouchCe,NinePointCircle,Te,Incircle}: ABBA[FeuerbachConic]:={NinePointCircle,Te,Orthocenter,ItIsZero}: ABBA[FinslerHadwiger]:={Pt,MidPt,Le,ItIsZero,DeSq,Slope}: ABBA[FoxTalbot]:={Quad,Le,MidPt,Concurrent}: ABBA[Fregier]:={ParEllipse,NormalToEllipse}: ABBA[Fuhrmann]:={SSR1,ParamCircle,DeSq,ItIsZero}: ABBA[Gergonne]:={Te,Incircle,Concurrent,Le,PtLeCe}: ABBA[Griffiths]:={Circumcenter,Ce,Pedal,NinePointCircle,ConcurrentCes}: ABBA[Herron]:={DeSq,ItIsZero,AREA}: ABBA[Hoehn]:={DeSq,Le,Pt,ItIsZero}: ABBA[IncenterExists]:={Concurrent,TS}: ABBA[Johnson]:={ParamCircle,MirRefOf0,ItIsZero,Radius,Ce}: ABBA[Lehmus]:={Pt,TS,DeSq}: ABBA[Lemoine]:={Te,Centroid,Concurrent,MirRefLeLe,Le}: ABBA[LeonAnne]:={AnyPtBetween,Le,MidPt,AREA,ItIsZero}: ABBA[MarionMorgan]:={pmidpt,Le,Pt,AREA,ItIsZero}: ABBA[MedianTriangleLocus]:={AntiMedial,Te,Pedal,Incenter,DeSq,MidPt,Colinear}: ABBA[Menelaus]:={Pt,Le,ItIsZero,DeSq}: ABBA[Miquel]:={ParamCircle,ParPtPerBisect,MirRefPtLe,Concyclic}: ABBA[Monge]:={sin1,cos1,Colinear,CommonTangentsMeetingPt}: ABBA[Morley]:={Pt,TS,ItIsEquilateral}: ABBA[Nagel]:={Te,Incircle,Concurrent,Le,PtLeCe}: ABBA[Napoleon]:={ItIsEquilateral,CET}: ABBA[NinePointCircleExists]:={Ft,Le,MidPt,Orthocenter,Concyclic}: ABBA[Nobbs]:={Contact,Colinear,Pt,Le}: ABBA[OrthocenterExists]:={Concurrent,Altitude,Le}: ABBA[Pappus]:={ParamLine,Colinear,Pt,Le}: ABBA[Pascal]:={ParEllipse,Colinear,Pt,Le}: ABBA[Pivot]:={Ce,OtherCeCe}: ABBA[Poncelet]:={TangentToEllipse,Pt,Circumradius,Circumcenter,ParamCircle, TouchCeLe1,TouchCeLe}: ABBA[Ptolemy]:={ParamCircle,Sqabc,DeSq}: ABBA[Purser]:={ParamCircle,DeSq,SSR}: ABBA[RadicalCenterExists]:={Concurrent, RadicalLine}: ABBA[Simson]:={ParamCircle,Colinear,Ft,Le}: ABBA[Soddy]:={TcCesOut,ItIsZero}: ABBA[Varignon]:={MidPt,ItIsParallelogram}: ABBA[Viviani]:={SSR,Te,ItIsZero,DeSq,Ft,Le}: ABBA[vonAubel]:={MDOS,ItIsZero,Slope,DeSq}: ABBA[Wittenbauer]:={Pt,Le,CentroidQ}: ##End of Fathers of Theorems ##Fathers of Definitions ABBA[Altitude]:={}: ABBA[AntiMedial]:={}: ABBA[AnyPtBetween]:={}: ABBA[AREA]:={}: ABBA[Billard]:={BilliardSym}: ABBA[BillardSym]:={Pt,Sym}: ABBA[Ce]:={}: ABBA[Center]:={}: ABBA[Centroid]:={Concurrency,Le,MidPt}: ABBA[CentroidQ]:={AREA,Centroid}: ABBA[CET]:={Circumcenter}: ABBA[Circumcenter]:={Center,Ce}: ABBA[Circumradius]:={Radius,Ce}: ABBA[Colinear]:={AREA}: ABBA[ComTangLgtSq]:={DeSq}: ABBA[Concyclic]:={Ce}: ABBA[Concurrency]:={}: ABBA[Concurrent]:={}: ABBA[ConcurrentCes]:={PtLiesOnCurve}: ABBA[Contact]:={Te,Incenter,Ft,Le}: ABBA[De]:={DeSq}: ABBA[DePtLeSq]:={DeSq,Pt,Altitude}: ABBA[DeSq]:={}: ABBA[DeSqG]:={}: ABBA[Excircles]:={Te,Incircle,TouchCeLe,Le}: ABBA[EulerLine]:={Le,Orthocenter,Circumcenter}: ABBA[Ft]:={Pt,Altitude}: ABBA[GergonnePt]:={Te,Incircle,Pt,Le,PtLeCe}: ABBA[Incenter]:={Te,Concurrency,TS}: ABBA[Incircle]:={Inradius,Incenter}: ABBA[Inradius]:={Te,Incenter,DePtLeSq,Le,DePtLeSq}: ABBA[ItIsEquilateral]:={DeSq}: ABBA[ItIsSquare]:={DeSq,ItIsZero,Slope}: ABBA[ItIsParallelogram]:={ItIsZero,Slope}: ABBA[ItIsZero]:={}: ABBA[Kiss]:={Tangent,Colinear}: ABBA[Le]:={AREA}: ABBA[MDOS]:={Pt,Le}: ABBA[MidPt]:={}: ABBA[MirRefLeLe]:={Pt,Le,MirRefPtLe}: ABBA[MirRefPtLe]:={Ft,Le}: ABBA[MirRefOf0]:={Ft,Le}: ABBA[NagelPt]:={Te,Incircle,Pt,Le,PtLeCe}: ABBA[NinePointCircle]:={Ce,MidPt}: ABBA[NormalToEllipse]:={ParEllipse}: ABBA[Orthocenter]:={Concurrency,Altitude,Le}: ABBA[OtherCeCe]:={}: ABBA[ParamCircle]:={}: ABBA[ParamLine]:={}: ABBA[ParEllipse]:={}: ABBA[ParPtPerBisect]:={MidPt,Slope}: ABBA[Pedal]:={Ft,Le}: ABBA[PerpMid]:={PerpPQ,MidPt}: ABBA[PerpPQ]:={}: ABBA[pmidpt]:={}: ABBA[Powe]:={DeSq}: ABBA[Pt]:={}: ABBA[PtLeCe]:={}: ABBA[PtLiesOnCurve]:={}: ABBA[Quad]:={Pt}: ABBA[RadicalLine]:={Powe}: ABBA[Radius]:={Center}: ABBA[sin1]:={}: ABBA[cos1]:={}: ABBA[tan1]:={sin1,cos1}: ABBA[Slope]:={}: ABBA[Sqabc]:={ItIsZero}: ABBA[SSR]:={}: ABBA[Te]:={Pt,TS}: ABBA[TS]:={}: ABBA[Tangent]:={}: ABBA[TangentToEllipse]:={ParEllipse}: ABBA[CommonTangentsMeetingPt]:={}: ABBA[Thebault]:={Incenter,TouchCe1,TouchCeLe1,Le,Colinear}: ABBA[TouchCe]:={ItIsZero}: ABBA[TouchCe1]:={}: ABBA[TouchCeLe]:={ItIsZero}: ABBA[TouchCeLe1]:={}: ABBA[TcCesOut]:={}: ##End of Fathers of Definitions #IterAbba(Set1): Given a set of definitions #joins to them the definitions that depend on #them IterAbba:=proc(Set1) local i,gu: gu:={}: for i from 1 to nops(Set1) do gu:=gu union ABBA[op(i,Set1)]: od: gu union Set1: end: #ANCESTORS(Set1): the set of all ancestors of the #definitions in the set Set1, including themselves ANCESTORS:=proc(Set1) local gu,mu,mun: gu:=Set1: mu:=IterAbba(gu): while mu<>gu do mun:=IterAbba(mu): gu:=mu: mu:=mun: od: mu: end: #SelfContained(Theorem): given a theorem, prints its #statment, plus all the required definitions SelfContained:=proc(Theorem1) local gu,i,t0: gu:=ABBA[Theorem1]: gu:=ANCESTORS(gu): lprint(``): lprint(`The definitions needed for the`,Theorem1,`Theorem are `): print(``): for i from 1 to nops(gu) do lprint(gu[i],`:=`): print(gu[i]): od: lprint(`The statement of the`,Theorem1, ` Theorem is `): print(``): print(Theorem1): print(``): lprint(`Now let Maple prove it; The theorem is`): t0:=time(): print(Theorem1()); print(``): lprint(`The whole proof took`, time() -t0, ` seconds of CPU time `): end: #####Pictures of Definitions######## #AREAP(A,B,C): Draws the diagram for the definition of area #For example, try AREAP([0,0],[10,0],[4,3]) AREAP:=proc(A,B,C) local pic: pic:=plot([A,B,C,A],axes=none,filled=true,title= `Area(A,B,C)=Area of red region`, scaling=CONSTRAINED): pic:=pic,DrawPt([A[1]-.5,A[2]],` A`), DrawPt([B[1]+.5,B[2]],` B`),DrawPt([C[1],C[2]+.4],` C`): pic:=pic,plot({A,B,C},style=point,symbol=CIRCLE): display(pic): end: #Draws the diagram for the altitude from point P to line joining A #and B #(The perpendicular to line AB that passes through point P) #For example, try AltitudeP([10,0],[-2,-2],[6,6]) AltitudeP:=proc(P,A,B) local Q,pic,C,E: Q:=Ft(P,Le(A,B)): pic:=plot([A,B],axes=none,title=`Dashed Line=Altitude(P,L)`, scaling=CONSTRAINED): C:=[A[1]/3+2/3*B[1],A[2]/3+2/3*B[2]]: pic:=pic,DrawPt(C,` L`),DrawPt([P[1],P[2]-.5],` P`): pic:=pic,plot([P,Q],linestyle=3): E:=MidPt(P,Q): pic:=pic,plot({P},style=point,symbol=CIRCLE): display(pic): end: #CETP(A,B): Draws the diagram for the CET defintion, #For example, try CETP([0,0],[1,24]) CETP:=proc(A,B) local C,P,Ci,pic: C:=[(B[1]+A[1])/2-(A[2]-B[2])*3^(1/2)/2, B[2]/2+(A[1]-B[1])*3^(1/2)/2+A[2]/2]: P:=evalf(Circumcenter(A, B,C)): Ci:=Ce(A,B,C): pic:=plot([A,B,C,A],axes=none,title=`O = CET(A,B) `, scaling=CONSTRAINED): pic:=pic,DrawCeB(Ci): pic:=pic, plot([P,A],linestyle=3,color=blue), plot([P,B],linestyle=3,color=blue), plot([P,C],linestyle=3,color=blue): pic:=pic,textplot([op(P),` O`]): pic:=pic,DrawPtP(A,` A`,[-0.1,-.1]),DrawPtP(B,` B`,[0,.15]): pic:=pic,plotP({A,B,C}): display(pic): end: #CeP(A,B,C): draws the circle through the three points A, B, and C #For example, try: CeP([0,0],[10,0],[6,7]) CeP:=proc(A,B,C) local Ci,pic: Ci:=Ce(A,B,C): pic:=textplot([A[1]-.3,A[2]-.1,` A`], axes=none,title=`Ce(A,B,C) = Blue Circle`,scaling=CONSTRAINED): pic:=pic,DrawPtP(B, ` B`,[.3,0]),DrawPtP(C, ` C`,[0,.3]): pic:=pic,DrawCeB(Ci): pic:=pic,plotP({A,B,C}): display(pic): end: #CenterP(c,d) Draws the diagram for the Center difinition #for the ellipse whosee center is c and axes given by the 2-list d #example, type CenterP([0,0],[2,1]) CenterP:=proc(c,d) local pic: pic:=textplot([c[1],c[2]-.15,` O`], axes=none,title=`O = Center(Conic)`,scaling=CONSTRAINED): pic:=pic,DrawEl(c,d,blue): pic:=pic,plotP({[0,0]}): display(pic): end: #CentroidP(A,B,C): Draws the diagram #for the definition of the Centroid #where A,B,C, are arbitrary points #For example, try: CentoroidP([0,0],[10,0],[7,13]); CentroidP:=proc(A,B,C) local pic,G : G:=Centroid(A,B,C): pic:= plot([A,B,C,A],axes=none,title=`G= Centroid(A,B,C)`,scaling=CONSTRAINED): pic:=pic,plot([MidPt(A,B),C],axes=none,color=blue): pic:=pic,plot([MidPt(A,C),B],color=blue),plot([MidPt(B,C),A],color=blue): pic:=pic,DrawPtP(A,` A`,[-.4,-.1]),DrawPtP(B,` B`,[.4,-.1]), DrawPtP(C,` C`,[0,.4]): pic:=pic,DrawPtP(G, ` G`,[-.2,-.5]): pic:=pic,plotP({A,B,C,G}): display(pic): end: #CircumcenterP(A,B,C): draws the center #of the circle through the three points A, B, and C #For example, try: CeP([0,0],[10,0],[6,7]) CircumcenterP:=proc(A,B,C) local Ci,pic,O1: Ci:=Ce(A,B,C): O1:=Center(Ci): pic:=textplot([O1[1],O1[2]-.4,` O`], axes=none,title=`O= Cicumcenter(A,B,C)`,scaling=CONSTRAINED): pic:=pic,DrawPtP(A, ` A`,[-.3,0]), DrawPtP(B, ` B`,[.3,0]), DrawPtP(C, ` C`,[0,.3]): pic:=pic,DrawCeB(Ci): pic:=pic,plot([A,B,C,A]): pic:=pic, plot([O1,A],linestyle=3,color=blue), plot([O1,B],linestyle=3,color=blue), plot([O1,C],linestyle=3,color=blue): pic:=pic,plotP({A,B,C,O1}): display(pic): end: #CircumradiusP(A,B,C): draws the diagram for the definition #of the circumradius #of the triangle formet by the three points A, B, and C #For example, try: CircumradiusP([0,0],[10,0],[6,7]) CircumradiusP:=proc(A,B,C) local Ci,pic,O1, OA1,OB1,OC1: Ci:=Ce(A,B,C): O1:=Center(Ci): OA1:=MidPt(O1,A): OB1:=MidPt(O1,B): OC1:=MidPt(O1,C): pic:=textplot([OA1[1],OA1[2],` R`], axes=none,title=`R= Cicumradius(A,B,C)`,scaling=CONSTRAINED): pic:=pic,DrawPtP(A, ` A`,[-.3,0]), DrawPtP(B, ` B`,[.3,0]), DrawPtP(C, ` C`,[0,.3]): pic:=pic,DrawCeB(Ci): pic:=pic,textplot([OB1[1],OB1[2],` R`]), textplot([OC1[1],OC1[2],` R`]): pic:=pic,plot([A,B,C,A]): pic:=pic, plot([O1,A],linestyle=3,color=blue), plot([O1,B],linestyle=3,color=blue), plot([O1,C],linestyle=3,color=blue): pic:=pic,plotP({A,B,C}): display(pic): end: #ColinearP(L): Given a line L, draws the diagram for #the definition of Colinear #For example, try: ColinearP(y-2*x-5) ColinearP:=proc(L) local pic,A0,A,B,C,C0: A0:=[0,subs(x=0,solve(L,y))]: A:=[1,subs(x=1,solve(L,y))]: B:=[3,subs(x=3,solve(L,y))]: C:=[5,subs(x=5,solve(L,y))]: C0:=[8,subs(x=8,solve(L,y))]: pic:=plot([A0,C0], axes=none,title=`Points A,B, and C are colinear `,scaling=CONSTRAINED): pic:=pic,DrawPtP(A, ` A`,[.5,-0.2]), DrawPtP(B, ` B`,[.5,-0.2]), DrawPtP(C, ` C`,[.5,-0.2]): pic:=pic,plotP({A,B,C}): display(pic): end: #CommonTangentsMeetingPtP(m,n,t1,t2) : Draws the diagram for #CommonTangentsMeetingPt Defition for the lines of slopes #TS(m,n), TS(m,n-n) and centers [t1,t1*m], [t2,t2*m] #For example, try CommonTangentsMeetingPtP(1,1/3,30,80) CommonTangentsMeetingPtP:=proc(m,n,t1,t2) local pic,C1,C2,L1,L2,C11,C12,C21,C22,R1,R2,X: C1:=[t1,t1*m]: C2:=[t2,t2*m]: C11:=Ft(C1,y-TS(m,n)*x): C12:=Ft(C1,y-TS(m,-n)*x): C21:=Ft(C2,y-TS(m,n)*x): C22:=Ft(C2,y-TS(m,-n)*x): R1:=sqrt(DeSq(C1,C11)): R2:=sqrt(DeSq(C2,C21)): pic:=plot([[0,0],C22], axes=none,title= `O = CommonTangentMeetingPt(C1,R1,b,d,R2) `, scaling=CONSTRAINED): pic:=pic,plot([[0,0],C21]),DrawEl(C1,[R1,R1],blue), DrawEl(C2,[R2,R2],blue): pic:=pic,DrawPtP([0,0],` O`,[0,-4]), DrawPtP(C1,` C1`,[1,-4]),DrawPtP(C2,` C2`,[1,-4]): pic:=pic,plot([C1,C11],linestyle=3),plot([C2,C21],linestyle=3): pic:=pic,DrawPt(MidPt(C1,C11), ` R1`), DrawPt(MidPt(C2,C21), ` R2`): pic:=pic,plot([[0,0],C2],linestyle=3): pic:=pic,DrawPtP(MidPt(C1,C2),d,[5,5]),DrawPt(MidPt([0,0],C1),a): X:=[C1[1]+70,C1[2]]: pic:=pic,plot([C1,X],linestyle=3): pic:=pic,DrawPt(X,` X`): pic:=pic,DrawPt([C1[1]+5,C1[2]+2],` b`): pic:=pic,plotP({C1,C2,[0,0]}): pic:=pic,zavit(C1,8,0,evalf(arctan(m))): display(pic): end: #ConcurrentCesP(C1,C2,C3): Given three points C1,C2,C3 #draws the diagram for ConcurrentCes definition #for the circles that have their centers at C1,C2,C3 #and pass through the origin #For example, try: ConcurrentCesP([15,5],[-3,7],[-5,-8]) ConcurrentCesP:=proc(C1,C2,C3) local pic,Ci1,Ci2,Ci3,R1,R2,R3: R1:=sqrt(DeSq([0,0],C1)): R2:=sqrt(DeSq([0,0],C2)): R3:=sqrt(DeSq([0,0],C3)): pic:=implicitplot((x-C1[1])^2+(y-C1[2])^2-R1^2,x=C1[1]-R1..C1[1]+R1, y=C1[2]-R1..C1[2]+R1, axes=none,title=`Circles Ci1,Ci2, and Ci3 are concurrent `, scaling=CONSTRAINED,color=blue): pic:=pic,DrawEl(C2,[R2,R2],blue),DrawEl(C3,[R3,R3],blue): pic:=pic,DrawPt([C1[1]+R1,C1[2]], ` Ci1`): pic:=pic,DrawPt([C2[1],C2[2]+R2], ` Ci2`): pic:=pic,DrawPt([C3[1],C3[2]-R3], ` Ci3`): display(pic) end: #ConcurrentP(m,n,k): Given three slopes:m,n,k #draws the diagram for Concurrent definition #with the concurrency point the origin and the three #lines being of slopes m,n,k #For example, try: ConcurrentCesP(1,2,-3) ConcurrentP:=proc(m,n,k) local pic, A1,A2,B1,B2,C1,C2: A1:=[60,60*m]:A2:=[-60,-60*m]: B1:=[30,30*n]:B2:=[-30,-30*n]: C1:=[30,30*k]:C2:=[-30,-30*k]: pic:=plot([A1,A2], axes=none,title=`Lines L1, L2, and L3 are concurrent `, scaling=CONSTRAINED): pic:=pic,plot([B1,B2],color=green),plot([C1,C2],color=blue): pic:=pic,DrawPt(MidPt([0,0],A1),` L1`): pic:=pic,DrawPt(MidPt([0,0],B1),` L2`): pic:=pic,DrawPt(MidPt([0,0],C1),` L3`): display(pic) end: #ConcyclicP(a,b,c,d) #draws the diagram for Concyclic definition #with the points being at angles a,b,c,d #For example, try: ConcyclicP(1,2,3,4) ConcyclicP:=proc(a,b,c,d) local pic, A,B,C,D: pic:=implicitplot(x^2+y^2-1,x=-1..1, y=-1..1, axes=none,title=`Points A, B, C, and D are concyclic `, scaling=CONSTRAINED): A:=evalf([cos(a),sin(a)]): B:=evalf([cos(b),sin(b)]): C:=evalf([cos(c),sin(c)]): D:=evalf([cos(d),sin(d)]): pic:=pic,DrawPtP(A,` A`,[0.01,.05]), DrawPtP(B,` B`,[-.02,.05]), DrawPtP(C,` C`,[-.06,0]), DrawPtP(D,` D`,[-.07,-.02]): pic:=pic,plotP({A,B,C,D}): display(pic) end: #ConicThroughPointsP(d,a1,a2,a3,a3,a4,a5) #draws the diagram for ConicThroughPoints definition #with the points being at angles a1,a2,a3,a4,a5 #For example, try: ConicThroughPointsP([2,1],0,1,2,3.5 ,5) ConicThroughPointsP:=proc(d,a1,a2,a3,a4,a5) local pic, A,B,C,D,E: pic:=implicitplot(x^2/d[1]^2+y^2/d[2]^2-1,x=-d[1]..d[1], y=-d[2]..d[2], axes=none,title=`Blue Ellipse is ConicThrougPoints(A,B,C,D,E) `, scaling=CONSTRAINED,color=blue): A:=evalf([d[1]*cos(a1),d[2]*sin(a1)]): B:=evalf([d[1]*cos(a2),d[2]*sin(a2)]): C:=evalf([d[1]*cos(a3),d[2]*sin(a3)]): D:=evalf([d[1]*cos(a4),d[2]*sin(a4)]): E:=evalf([d[1]*cos(a5),d[2]*sin(a5)]): pic:=pic,DrawPtP(A,` A`,[.1,0]), DrawPtP(B,` B`,[0,.1]), DrawPtP(C,` C`,[0,.1]), DrawPtP(D,` D`,[-.15,0]), DrawPtP(E,` E`,[0,-.15]): pic:=pic,plotP({A,B,C,D,E}): display(pic) end: #ContactP(m,n): draws the diagram for the definition of #the contact triangle of the standard triangle Te(m,n) #For example, try ContactP(1/2,1/3) ContactP:=proc(m,n) local A,B,C,T,pic,A1,B1,C1,I1,S1,S2,S3: T:=Te(m,n): A:=T[1]:B:=T[2]:C:=T[3]: I1:=Incenter(m,n): pic:=plot([A,B,C,A],axes=none,title= `Blue Triangle is Contact(m,n) `,scaling=CONSTRAINED): A1:=Pt(y-m*x,Le(B,C)): B1:=Pt(y+n*x-n,Le(A,C)): C1:=Pt(y-C[2]-(x-C[1])*TS(m,1/n),Le(A,B)): pic:=pic,DrawPt([A[1]-.04,A[2]],` T1`), DrawPt([B[1]+.04,B[2]],` T2`), DrawPt([C[1],C[2]+.03],` T3`): pic:=pic,DrawPtP(I1, ` C`,[0.02,-.02]): S1:=Ft(I1,Le(T[2],T[3])): S2:=Ft(I1,Le(T[1],T[3])): S3:=Ft(I1,Le(T[1],T[2])): pic:=pic,plot([I1,S1],linestyle=3): pic:=pic,plot([I1,S2],linestyle=3): pic:=pic,plot([I1,S3],linestyle=3): pic:=pic,plot([S1,S2,S3,S1],color=blue,thickness=3): pic:=pic,plotP({A,B,C,I1}): display(pic): end: #DeSqP(A,B): draws the diagram for the definition of #DeSq(A,B) For example, try DeSq([0,0],[7,4]) DeSqP:=proc(A,B) local pic, X: pic:=plot([A,B],axes=none,title= `DeSq(A,B) = Square of the distance from A to B `,scaling=CONSTRAINED): X:=[B[1],A[2]]: pic:=pic, plot([A,X],linestyle=3): pic:=pic, plot([B,X],linestyle=3): pic:=pic, DrawPt(MidPt(A,X), `A1-B1 `): pic:=pic, DrawPt(MidPt(B,X), `A2-B2 `): pic:=pic, DrawPtP(A, ` A`,[-.25,0]),DrawPtP(B, ` B`,[0,.2]): pic:=pic,plotP({A,B}): display(pic): end: #Draws the diagram for the Ft(P,Le(A,B)) #For example, try FtP([10,0],[-2,-2],[6,6]) FtP:=proc(P,A,B) local Q,pic,C,E: Q:=Ft(P,Le(A,B)): pic:=plot([A,B],axes=none,title=`Point Q=Ft(P,L)`, scaling=CONSTRAINED): C:=[A[1]/3+2/3*B[1],A[2]/3+2/3*B[2]]: pic:=pic,DrawPt(C,` L`),DrawPtP(P,` P`,[.3,0]): pic:=pic,plot([P,Q],linestyle=3): pic:=pic,DrawPtP(Q, ` Q`,[-.3,.3]): pic:=pic,plotP({P,Q}): display(pic): end: #IncenterP(m,n): draws the diagram for the definition of #the Incenter of the standard triangle Te(m,n) #For example, try IncenterP(1/2,1/3) IncenterP:=proc(m,n) local A,B,C,T,pic,A1,B1,C1,I1,S1,S2,S3: T:=Te(m,n): A:=T[1]:B:=T[2]:C:=T[3]: I1:=Incenter(m,n): pic:=plot([A,B,C,A],axes=none,title= `I is The Incenter of Te(m,n) `,scaling=CONSTRAINED): A1:=Pt(y-m*x,Le(B,C)): B1:=Pt(y+n*x-n,Le(A,C)): C1:=Pt(y-C[2]-(x-C[1])*TS(m,1/n),Le(A,B)): pic:=pic,DrawPt([A[1]-.04,A[2]],` T1`), DrawPt([B[1]+.04,B[2]],` T2`), DrawPt([C[1],C[2]+.03],` T3`): pic:=pic,DrawPtP(I1, ` I`,[-0.01,.03]): pic:=pic,DrawCeB(Incircle(m,n)): S1:=Ft(I1,Le(T[2],T[3])): S2:=Ft(I1,Le(T[1],T[3])): S3:=Ft(I1,Le(T[1],T[2])): pic:=pic,plot([I1,S1],linestyle=3): pic:=pic,plot([I1,S2],linestyle=3): pic:=pic,plot([I1,S3],linestyle=3): pic:=pic,plot([I1,T[1]]),plot([I1,T[2]]): pic:=pic,plotP({T[1],T[2],T[3],I1}): display(pic): end: #IncircleP(m,n): draws the diagram for the definition of #the Incenter of the standard triangle Te(m,n) #For example, try IncircleP(1/2,1/3) IncircleP:=proc(m,n) local A,B,C,T,pic,A1,B1,C1,I1,S1,S2,S3: T:=Te(m,n): A:=T[1]:B:=T[2]:C:=T[3]: I1:=Incenter(m,n): pic:=plot([A,B,C,A],axes=none,title= `The blue circle is Incircle(m,n)`,scaling=CONSTRAINED): A1:=Pt(y-m*x,Le(B,C)): B1:=Pt(y+n*x-n,Le(A,C)): C1:=Pt(y-C[2]-(x-C[1])*TS(m,1/n),Le(A,B)): pic:=pic,DrawPt([A[1]-.04,A[2]],` T1`), DrawPt([B[1]+.03,B[2]],` T2`), DrawPt([C[1],C[2]+.04],` T3`): pic:=pic,DrawPtP(I1, ` I`,[-.01,.03]): pic:=pic,DrawCeB(Incircle(m,n)): S1:=Ft(I1,Le(T[2],T[3])): S2:=Ft(I1,Le(T[1],T[3])): S3:=Ft(I1,Le(T[1],T[2])): pic:=pic,plot([I1,S1],linestyle=3): pic:=pic,plot([I1,S2],linestyle=3): pic:=pic,plot([I1,S3],linestyle=3): pic:=pic,plot([I1,T[1]]),plot([I1,T[2]]): pic:=pic,DrawPtP(MidPt(I1,S1), ` r`,[0,-.01]),DrawPt(MidPt(I1,S2), ` r`), DrawPt(MidPt(I1,S3), ` r`): pic:=pic,plotP({A,B,C,I1}): display(pic): end: #InradiusP(m,n): draws the diagram for the definition of #the Inradius(m,n) #For example, try IncircleP(1/2,1/3) InradiusP:=proc(m,n) local A,B,C,T,pic,A1,B1,C1,I1,S1,S2,S3: T:=Te(m,n): A:=T[1]:B:=T[2]:C:=T[3]: I1:=Incenter(m,n): pic:=plot([A,B,C,A],axes=none,title= `The green distance is Inradius(m,n)`,scaling=CONSTRAINED): A1:=Pt(y-m*x,Le(B,C)): B1:=Pt(y+n*x-n,Le(A,C)): C1:=Pt(y-C[2]-(x-C[1])*TS(m,1/n),Le(A,B)): pic:=pic,DrawPt([A[1]-.04,A[2]],` T1`), DrawPt([B[1]+.04,B[2]],` T2`), DrawPt([C[1],C[2]+.03],` T3`): pic:=pic,DrawPtP(I1, ` C`,[0,.03]): pic:=pic,DrawCeB(Incircle(m,n)): S1:=Ft(I1,Le(T[2],T[3])): S2:=Ft(I1,Le(T[1],T[3])): S3:=Ft(I1,Le(T[1],T[2])): pic:=pic,plot([I1,S3],thickness=3,color=green): pic:=pic,plot([I1,T[1]]),plot([I1,T[2]]): pic:=pic,DrawPtP(MidPt(I1,S3), ` r`,[.015,0]): pic:=pic,plotP({A,B,C,I1}): display(pic): end: #ItIsEquilateralP(A,B): Draws the diagram for the #ItIsEquilateral defintion, with the drawn triangle being #A,C, CET(A,B) #For example, try ItIsEquilateralP([0,0],[1,24]) ItIsEquilateralP:=proc(A,B) local C,P,Ci,pic: C:=[(B[1]+A[1])/2-(A[2]-B[2])*3^(1/2)/2, B[2]/2+(A[1]-B[1])*3^(1/2)/2+A[2]/2]: pic:=plot([A,B,C,A],axes=none,title=`Triangle ABC is Equilateral`, scaling=CONSTRAINED): pic:=pic,DrawPtP(A, ` A`,[0,-.8]),DrawPtP(B, ` B`,[0,.7]), DrawPtP(C, ` C`,[.7,0]): pic:=pic,plotP({A,B,C}): display(pic): end: #ItIsParallelogramP(A,B): Draws the diagram for the #ItIsParallelogram defintion, with the vertices [0,0] #A,B,A+B #For example, try ItIsParallelogramP([2,3],[5,2]) ItIsParallelogramP:=proc(A,B) local pic, Q,T,S,R: Q:=[0,0]: T:=A: S:=[A[1]+B[1],A[2]+B[2]]: R:=B: pic:=plot([Q,T],axes=none,title=`QTSR is a Parallelogram`, scaling=CONSTRAINED,color=green): pic:=pic,plot([R,S],color=green): pic:=pic,plot([Q,R],color=blue),plot([T,S],color=blue): pic:=pic,DrawPtP(Q, ` Q`,[0,-.25]), DrawPtP(T, ` T`,[0,.2]), DrawPtP(S, ` S`,[.2,0]), DrawPtP(R, ` R`,[.25,0]): pic:=pic,plotP({Q,T,S,R}): display(pic): end: #ItIsSquareP(A): Draws the diagram for the #ItIsSquare defintion, with the vertices [0,0] #A,B,A+B where B=[-A[2],A[1]]: #For example, try ItIsSquareP([2,3]) ItIsSquareP:=proc(A) local pic, B,Q,T,S,R: B:=[-A[2],A[1]]: Q:=[0,0]: T:=A: S:=[A[1]+B[1],A[2]+B[2]]: R:=B: pic:=plot([Q,T,S,R,Q],axes=none,title=`QTSR is a Square`, scaling=CONSTRAINED): pic:=pic,DrawPtP(Q, ` Q`,[0,-.2]), DrawPtP(T, ` T`,[0.15,0]), DrawPtP(S, ` S`,[0,.15]), DrawPtP(R, ` R`,[-0.2,0]): pic:=pic,plotP({Q,T,S,R}): display(pic): end: #MidPtP(A,B): Draws the diagram for MitPt(A,B) #For example, try :MidPtP([0,0],[7,4]); MidPtP:=proc(A,B) local pic, C: C:=[(A[1]+B[1])/2,(A[2]+B[2])/2]: pic:=plot([A,B],axes=none,title=`C = MidPt(A,B)`, scaling=CONSTRAINED): pic:=pic,DrawPtP(A, ` A`,[-0.2,-0.1]), DrawPtP(B, ` B`,[0.2,0.1]),DrawPt([C[1],C[2]-.3], ` C`): pic:=pic,plot({A,B,C},style=point,symbol=CIRCLE): display(pic): end: #MirRefLeLeP(m,n): Draws the diagram for MirRefLeLeP(L1,L) #where L1=y-x*TS(m,-n) and L=y-x*m for example, try #MirRefLeLeP(1,1/2) MirRefLeLeP:=proc(m,n) local pic,O,A,B,C: O:=[0,0]: A:=[5,5*TS(m,-n)]:B:=[5,5*m]: C:=MirRefPtLe(A,y-m*x): pic:=plot([O,A],axes=none,title=`L2 =MirRefLeLe(L1,L)`, scaling=CONSTRAINED): pic:=pic,plot([O,B],color=blue, thickness=2),plot([O,C],linestyle=3): pic:=pic,DrawPt(MidPt(O,A),` L1`): pic:=pic,DrawPt(MidPt(O,B),` L`): pic:=pic,DrawPt(MidPt(O,C),` L2`): pic:=pic,DrawPtP(O,` O`,[0,-.2]): pic:=pic,DrawPtP(A,` P`,[0.2,0]): pic:=pic,plotP({O,A,C}): display(pic): end: #MirRefPtLeP(m,n): Draws the diagram for MirRefPtLeP(P,L) #where L1=y-x*TS(m,-n) and L=y-x*m for example, try #and P is on L1 with x=5 #For example, try: MirRefPtLeP(1,1/2) MirRefPtLeP:=proc(m,n) local pic,O,A,B,C,F: O:=[0,0]: A:=[5,5*TS(m,-n)]:B:=[5,5*m]: C:=MirRefPtLe(A,y-m*x): F:=Ft(A,y-m*x): pic:=plot([O,B],axes=none,color=blue, thickness=2, title=`R=MirRefPtLe(P,L)`, scaling=CONSTRAINED): pic:=pic,DrawPt(MidPt(O,B),` L`): pic:=pic,plot([A,C], linestyle=3): pic:=pic,DrawPt([A[1]+.15,A[2]-.15],` P`): pic:=pic,DrawPt([C[1]-.15,C[2]+.15],` R`): pic:=pic,DrawPtP(F, ` Q`,[0,-.25]): pic:=pic,plot({A,C,F},style=point,symbol=circle): display(pic): end: #NinePointCircleP(A,B,C): Given three points, A,B,C #draws the diagram showing the Nine Point Circle Definition #For example, try: NinePointCircleP([0,0],[10,0],[7,12]); NinePointCircleP:=proc(A1,B1,C1) local O1,D1,E1,F1,G1,H1,I1,K1,L1,M1, G,H,I,pic: D1:=Ft(A1,Le(B1,C1)):E1:=Ft(B1,Le(A1,C1)):F1:=Ft(C1,Le(A1,B1)): G1:=MidPt(A1,B1):H1:=MidPt(A1,C1):I1:=MidPt(B1,C1):O1:=Orthocenter(A1,B1,C1): K1:=MidPt(O1,A1):L1:=MidPt(O1,B1):M1:=MidPt(O1,C1): pic:=plot([A1,B1,C1,A1],axes=none,title= `Blue circle is Nine-Point Circle(A,B,C)`): pic:=pic,DrawPtP(A1,A,[-.25,-0.2]),DrawPtP(B1,B,[.25,-0.2]), DrawPtP(C1,C,[0,.3]): pic:=pic, DrawCeB(Ce(K1,L1,M1)): pic:=pic,plot({G1,H1,I1},style=point,symbol=CIRCLE): pic:=pic,plotP({A1,B1,C1}): display(pic): end: #NormalToEllipseP(d,theta0) local P,Q: Draws the diagram for the #NormalToEllipse Definition for the ellipse center [0,0] #with major and minor axes d[1],d[2], and at the point with #parameter theta0 radians For example, try NormalToElli0pse([2,1.4],2.3); NormalToEllipseP:=proc(d,theta0) local P,Q,m1,m2,m,c,M,S1,S2,pic,A,B: P:=evalf([d[1]*cos(theta0),d[2]*sin(theta0)]): m1:=-d[1]*sin(theta0): m2:=d[2]*cos(theta0): m:=evalf(-m1/m2): M:=-1/m: Q:=[P[1]-2,P[2]-2*m]: S1:=[P[1]-1,P[2]-1*M]:S2:=[P[1]+1,P[2]+M]: pic:=plot([S1,S2], linestyle=3, axes=none, scaling=CONSTRAINED, title=`Green line is NormalToEllipse(c,d,t)`): pic:=pic,DrawEl([0,0],d,blue): pic:=pic, DrawPt([P[1],P[2]-.2],` P`): pic:=pic,plot([P,Q],color=green,thickness=3): pic:=pic,DrawPtP([0,0], ` c`,[-0.13,-.13]): A:=[d[1],0]:B:=[0,d[2]]: pic:=pic,plot([[0,0],A],linestyle=3,color=blue), plot([[0,0],B],linestyle=3,color=blue): pic:=pic,DrawPt([d[1]/2,0],` d1`),DrawPt([0,d[2]/2],` d2`): pic:=pic,plot({P,[0,0]},style=point,symbol=CIRCLE): display(pic): end: #TangentToEllipseP(d,theta0): Draws the diagram for the #TangentToEllipse Definition for the ellipse center [0,0] #with major and minor axes d[1],d[2], and at the point with #parameter theta0 radians For example, try TangentToEllispse([2,1.4],2.3); TangentToEllipseP:=proc(d,theta0) local P,Q,m1,m2,m,c,M,S1,S2,pic,A,B: P:=evalf([d[1]*cos(theta0),d[2]*sin(theta0)]): m1:=-d[1]*sin(theta0): m2:=d[2]*cos(theta0): m:=evalf(-m1/m2): M:=-1/m: Q:=[P[1]-2,P[2]-2*m]: S1:=[P[1]-2,P[2]-2*M]:S2:=[P[1]+2,P[2]+2*M]: pic:=plot([S1,S2], thickness=3,color=green, axes=none, scaling=CONSTRAINED, title=`Green line is TangentToEllipse(c,d,t)`): pic:=pic,DrawEl([0,0],d,blue): pic:=pic, DrawPt([P[1],P[2]-.2],` P`): pic:=pic,DrawPt([-0.12,-0.12], ` c`): A:=[d[1],0]:B:=[0,d[2]]: pic:=pic,plot([[0,0],A],linestyle=3,color=blue), plot([[0,0],B],linestyle=3,color=blue): pic:=pic,DrawPt([d[1]/2,0],` d1`),DrawPt([0,d[2]/2],` d2`): pic:=pic,plot({P,[0,0]},style=point,symbol=CIRCLE): display(pic): end: #OrthocenterP(A,B,C):Given three specific (numerical) points #A,B,C, draws the diagram for the Orthocenter Definition OrthocenterP:=proc(Aa,Ba,Ca) local A,B,C,pic,A1,B1,C1,O,O1: #pic:=DrawTe(Aa,Ba,Ca,A,B,C): pic:=plot([Aa,Ba,Ca,Aa]): A1:=Ft(Aa,Le(Ba,Ca)): B1:=Ft(Ba,Le(Aa,Ca)): C1:=Ft(Ca,Le(Aa,Ba)): pic:=pic,plot([Aa,A1],scaling=CONSTRAINED,title=`O=Orthocenter(A,B)`, color=blue,linestyle=3), plot([Ba,B1],scaling=CONSTRAINED,color=blue,linestyle=3): O1:=Pt(Altitude(Aa,Le(Ba,Ca)),Altitude(Ba,Le(Aa,Ca))): pic:=pic,DrawPtP(O1,O,[0,-.35]): pic:=pic,DrawPtP(Aa,A,[0,-.35]): pic:=pic,DrawPtP(Ba,B,[0,-.35]): pic:=pic,DrawPtP(Ca,C,[0,.35]): pic:=pic,plotP({Aa,Ba,Ca,O1}): display(pic): end: #OtherCeCeP(P,Q,R,S): Given four points P,Q,R,S, draws the diagram for #Q=OtherCeCe(C1,C2,P) where C1=Ce(P,Q,R), and C2=Ce(P,Q,S) #For example, try: OtherCeCeP([-5,-5],[5,5],[-4,0],[6,12]) OtherCeCeP:=proc(P,Q,R,S) local C1,C2,C1a,C2a,pic,R1,S1: C1:=Ce(P,Q,R):C2:=Ce(P,Q,S): C1a:=Center(C1):C2a:=Center(C2): R1:=[C1a[1]-(R[1]-C1a[1]),C1a[2]-(R[2]-C1a[2])]: S1:=[C2a[1]-(S[1]-C2a[1]),C2a[2]-(S[2]-C2a[2])]: pic:=plot([C1a,C2a], linestyle=3, axes=none, scaling=CONSTRAINED, title=`Q=OtherCeCe(C1,C2,P) `): pic:=pic,plot({C1a,C2a},style=point,symbol=CIRCLE): pic:=pic,DrawCeB(C1),DrawCeB(C2): pic:=pic,DrawPtP(P, ` P`,[-1,-1.5]),DrawPtP(Q, ` Q`,[1.5,1]), DrawPt(R1, ` C1`),DrawPt(S1,` C2`): pic:=pic,plot([P,Q],linestyle=3): pic:=pic,plotP({P,Q}): display(pic): end: #ParEllipseP(d,theta0) : Draws the diagram for the #ParEllipse Definition for the ellipse center [0,0] #with major and minor axes d[1],d[2], and at the point with #parameter theta0 radians For example, try ParEllispseP([2,1.4],2.3); ParEllipseP:=proc(d,theta0) local P,Q,c,pic,A,B: P:=evalf([d[1]*cos(theta0),d[2]*sin(theta0)]): Q:=[P[1]-2,P[2]-2*m]: pic:= implicitplot(x^2/d[1]^2+y^2/d[2]^2-1, x=-d[1]..d[1],y=-d[2]..d[2], color=blue, axes=none, scaling=CONSTRAINED, title=`Point P is ParEllipse(c,d,t)`): pic:=pic, DrawPt([P[1],P[2]-.2],` P`): pic:=pic,DrawPt([-0.1,-0.1], ` c`): A:=[d[1],0]:B:=[0,d[2]]: pic:=pic,plot([[0,0],A],linestyle=3,color=blue), plot([[0,0],B],linestyle=3,color=blue): pic:=pic,DrawPt([d[1]/2,0],` d1`),DrawPt([0,d[2]/2],` d2`): pic:=pic,plot({P,[0,0]},style=point,symbol=CIRCLE): display(pic): end: #ParPtPerBisectP(A,B,s): Draws the diagram for ParPtPerBisect(A,B,s) #For example, try :ParPtPerBisectP([0,0],[7,4],2); ParPtPerBisectP:=proc(A,B,s) local pic, M,P,P1,Q,Q1: M:=[(A[1]+B[1])/2,(A[2]+B[2])/2]: pic:=plot([A,B],axes=none,title=`P = ParPtPerBisectPt(A,B,s)`, scaling=CONSTRAINED): pic:=pic,DrawPtP(A, ` A`,[-.3,-0.1]),DrawPtP(B, ` B`,[0.1,.3]), DrawPtP(M, ` M`,[-0.1,.3]): P:=[M[1]+s,M[2]-s/Slope(A,B)]: P1:=[M[1]+2*s,M[2]-2*s/Slope(A,B)]: pic:=pic,plot({P},style=point,symbol=CIRCLE): pic:=pic,plot([M,P1],color=blue): pic:=pic,DrawPt([P[1]+.3,P[2]], ` P `): Q:=[M[1],P[2]]: Q1:=MidPt(Q,P): pic:=pic,plot([M,Q],linestyle=3),plot([Q,P],linestyle=3): pic:=pic,DrawPt([Q1[1],Q1[2]-.2], ` s`): pic:=pic,plotP({A,B,M}): display(pic): end: #ParamCircleP(R,theta0) : Draws the diagram for the #PararmCircle Definition for the circle center [0,0] #and radius R #parameter theta0 radians For example, try ParamCircleP(2,2.3); ParamCircleP:=proc(R,theta0) local d,P,Q,c,pic,A,B: d[1]:=R:d[2]:=R: P:=evalf([d[1]*cos(theta0),d[2]*sin(theta0)]): Q:=[P[1]-2,P[2]-2*m]: pic:= implicitplot(x^2/d[1]^2+y^2/d[2]^2-1, x=-d[1]..d[1],y=-d[2]..d[2], color=blue, axes=none, scaling=CONSTRAINED, title=`Point P is a ParamCircle(c,R,t)`): pic:=pic, DrawPt([P[1],P[2]-.2],` P`): pic:=pic,DrawPt([-0.1,-0.1], ` c`): A:=[d[1],0]:B:=[0,d[2]]: pic:=pic,plot([[0,0],A],linestyle=3,color=blue), plot([[0,0],B],linestyle=3,color=blue): pic:=pic,DrawPt([d[1]/2,0],` R`),DrawPt([0,d[2]/2],` R`): pic:=pic,plot({P,[0,0]},style=point,symbol=CIRCLE): display(pic): end: #ParamLineP(m,b,t): Draws the diagram for ParamLine(m,b,t) #For example, try : ParamLineP(1,2,2) ParamLineP:=proc(m,b,t) local pic, A,B,P,A1,A2,B1,B2,P1,P2,Q: A:=[0,b]: B:=[-b/m,0]:P:=[t,m*t+b]:P1:=[1.5*t,m*1.5*t+b]: P2:=[-1.5*t,-m*1.5*t+b]: A1:=[0,2*b]: A2:=[0,-2*b]: B1:=[-2*b,0]: B2:=[2*b,0]: pic:=plot([P1,P2],title=`P = ParamLine(m,b,t)`, scaling=CONSTRAINED): pic:=pic,plot([A1,A2],thickness=2,color=blue), plot([B1,B2],thickness=2,color=blue): pic:=pic,DrawPt([P[1],P[2]+.3], ` P`): pic:=pic,plot({P},style=point,symbol=CIRCLE): pic:=pic,DrawPt([0.2,b/2],` b`),DrawPt([-b*m/2,-0.4],` -b/m`): Q:=[P[1],0]: pic:=pic,plot([P,Q],linestyle=3): pic:=pic,DrawPt([P[1]/2,-.3],` t`): pic:=pic,DrawPt(A1, `y `),DrawPt(B2, ` x`): display(pic): end: #PedalP(A,B,C,P): draws the diagram for the definition of #Pedal(A,B,C,P); #For example, try PedalP([0,0],[10,0],[7,10],[6,4]); PedalP:=proc(A,B,C,P) local pic,S1,S2,S3: pic:=plot([A,B,C,A],axes=none,title= `Blue Triangle is Pedal(A,B,C,P) `,scaling=CONSTRAINED): pic:=pic,DrawPt([A[1]-.25,A[2]],` A`), DrawPt([B[1]+.25,B[2]],` B`), DrawPt([C[1],C[2]+.3],` C`): pic:=pic,DrawPtP(P, ` P`,[0,.3]): S1:=Ft(P,Le(B,C)): S2:=Ft(P,Le(A,C)): S3:=Ft(P,Le(A,B)): pic:=pic,plot([P,S1],linestyle=3): pic:=pic,plot([P,S2],linestyle=3): pic:=pic,plot([P,S3],linestyle=3): pic:=pic,plot([S1,S2,S3,S1],color=blue,thickness=3): pic:=pic,plotP({A,B,C,P}): display(pic): end: #PerpPQP(P,Q): Draws the diagram for PerpPQ(P,Q) #For example, try :PerpPQP([0,0],[7,4]); PerpPQP:=proc(P,Q) local pic, A,B: pic:=plot([P,Q],axes=none,title=`Blue Line is PerpPQ(P,Q)`, scaling=CONSTRAINED): pic:=pic,DrawPtP(P, ` P`,[-.3,-.3]),DrawPtP(Q, ` Q`,[.2,.2]): A:=[Q[1]+2,Q[2]-2/Slope(P,Q)]: B:=[Q[1]-2,Q[2]+2/Slope(P,Q)]: pic:=pic,plot([A,B],thickness=3,color=blue): pic:=pic,plotP({P,Q}): display(pic): end: #PtP(A,B,C,D): Draws the diagram for PtP(Le(A,B),Le(C,D)) #For example, try :PtP([-10,-4],[10,7],[-5,-5],[7,8]); PtP:=proc(A,B,C,D) local pic,P: pic:=plot([A,B],axes=none,title=`P = Pt(L1,L2)`, scaling=CONSTRAINED): pic:=pic,plot([C,D],color=blue): P:=Pt(Le(A,B),Le(C,D)): pic:=pic,DrawPt([P[1],P[2]+.6], ` P`): pic:=pic,DrawPt(MidPt(P,A), ` L1`): pic:=pic,DrawPt(MidPt(P,C), ` L2`): pic:=pic,plot({P},style=point,symbol=CIRCLE): display(pic): end: #PtLeCeP(R,theta0): Draws the diagram for the PtLeCe #Definition for the circle center [0,0] and radius R #and at the point with #parameter theta0 radians For example, try PtLeCeP(4,2.3); PtLeCeP:=proc(R,theta0) local P,Q,S1,S2,pic,A,B,m1,m2,m,M,S3,C: P:=evalf([R*cos(theta0),R*sin(theta0)]): m1:=-R*sin(theta0): m2:=R*cos(theta0): m:=evalf(-m1/m2): M:=-1/m: Q:=[P[1]-2,P[2]-2*m]: C:=[-R,0]: S1:=[P[1]-4,P[2]-4*M]:S2:=[P[1]+4,P[2]+4*M]: S3:=[P[1]+2,P[2]+2*M]: pic:=plot([S1,S2], color=green, axes=none, scaling=CONSTRAINED, title=`P = PtLeCe(L,C)`): pic:=pic,DrawEl([0,0],[R,R],blue): pic:=pic, DrawPt([P[1],P[2]-.4],` P`): pic:=pic,DrawPt(S3, `L `): pic:=pic,DrawPt(C, `C `): pic:=pic,plot({P},style=point,symbol=CIRCLE): display(pic): end: #PtLiesOnCurveP(d,theta0): Draws the diagram for PtLiesOnCurve #for the ellipse center [0,0] and axes d #and at the point with #parameter theta0 radians For example, try PtLiesOnCurveP([3,4],2.3); PtLiesOnCurveP:=proc(d,theta0) local C,P, pic: P:=evalf([d[1]*cos(theta0),d[2]*sin(theta0)]): C:=evalf([d[1]*cos(theta0),d[2]*sin(-theta0)]): pic:=implicitplot(x^2/d[1]^2+y^2/d[2]^2-1,x=-d[1]..d[1],y=-d[2]..d[2] , color=green, axes=none, scaling=CONSTRAINED, title=`PtLiesOnCurve(P,C) is true`): pic:=pic, DrawPt([P[1],P[2]-.4],` P`): pic:=pic,DrawPt(C, `C `): pic:=pic,plot({P},style=point,symbol=CIRCLE): display(pic): end: #QuadP(A,B,C,D): Draws the diagram for Quad(L1,L2,L3,L4) #for the four lines Le(A,B), Le(B,C), Le(C,D), Le(D,A) #For example, try QuadP([0,0],[1,0],[2,3],[1/2,1]); QuadP:=proc(A,B,C,D) local pic: pic:=plot([A,B,C,D,A], axes=none, scaling=CONSTRAINED, title=`Blue Points are the Vertices of Quad(L1,L2,L3,L4)`): pic:=pic, DrawPt(MidPt(A,B), ` L1`), DrawPt(MidPt(B,C), ` L2`), DrawPt(MidPt(C,D), ` L3`), DrawPt(MidPt(D,A), ` L4`): pic:=pic,plot({A,B,C,D},style=point,symbol=CIRCLE,color=blue): pic:=pic,plot([[A[1]-(B[1]-A[1]),A[2]-(B[2]-A[2])], [B[1]-(A[1]-B[1]),B[2]-(A[2]-B[2])]]): pic:=pic,plot([[B[1]-(C[1]-B[1]),B[2]-(C[2]-B[2])], [C[1]-(B[1]-C[1]),C[2]-(B[2]-C[2])]]): pic:=pic,plot([[C[1]-(D[1]-C[1]),C[2]-(D[2]-C[2])], [D[1]-(C[1]-D[1]),D[2]-(C[2]-D[2])]]): pic:=pic,plot([[D[1]-(A[1]-D[1]),D[2]-(A[2]-D[2])], [A[1]-(D[1]-A[1]),A[2]-(D[2]-A[2])]]): display(pic): end: #RadicalLineP(M,R): Draws the diagram for RadicalLine(C1,C2) #for circles C1=x^2+y^2-3 and circle center M radius R #For example, try RadicalLineP([3,2],2); RadicalLineP:=proc(M,R) local Ci1,Ci2,pic: pic:=implicitplot(RadicalLine([0,0],1,M,R),x=-3..3,y=-3..3,color=blue, axes=none, thickness=2, scaling=CONSTRAINED,title=`Blue Line is RadicalLine(C1,R1,C2,R2)`): pic:=pic, DrawPt([0.3,0], ` C1`): pic:=pic, DrawPtP(M, ` C2`,[.3,0]): pic:=pic,DrawCeWR(x^2+y^2-2,Pi,` R1`,red): pic:=pic,DrawCeWR((x-M[1])^2+(y-M[2])^2-R^2,Pi,` R2`,red): pic:=pic,plotP({[0,0],M}): display(pic): end: #RadiusP(R) Draws the diagram for the Radius(C) difinition #example, type RadiusP(2) RadiusP:=proc(R) local pic: pic:=textplot([0,-R,` C`], axes=none,title=`R = Radius(C)`,scaling=CONSTRAINED): pic:=pic,DrawCeWR(x^2+y^2-R^2,Pi*1.1,`R `,red): pic:=pic,plot({[0,0]},style=point,symbol=CIRCLE): display(pic): end: #SlopeP(A,B): draws the diagram for the definition of #Slope(A,B) For example, try SlopeP([0,0],[7,4]) SlopeP:=proc(A,B) local pic, X: pic:=plot([A,B],axes=none,title= `Slope(A,B) = Rise/Run `,scaling=CONSTRAINED): X:=[B[1],A[2]]: pic:=pic, plot([A,X],linestyle=3,color=blue): pic:=pic, plot([B,X],linestyle=3,color=blue): pic:=pic, DrawPt(MidPt(A,X), `Run `): pic:=pic, DrawPt(MidPt(B,X), `Rise `): pic:=pic, DrawPtP(A, ` A`,[-.2,-.2]),DrawPtP(B, ` B`,[.2,.2]): pic:=pic,plotP({A,B}): display(pic): end: #TeP(m,n): draws the diagram for the definition of #the the standard triangle Te(m,n) #For example, try TeP(1/2,1/3) TeP:=proc(m,n) local A,B,C,T,pic,A1,B1,C1,I1,S1,S2,S3: T:=Te(m,n): A:=T[1]:B:=T[2]:C:=T[3]: I1:=Incenter(m,n): pic:=plot([A,B,C,A],axes=none,title= `Slope(A,I) = m, Slope(B,I) = -n `,scaling=CONSTRAINED): A1:=Pt(y-m*x,Le(B,C)): B1:=Pt(y+n*x-n,Le(A,C)): C1:=Pt(y-C[2]-(x-C[1])*TS(m,1/n),Le(A,B)): pic:=pic,DrawPt([A[1]-.04,A[2]-.01],` A`), DrawPt([B[1]+.03,B[2]-.01],` B`), DrawPt([C[1],C[2]+.03],` C`): pic:=pic,DrawPtP(I1, ` I`,[-.01,.03]): pic:=pic,DrawCeB(Incircle(m,n)): S1:=Ft(I1,Le(T[2],T[3])): S2:=Ft(I1,Le(T[1],T[3])): S3:=Ft(I1,Le(T[1],T[2])): pic:=pic,plot([I1,S1],linestyle=3): pic:=pic,plot([I1,S2],linestyle=3): pic:=pic,plot([I1,S3],linestyle=3): pic:=pic,plot([I1,T[1]]),plot([I1,T[2]]): pic:=pic,plotP({A,B,C,I1}): display(pic): end: #TouchCeCeP(P): Draws the diagram for TouchCeCeP #by displaying the unit circle and the circle with center P #that touches it TouchCeCeP:=proc(P) local pic, R: R:=evalf(sqrt(DeSq(P,[0,0]))-1): pic:=implicitplot(x^2+y^2-1,x=-1..1,y=-1..1, axes=none,title=`TouchCeCeP(C1,C2) is true`, scaling=CONSTRAINED): pic:=pic,DrawEl(P,[R,R],red): pic:=pic,DrawPt([1/sqrt(2),-1/sqrt(2)], ` C1`): pic:=pic,DrawPt([P[1],P[2]-R], ` C2`): display(pic): end: #LeP(A,B): Draws the diagram for Le(A,B) #For example, try :LeP([0,0],[7,4]); LeP:=proc(A,B) local pic, C,A1,B1: C:=MidPt(A,B): A1:=[A[1]-(B[1]-A[1])/2,A[2]-(B[2]-A[2])/2]: B1:=[B[1]+(B[1]-A[1])/2,B[2]+(B[2]-A[2])/2]: pic:= plot([A1,B1],axes=none,title=` Red Line is Le(A,B)`, scaling=CONSTRAINED): pic:=pic,DrawPt([A[1],A[2]-.5], ` A`), DrawPt([B[1],B[2]-.5], ` B`): pic:=pic,plot({A,B},style=point,symbol=CIRCLE): display(pic): end: #LePtSlopeP(A,B): draws the diagram for the definition of #LePtSlope(A,Slope(A,B)) For example, try LePtSlopeP([0,0],[8,16]) LePtSlopeP:=proc(A,B) local pic, X,X1,M1,M2: pic:=plot([A,B],axes=none,title= `Blue line is LePtSlope(P,m) `,scaling=CONSTRAINED,color=blue): X:=MidPt(A,B): X1:=[X[1],A[2]]: pic:=pic, plot([A,X1],linestyle=3): pic:=pic, plot([X1,X],linestyle=3): M1:=MidPt(A,X1): M2:=MidPt(X,X1): pic:=pic, DrawPt([M1[1],M1[2]-.4] , `1 `): pic:=pic, DrawPt([M2[1]+.4,M2[2]], `m `): pic:=pic, DrawPt([A[1]-.6,A[2]-.3], ` P`): pic:=pic, plot([[A[1],A[2]-.6],[X1[1],X1[2]-.6]],color=black): pic:=pic, DrawPt([A[1],A[2]-.6],`<`): pic:=pic, DrawPt([X1[1],X1[2]-.6],`>`): pic:=pic, plot([ [X1[1]+.4,X1[2]] ,[X[1]+.4,X[2]] ],color=black): pic:=pic, DrawPt([X1[1]+.4,X1[2]],`v`): pic:=pic, DrawPt([X[1]+.4,X[2]],`^`): pic:=pic,plot({A},style=point,symbol=CIRCLE): pic:=pic,plotP({A}): display(pic): end: #LePtAngleP(A,B): draws the diagram for the definition of #LePtAngle(A,arctan(Slope(A,B))) For example, try LePtAngleP([0,0],[7,4]) LePtAngleP:=proc(A,B) local pic, X: pic:=plot([A,B],axes=none,title= `Blue line is LePtAngle(P,a) `,scaling=CONSTRAINED,color=blue): X:=[B[1],A[2]]: pic:=pic, plot([A,X],linestyle=3): pic:=pic, DrawPtP(A, ` P`,[-.2,-0.1]): pic:=pic,DrawPt([A[1]+.7,A[2]+.15],` a`): pic:=pic,plot([A[1]+.9*cos(t),A[2]+.8*sin(t),t=0..evalf(arctan(Slope(A,B)))], color=green): pic:=pic,plotP({A}): display(pic): end: plotP:=proc(kv):plot(kv,style=point,symbol=CIRCLE):end: DrawPtP:=proc(P,NP,DE): DrawPt([P[1]+DE[1],P[2]+DE[2]],NP): end: #zavit(B,R,s,f): draws a circular arc with B as radius #from t=s to t=f zavit:=proc(B,R,s,f) local t : plot([B[1]+R*cos(t),B[2]+R*sin(t),t=s..f],color=green,axes=none, scaling=CONSTRAINED): end: #####Verne ez:=proc():print(`PtCiChord(P), FNG(c,R) `): end: #Def (The point of intersection of lines Le1 and Le2) Pt:=proc(Le1,Le2) local q:q:=solve( {numer(normal(Le1)),numer(normal(Le2))},{x,y}): [normal(simplify(subs(q,x))),normal(simplify(subs(q,y)))]:end: #Def(Area of triangle ABC) AREA:=proc(A,B,C):normal(expand((B[1]*C[2]-B[2]*C[1]-A[1]*C[2]+A[2]*C[1] -B[1]*A[2]+B[2]*A[1])/2)):end: #Def (The eq. of the line joining A and B) Le:=proc(A,B) AREA(A,B,[x,y]):end: #Def (Generic point on a Parametric circle center [c[1],c[2]] and radius R) ParamCircle:=proc(c,R,t):[c[1]+R*(t+1/t)/2,c[2]+R*(t-1/t)/2/I]:end: #Tangent(Ce1,Pt1): Given a circle Ce1, and a point Pt1 #on it, finds the equation of the tangent Tangent:=proc(Ce1,Pt1) local A,x0,y0: A:=coeff(Ce1,x,2):x0:=Pt1[1]: y0:=Pt1[2]: numer(normal((y-y0)*(2*A*y0+coeff(Ce1,y,1))+(x-x0)*(2*A*x0+coeff(Ce1,x,1)))): end: #PtCiChord(P): You draw two tangents from a point P #to the circle unit circle, the equation of the chord joining #the two touching points #Try: PtCiChord([2,0]): PtCiChord:=proc(P) local s,P1,Ta1,lu,L,c : P1:=ParamCircle([0,0],1,s): Ta1:=Tangent(x^2+y^2-1,P1): lu:=solve(subs({x=P[1],y=P[2]},Ta1),s): L:=expand(Le(subs(s=lu[1],P1),subs(s=lu[2],P1))): if subs({x=0,y=0},L)<>0 then c:=subs({x=0,y=0},L): RETURN(simplify(L/c)): elif subs({x=0},L)<>0 then c:=subs({x=0},L): RETURN(simplify(L/c)): elif subs({y=0},L)<>0 then c:=subs({y=0},L): RETURN(simplify(L/c)): else RETURN(L): fi: end: #PtCiChord1(P): You draw two tangents from a point P #to the circle unit circle, the equation of the chord joining #the two touching points #Try: PtCiChord([2,0]): PtCiChord1:=proc(P) local s,P1,Ta1,lu,L,c,P1a,P1b : P1:=ParamCircle([0,0],1,s): Ta1:=Tangent(x^2+y^2-1,P1): lu:=solve(subs({x=P[1],y=P[2]},Ta1),s): P1a:=evalf(subs(s=lu[1],P1)): P1b:=evalf(subs(s=lu[2],P1)): P1a:=[coeff(P1a[1],I,0),coeff(P1a[2],I,0)]: P1b:=[coeff(P1b[1],I,0),coeff(P1b[2],I,0)]: P1a,P1b: end: #FNG(c,R): The Jules Verne problem from "Paris in the 20th century" FNG:=proc(c,R) local t,P,L,Ta,lu,ku: P:=ParamCircle(c,R,t): L:=PtCiChord(P): Ta:=Tangent((x-c[1])^2+(y-c[2])^2-R^2,P): lu:=Pt(L,Ta): ku:=eliminate({numer(x-lu[1]),numer(y-lu[2])},t)[2][1]: normal(ku): end: #FNG1(a,r,t): The Jules Verne problem from "Paris in the 20th century" FNG1:=proc(a,r,t) local P,L,Ta,lu,ku: P:=ParamCircle1([a,0],r,t): L:=PtCiChord(P): L:=coeff(coeff(L,x,1),I,0)*x+coeff(coeff(L,y,1),I,0)*y+ coeff(coeff(coeff(L,x,0),y,0),I,0): Ta:=Tangent((x-c[1])^2+(y-c[2])^2-R^2,P): lu:=Pt(L,Ta): lu: end: #DrawPtCeChord(P): the picture of the #tangents from a point P #to the unit circle, and the line joining them #Try: DrawPtCeChord([2,0]): DrawPtCeChord:=proc(P) local s,P1,Ta1,lu,L,c,d,P1a,P1b,P1a1,P1b1: P1:=ParamCircle([0,0],1,s): d:=DrawCe(x^2+y^2-1): d:=d,DrawPt(P,[a,b]): Ta1:=Tangent(x^2+y^2-1,P1): lu:=solve(subs({x=P[1],y=P[2]},Ta1),s): P1a:=evalf(subs(s=lu[1],P1)): if abs(coeff(P1a[1],I,1))>10^(-5) or abs(coeff(P1a[2],I,1))>10^(-5) then RETURN(FAIL): else P1a:=[coeff(P1a[1],I,0),coeff(P1a[2],I,0)]: fi: P1b:=evalf(subs(s=lu[2],P1)): if abs(coeff(P1b[1],I,1))>10^(-5) or abs(coeff(P1b[2],I,1))>10^(-5) then RETURN(FAIL): else P1b:=[coeff(P1b[1],I,0),coeff(P1b[2],I,0)]: fi: d:=d,DrawLeDashedC(P,P1a,pt,``,blue),DrawLeDashedC(P,P1b,pt,``,blue): P1a1:=[P1a[1]+1.5*(P1b[1]-P1a[1]),P1a[2]+1.5*(P1b[2]-P1a[2])]: P1b1:=[P1a[1]-.5*(P1b[1]-P1a[1]),P1a[2]-.5*(P1b[2]-P1a[2])]: d:=d,DrawLe(P1a1,P1b1,``,``): d: end: #TangentToEllipsePnaked(M,d,theta0): Draws the diagram for the #TangentToEllipse Definition for the ellipse center M #with major and minor axes d[1],d[2], and at the point with #parameter theta0 radians For example, try TangentToEllispse([2,1.4],2.3); TangentToEllipsePnaked:=proc(Mer,d,theta0) local P,Q,m1,m2,m,c,M,S1,S2,pic,A,B: P:=evalf([Mer[1]+d[1]*cos(theta0),Mer[2]+d[2]*sin(theta0)]): m1:=-d[1]*sin(theta0): m2:=d[2]*cos(theta0): m:=evalf(-m1/m2): M:=-1/m: Q:=[P[1]-2,P[2]-2*m]: S1:=[P[1]-2,P[2]-2*M]:S2:=[P[1]+2,P[2]+2*M]: pic:=plot([S1,S2], color=green, axes=none, scaling=CONSTRAINED): pic:=pic,DrawEl(Mer,d,blue): pic:=pic, DrawPt([P[1],P[2]-.2],` `): pic:=pic,DrawPt([-0.12,-0.12], ` `): A:=[Mer[1]+d[1],Mer[2]]:B:=[Mer[1],Mer[2]+d[2]]: #pic:=pic,plot([[0,0],A],linestyle=3,color=blue), #plot([[0,0],B],linestyle=3,color=blue): pic:=pic,DrawPt([Mer[1]+d[1]/2,Mer[2]],` `),DrawPt([Mer[1],Mer[2]+d[2]/2],` `): pic:=pic,plot({P,Mer},style=point,symbol=CIRCLE): pic: end: #FNGverbose(c,R): The Jules Verne problem from "Paris in the 20th century" FNGverbose:=proc(c,R) local t,P,L,Ta,lu,ku: P:=ParamCircle(c,R,t): L:=PtCiChord(P): Ta:=Tangent((x-c[1])^2+(y-c[2])^2-R^2,P): lu:=Pt(L,Ta): ku:=eliminate({numer(x-lu[1]),numer(y-lu[2])},t)[2][1]: normal(ku): end: #FNGt(a,R,t): The Jules Verne problem from "Paris in the 20th century" FNGt:=proc(a,r,t) local P,L,Ta,lu: P:=ParamCircle([a,0],r,t): L:=PtCiChord(P): Ta:=Tangent((x-a)^2+y^2-r^2,P): lu:=Pt(L,Ta): lu: end: #FNGp(a,r,theta): draws the Gigoujeau scenario #with O' being the unit circle, O is the #circle radius r center [a,0] and the point is #[a+r*cos(theta),r*sin(theta)] #Try: #FNGp(3,2,Pi/3); FNGp:=proc(a,r,t) local d,Ka,mu,fu: d:=DrawCe(x^2+y^2-1): d:=d,TangentToEllipsePnaked([a,0],[r,r],t): mu:=PtCiChord1([a+r*cos(t),r*sin(t)]): d:=d, DrawLe(mu[1],mu[2],``,``): Ka:=evalf(FNGt(a,r,exp(t*I))): Ka:=[coeff(Ka[1],I,0),coeff(Ka[2],I,0)]: d:=d,DrawLeGreen(Ka, [a+r*cos(t),r*sin(t)],``,``): d:=d,DrawLe(Ka,mu[1],``,``): d:=d,DrawLeDashedC(evalf([a+r*cos(t),r*sin(t)]),mu[1],``,``,red): d:=d,DrawLeDashedC(evalf([a+r*cos(t),r*sin(t)]),mu[2],``,``,red): d:=d,DrawPt([a,-.3],`(a,0)`): fu:=FNG([a,0],r): d:=d,implicitplot(fu,x=-2*abs(Ka[1])..2*abs(Ka[1]), y=-abs(Ka[2])..abs(Ka[2]),color=black,numpoints=20000, scaling=CONSTRAINED): d:=d,DrawLeDashedC([a,0],[a+r/2-0.2,0],``,``,blue): d:=d,DrawLeDashedC([a+r/2+0.2,0],[a+r,0],``,``,blue): d:=d,DrawPt([a+r/2,0],` R `): d:=d, DrawPt([0,-.2], ` (0,0) `): d:=d,DrawCe(x^2+y^2-0.01^2): display(d): end: #FNGp1(a,r,theta): draws the Gigoujeau scenario #with O' being the unit circle, O is the #circle radius r center [a,0] and the point is #[a+r*cos(theta),r*sin(theta)] #Try: #FNGp1(3,2,Pi/3); FNGp1:=proc(a,r,t) local d,Ka,mu,fu: d:=DrawCe(x^2+y^2-1): d:=d,TangentToEllipsePnaked([a,0],[r,r],t): mu:=PtCiChord1([a+r*cos(t),r*sin(t)]): d:=d, DrawLe(mu[1],mu[2],``,``): Ka:=evalf(FNGt(a,r,exp(t*I))): Ka:=[coeff(Ka[1],I,0),coeff(Ka[2],I,0)]: d:=d,DrawLeGreen(Ka, [a+r*cos(t),r*sin(t)],``,``): d:=d,DrawLe(Ka,mu[1],``,``): d:=d,DrawLeDashedC(evalf([a+r*cos(t),r*sin(t)]),mu[1],``,``,red): d:=d,DrawLeDashedC(evalf([a+r*cos(t),r*sin(t)]),mu[2],``,``,red): d:=d,DrawPt([a,-.3],``): fu:=FNG([a,0],r): d:=d,implicitplot(fu,x=-2*abs(Ka[1])..2*abs(Ka[1]), y=-abs(Ka[2])..abs(Ka[2]),color=black,numpoints=20000, scaling=CONSTRAINED): d:=d,DrawPt([a+r/2,0],` `): d:=d, DrawPt([0,-.2], ` `): d:=d,DrawCe(x^2+y^2-0.01^2): display(d): end: