           The pst-euclide.sty Package

Version 0.β.5

Dominique Rodriguez

May 2, 2002

WARNING

This is a β-version, it is still in development, the macros name can and will change without upwardcompatibility.

Contents

1 Special specifications 2 1.1 PStricks Options . . . . . . . . . . . 2 1.2 Conventions . . . . . . . . . . . . . . 2

2 Basic Objects 2

2.1 Points . . . . . . . . . . . . . . . . . 2 2.1.1 default axes . . . . . . . . . . 2 2.1.2 User defined axes . . . . . . . 3

2.2 Segment mark . . . . . . . . . . . . . 3 2.3 Triangles . . . . . . . . . . . . . . . . 4 2.4 Angles . . . . . . . . . . . . . . . . . 4 2.5 Lines, half-lines and segments …. 5 2.6 Circles . . . . . . . . . . . . . . . . . 5 2.7 Circle arcs . . . . . . . . . . . . . . . 6 2.8 Curved abscissa . . . . . . . . . . . . 7 2.9 Généric curve . . . . . . . . . . . . . 7

3 Geometric Transformations 7 3.1 Central symmetry . . . . . . . . . . . 8 3.2 Orthogonal (or axial) symmetry … 8 3.3 Rotation . . . . . . . . . . . . . . . . 8 3.4 Translation . . . . . . . . . . . . . . 9 3.5 Homothetie . . . . . . . . . . . . . . 9 3.6 Orthogonal projection . . . . . . . . 10

4 Special object 10 4.1 Midpoint . . . . . . . . . . . . . . . . 10 4.2 Triangle center of gravity . . . . . . . 10 4.3 Centre of the circumcircle of a triangle 11 4.4 Perpendicular bisector of a segment . 11

4.5 Bissectors of angles . . . . . . . . . . 12

5 Intersections 12 5.1 Line-Line . . . . . . . . . . . . . . . 12 5.2 Circle–Line . . . . . . . . . . . . . . 13 5.3 Circle–Circle . . . . . . . . . . . . . . 14

6 Examples gallery 15 6.1 Basic geometry . . . . . . . . . . . . 15 6.1.1 Drawing of the bissector … 15 6.1.2 German right angle . . . . . . 16 6.1.3 Triangle lines . . . . . . . . . 17 6.1.4 Euler circle . . . . . . . . . . 18 6.1.5 Orthocenter and hyperbola . . 19 6.1.6 17 sides regular polygon … 20 6.1.7 Circles tangents . . . . . . . . 21 6.1.8 Fermat’s point . . . . . . . . 22 6.1.9 Escribed and inscribed circles

of a triangle . . . . . . . . . . 23

6.2 Some locus points . . . . . . . . . . . 24 6.2.1 Parabola . . . . . . . . . . . . 24 6.2.2 Hyperbola . . . . . . . . . . . 25 6.2.3 Cycloid . . . . . . . . . . . . 25 6.2.4 Hypocycloids (Astroid and

Deltoid) . . . . . . . . . . . . 26

6.3 Lines and circles envelope . . . . . . 27 6.3.1 Conics . . . . . . . . . . . . . 27 6.3.2 Cardioid . . . . . . . . . . . . 28 6.4 Homotethy and fractals . . . . . . . . 28 6.5 hyperbolic geometry: a triangle and

its altitudes . . . . . . . . . . . . . . 29

1 Special specifications

1.1 PStricks Options

The package activates the \SpecialCoor mode. This mode extend the coordinates specification. Furthermore the plotting type is set to dimen=middle, which indicates that the position of the drawing is done according to the middle of the line. Please look at the user manual for more information about these setting.

At last, the working axes are supposed to be (ortho)normed.

1.2 Conventions

For this manual, I used the geometric French conventions for naming the points:

• O is a centre (circle, axes, symmetry, homothety, rotation);

• I defined the unity of the abscissa axe, or a midpoint;

• J defined the unity of the ordinate axe;

• A, B, C, D are points ;

• M′ is the image of M by a transformation ;

At last, although these are nodes in PStricks, I treat them intentionally as points.

2 Basic Objects

2.1 Points

2.1.1 default axes

\pstGeonode[⟨par⟩]{⟨A⟩}

This command defines a geometrical point associated with a node. This point has a node name ⟨A⟩ which defines the default label put on the picture. This label is managed by default in mathematical mode, the boolean parameter PtNameMath can modify this behavior and let manage the label in normal mode. It is put at a distance of 1em of the center of the node with a angle of PosAngle(0 by default). It is possible to specify another label using the parameter PointName, and an empty label can be specified by selecting the value none, in that case the point will have no name on the picture.

The point symbol is given by the parameter PointSymbol (* by default). The symbol is the same as used by the macro \pstdot. This parameter can be set to none, which means that neither the point nor its label will be drawn on the picture.

Here are the possible values for this parameter:

• *: • o: • +: • x:

                                • asterisk :
                                • oplus :
                                • otimes :
                                • triangle:

                                                             • triangle*:
                                                             • square:
                                                             • square*:
                                                             • diamond :

• diamond* : ; • pentagon:  • pentagon* ; • |:

A B_{1} B_{2}

\pstGeonode{A}
\pstGeonode[PosAngle=-90](1,2){B_1}
\pstGeonode[PointSymbol=o, PtNameMath=false,
            PointName=$B_2$, linecolor=red](-2,1){B2}

Obviously, the nodes appearing in the picture can be used as normal pstricks nodes. Thus, it is possible to reference a point from here.

2.1.2 User defined axes

\pstOIJGeonode[⟨par⟩](x, y){⟨A⟩}{⟨O⟩}{⟨I⟩}{⟨J⟩}

This command allows the placement of points in any landmark(?) defined by the three points (O; I; J).

\begin{matrix}O \\ I \\ J \\ A \\ B \\ C \\ D \end{matrix}

\pstGeonode[PosAngle=-135]{O}
\pstGeonode[PosAngle=-90](1,0.5){I}
\pstGeonode[PosAngle=-180](0.5,2){J}
\pstLineAB[nodesep=100]{O}{I}
\pstLineAB[nodesep=100]{O}{J}
\multips(-5,-2.5)(1,0.5){11}{\psline(0,-.15)(0,.15)}
\multips(-5,-2.5)(1,0.5){11}
  {\psline[linestyle=dotted](-10,-40)(10,40)}
\multips(-2,-8)(0.5,2){9}{\psline(-.15,0)(.15,0)}
\multips(-2,-8)(0.5,2){9}
  {\psline[linestyle=dotted](-10,-5)(10,5)}
\psset{PointSymbol=x}
\pstOIJGeonode[PosAngle=-90](3,1){A}{O}{I}{J}
\pstOIJGeonode(-2,1){B}{O}{I}{J}
\pstOIJGeonode(-1,-1.5){C}{O}{I}{J}
\pstOIJGeonode(2,-1){D}{O}{I}{J}

2.2 Segment mark

A segment can be drawn using the \ncline command. However, for marking a segment there is the following command:

\pstMarkSegment[⟨par⟩]{⟨A⟩}{⟨B⟩}

The symbol drawn on the segment is given by the parameter SegmentSymbol. Its value can be any valid command which can be used in math mode. Its default value is pstSlashsSlash, which produced two slashes on the segment. The segment is drawn.

\begin{matrix}A \\ B \\ C \\ D \\ E \end{matrix} // // // // //

                              \rput{18}{%
                                \pstGeonode(2,0){A}
                                \pstGeonode[PosAngle=90, PointSymbol=x](2;72){B}
                                \pstGeonode[PosAngle=180](2;144){C}
                                \pstGeonode[PosAngle=-90](2;216){D}
                                \pstGeonode[PosAngle=-90](2;288){E}}
                              \pstSegmentMark{A}{B}
                              \pstSegmentMark[linecolor=green]{B}{C}
                              \pstSegmentMark[linewidth=2pt]{C}{D}
                              \pstSegmentMark{D}{E}
                              \pstSegmentMark{E}{A}

2.3 Triangles

The more classical figure, it has its own macro for a quick definition:

\pstTriangle[⟨par⟩] (x_{A}; y_{A}){⟨A⟩}(x_{B}; y_{B}){⟨B⟩}(x_{C}; y_{C}){⟨C⟩}

In order to accurately put the name of the points, there are three parameters PosAngleA, PosAngleB and PosAngleC, which are associated respectively to the nodes ⟨A⟩, ⟨B⟩ et ⟨C⟩. Obviously they have the same meaning as the parameter PosAngle. If one or more of such parameters is omitted, the value of

PosAngle is taken.

In the same way there are parameters for controlling the symbol used for each points: PointSymbolA, PointSymbolB and PointSymbolC. They are equivalent to the parameter PointSymbol. The management of the default value followed the same rule.

\begin{matrix}A \\ B \\ C \end{matrix}

                              \pstTriangle[PosAngleA=-90, PosAngleB=90, PosAngleC=180,
                                PointSymbol=square, PointSymbolC=o,
                                linecolor=blue, linewidth=1.5pt]
                                (1.5,-1){A}(0,1){B}(-1,-.5){C}

2.4 Angles

Each angle is defined with three points. The vertex is the second point. Their order is important because it is assumed that the angle is specified in the direct order. The first command is the marking of a right angle:

\pstRightAngle[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨C⟩}

The only parameter controlling this command, excepting the ones which controlled the line, is RightAngleSize which defines the size of the symbol(0.28 unit by default).

For other angles, there is the command:

\pstMarkAngle[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨C⟩}

The label can be any valid TEX box, it is put at LabelSep (1 unit by default) of the node in the direction of the bisector of the angle modified by LabelAngleOffset(0 by default) and positioned using LabelRefPt (c by default). Furthermore the arc used for marking has a radius of MarkAngleRadius (.4 unit by default). At least, it is possible to place an arrow using the parameter arrows.

θ γ

                              \pstTriangle[PointSymbol=none](2;15){A}(2;85){B}(2;195){C}
                              \pstRightAngle[RightAngleSize=.3, linecolor=red,
                                linewidth=.5pt]{C}{B}{A}
                              \pstMarkAngle[linecolor=cyan,
                                linewidth=1.5pt]{A}{C}{B}{$\theta$}
                              \pstMarkAngle[linecolor=red, linewidth=1.5pt,
                                arrows=->]{B}{A}{C}{$\gamma$}

2.5 Lines, half-lines and segments

The classical line!

\pstLineAB[⟨par⟩]{⟨A⟩}{⟨B⟩}

In order to control its length^{1}, the two parameters nodesepA et nodesepB specify the abscissa of the extremity of the drawing part of the line. A negative abscissa specify an outside point, while a positive abscissa specify an internal point. If these parameters have to be equal, nodesep can be used instead. The default value of these parameters is equal to 0.

\begin{matrix}A \\ B \end{matrix}

                              \pstGeonode(1,1){A}\pstGeonode(-1,-1){B}
                              \pstLineAB[nodesepA=-.4, nodesepB=-1, linecolor=green]{A}{B}
                              \pstLineAB[nodesep=.4, linecolor=red]{A}{B}

2.6 Circles

A circle can be defined either with its center and a point of its circumference, or with two diameterly opposed points. There is two commands :

\pstCircleOA[⟨par⟩]{⟨O⟩}{⟨A⟩} \pstCircleAB[⟨par⟩]{⟨A⟩}{⟨B⟩}

For the first macro, it is possible to omit the second point and then to specify a radius or a diameter using the parameters Radius and Diameter. The values of these parameters must be specified with one of the two following macros :

\pstDistAB[⟨par⟩]{⟨A⟩}{⟨B⟩} \pstDistVal[⟨par⟩]{⟨x⟩}

1which is the comble for a line!

The first specifies a distance between two points. The parameter DistCoef can be used to specify a coefficient to reduce or enlarge this distance. To be taken into account this last parameter must be specified before the distance. The second macro can be used to specify an explicit numeric value.

We will see later how to draw the circle crossing three points.

With this package, it becomes possible to draw:

• the circle of center A crossing B ;

• the circle of center A whose radius is AC ;

• the circle of center A whose radius is BC ;

• the circle of center B whose radius is AC ;

• the circle of center B of diameter AC ;

• the circle whose diameter is BC ;

\begin{matrix}A \\ B \\ C \end{matrix}

\psset{linewidth=2pt}
\pstGeonode(1,0){A}
\pstGeonode[PosAngle=-135](-2,-1){B}
\pstGeonode[PosAngle=90, PointSymbol=square](0,1){C}
\pstCircleOA[linecolor=red]{A}{B}
\pstCircleOA[linecolor=green, DistCoef=2 3 div, Radius=\pstDistAB{A}{C}]{A}{}
\pstCircleOA[linecolor=blue, Radius=\pstDistAB{B}{C}]{A}{}
\pstCircleOA[linecolor=Sepia, Radius=\pstDistAB{A}{C}]{B}{}
\pstCircleOA[linecolor=Aquamarine, Diameter=\pstDistAB{A}{C}]{B}{}
\pstCircleAB[linecolor=RoyalBlue]{B}{C}

2.7 Circle arcs

\pstArcOAB[⟨par⟩]{⟨O⟩}{⟨A⟩}{⟨B⟩} \pstArcnOAB[⟨par⟩]{⟨O⟩}{⟨A⟩}{⟨B⟩}

These two macros draw circle arcs, O is the center, the radius defined by OA, the beginning angle given by A and the final angle by B. Finally, the first macro draws the arc in the direct way, whereas the second in the indirect way. It is not necessary that the two points are at the same distance of O.

\begin{matrix}A \\ B \\ O \end{matrix}

                              \pstGeonode[PosAngle=180](1.5;24){A}
                              \pstGeonode(1.8;-31){B}
                              \pstGeonode{O}
                              \psset{arrows=->, arrowscale=2}
                              \pstArcOAB[linecolor=red, linewidth=1.5pt]{O}{A}{B}
                              \pstArcOAB[linecolor=blue, linewidth=1.5pt]{O}{B}{A}
                              \pstArcnOAB[linecolor=green, linewidth=1pt]{O}{A}{B}
                              \pstArcnOAB[linecolor=magenta, linewidth=1.5pt]{O}{B}{A}

2.8 Curved abscissa

A point can be positioned on a circle using its curved abscissa.

\pstCurvAbsNode[⟨par⟩]{⟨O⟩}{⟨A⟩}{⟨B⟩}{⟨Abs⟩}

The point ⟨B⟩ is positioned on the circle of center ⟨O⟩ crossing ⟨A⟩, with the curved abscissa ⟨Abs⟩. The origin is ⟨A⟩ and the direction is anti-clockwise by default. The parameter CurvAbsNeg (false by default) can change this behavior.

O A M_{1} M_{2}

                              \pstGeonode{O}\pstGeonode(2,0){A}
                              \pstCircleOA{O}{A}
                              \pstCurvAbsNode{O}{A}{M_1}{\pstDistVal{5}}
                              \pstCurvAbsNode[CurvAbsNeg=true]{O}{A}{M_2}{\pstDistAB{A}{M_1}}

2.9 Généric curve

It is possible to generate a set of point using a loop, and to give them a generic name defined by a radical and a number. The following command can draw a interpolated curve crossing all such kind of points.

\pstGenericCurve[⟨par⟩]{⟨Radical⟩}{⟨n_{1}⟩}{⟨n_{2}⟩}

The curve is drawn on the points whose name is defined using the radical ⟨Radical⟩ followed by a number from ⟨n_{1}⟩ to ⟨n_{2}⟩. In order to manage side effect, the parameters GenCurvFirst et GenCurvLast can be used to specified special first or last point. The parameter GenCurvInc can be used to modify the increment from a point to the next one (1 by default).

A M_{20} M_{40} M_{60} M_{80} M_{100} M_{120} M_{140} M_{160} M_{180} M_{200} M_{220} M_{240} M_{260} M_{280} M_{300} M_{320} M_{340} M_{360} \psset{unit=.00625}

                              \pstGeonode{A}
                              \multido{\n=20+20}{18}{\pstGeonode[PointName=M_{\n}](\n;\n){M_\n}}
                              \pstGenericCurve[GenCurvFirst=A, GenCurvInc=20,
                                linecolor=blue, linewidth=.5pt]{M_}{20}{360}

3 Geometric Transformations

The geometric transformation are the ideal tools to construct geometric figures. All the classical transformation are accessible with the following macros.

They share the parameter CodeFig which draws the specific constructions lines. Its default value is false, and a true value activates this optional drawing.

The drawing is done using the line style CodeFigStyle (dashed by default), with the color CodeFigColor (cyan by default).

3.1 Central symmetry

\pstSymO[⟨par⟩]{⟨O⟩}{⟨M⟩}{⟨M′⟩}

Draw the symmetric point in relation to point O. The classical parameter of point creation are usable here, and also for all the following functions.

O A B C // // D / /

\psset{CodeFig=true}
\pstGeonode[PosAngle=20]{O}
\pstGeonode[PosAngle=90](-.6,1.5){A}
\pstGeonode(1.6,-.5){B}
\pstSymO[CodeFigColor=blue, PosAngle=-90]{O}{A}{C}
\pstSymO[SegmentSymbol=pstslash, PosAngle=180]
  {O}{B}{D}
\pstLineAB{A}{B}\pstLineAB{C}{D}
\pstLineAB{A}{D}\pstLineAB{C}{B}

3.2 Orthogonal (or axial) symmetry

\pstOrtSym[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨M⟩}{⟨M′⟩}

Draw the symmetric point in relation to line (AB).

A B C D A_{′} // // B_{′} / /

\pstTriangle[PosAngleB=180]
  (4,1){A}(1,3){B}(5,5){C}
\pstOrtSym{A}{B}{C}{D}
\psset{CodeFig=true}
\pstOrtSym[dash=2mm 2mm, CodeFigColor=red]
  {C}{B}{A}{A'}
\pstOrtSym[SegmentSymbol=pstslash, linestyle=dotted,
  dotsep=3mm, CodeFigColor=blue]
  {C}{A}{B}{B'}

3.3 Rotation

\pstRotation[⟨par⟩]{⟨O⟩}{⟨M⟩}{⟨M′⟩}

Draw the image of M by the rotation of center O and angle given by the parameter RotAngle. This later can be an angle specified by three points. In such a case, the following function must be used:

\pstAngleABC{⟨A⟩}{⟨B⟩}{⟨C⟩}

Never forget to use the rotation for a square or a equilateral triangle.

A B C 60^{∘} D_{\frac{1}{2}} B̂AC

\pstGeonode[PosAngle=-135](-1.5,-1.2){A}
\pstGeonode(.5,-.8){B}
\pstRotation[PosAngle=90, RotAngle=60]{A}{B}{C}
\psline(C)(A)(B)
\pstMarkAngle{B}{A}{C}{60^{∘}}
\pstRotation[AngleCoef=.5, RotAngle=\pstAngleAOB{A}{B}{C}]
  {A}{B}{D}
\psline(A)(D)
\pstMarkAngle[MarkAngleRadius=.5, LabelRefPt=l]
  {D}{A}{B}{$\frac{1}{2}\widehat{BAC}$}

3.4 Translation

\pstTranslation[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨M⟩}{⟨M′⟩}

Draw the translated of vector \overrightarrow{AB} of the point ⟨M⟩. Useful for drawing a parallel line.

A B C C_{′}

\psset{linecolor=green, nodesep=-1, PosAngle=90}
\pstGeonode(-1.5,-1.2){A}
\pstGeonode(.5,-.8){B}
\pstGeonode(.5,1){C}
\pstTranslation{B}{A}{C}{C'}
\pstLineAB{A}{B}\pstLineAB{C}{C'}

The parameter DistCoef can be used as a multiplicand coefficient to modify the translation vector.

3.5 Homothetie

\pstHomO[⟨par⟩]{⟨O⟩}{⟨M⟩}{⟨M′⟩}

Draw M′ the image of M by the homotethy of center O and coefficient specified with the parameter

HomCoef.

\begin{matrix}O \\ A \\ B \\ C \\ D \end{matrix}

\pstGeonode(.5,1){O}
\psset{PosAngle=-45}
\pstGeonode(-1.5,-1.2){A}
\pstGeonode(.5,-.8){B}
\psset{linecolor=green, nodesep=-1, HomCoef=.62}
\pstHomO{O}{A}{C}
\pstHomO{O}{B}{D}
\pstLineAB{A}{O}\pstLineAB{B}{O}
\psset{linecolor=red, nodesep=-.5}
\pstLineAB{A}{B}\pstLineAB{C}{D}

3.6 Orthogonal projection

\pstProjection[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨M⟩}{⟨M′⟩}

Project orthogonally the point M on the line (AB). Useful for the altitude of a triangle.

\begin{matrix}A \\ B \\ C \\ I \\ J \\ K \end{matrix}

\pstTriangle[PosAngleB=-90, PosAngleC=180,
  PointSymbolC=square]
  (1,1){A}(-1,-1){B}(-2,1){C}
\psset{CodeFig=true, CodeFigColor=red}
\pstProjection[PosAngle=-45]{A}{B}{C}{I}
\pstProjection[PosAngle=90]{A}{C}{B}{J}
\pstProjection[PosAngle=-135]{C}{B}{A}{K}

4 Special object

4.1 Midpoint

\pstMiddleAB[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨I⟩}

Draw the midpoint I of segment [AB].

A B C C_{′} B_{′} A_{′}

\pstTriangle[PosAngleB=-90, PosAngleC=90]%
  (1,1){A}(-1,-1){B}(-2,1){C}
\pstMiddleAB{A}{B}{C'}
\pstMiddleAB[PosAngle=90]{A}{C}{B'}
\pstMiddleAB[PosAngle=180]{C}{B}{A'}

4.2 Triangle center of gravity

\pstCGravABC[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨C⟩}{⟨G⟩}

Draw the ABC triangle centre of gravity G.

\begin{matrix}A \\ B \\ C \\ G \end{matrix}

\pstTriangle[PosAngleB=-90, PosAngleC=90]
  (1,1){A}(-1,-1){B}(-2,1){C}
\pstCGravABC{A}{B}{C}{G}

4.3 Centre of the circumcircle of a triangle

\pstCircleABC[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨C⟩}{⟨O⟩}

It’s obvious.

\begin{matrix}A \\ B \\ C \\ O \end{matrix}

                                \pstTriangle[PosAngleA=-90, PosAngleB=180, PosAngleC=0]
                                  (4,1){A}(1,3){B}(5,5){C}
                                \pstCircleABC[CodeFig=true, CodeFigColor=blue,
                                             linecolor=red]{A}{B}{C}{O}

4.4 Perpendicular bisector of a segment

\pstMediatorAB[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨I⟩}{⟨M⟩}

The perpendicular bisector of a segment is a line perpendicular to this segment in its midpoint. The segment is [AB], the midpoint I, and M is a point belonging to the perpendicular bisector line. It is build by a rotation of B of 90 degrees around I. This mean that the order of A and B is important, it controls the position of M. The command creates the two points M end I. The construction is controlled by the following parameters:

• CodeFig, CodeFigColor et SegmentSymbol for marking the right angle ;

• PointSymbol et PointName for controlling the drawing of the two points, each of them can be specified separately with the parameters ...A et ...B ;

• parameters controlling the line drawing.

A B C I M_{I} J // // K

                                \pstTriangle[PosAngleA=-75, PosAngleB=180, PosAngleC=45]
                                       (3.5,1){A}(1,4){B}(5,4.2){C}
                                \psset{linecolor=red, CodeFigColor=red, nodesep=-1}
                                \pstMediatorAB{A}{B}{I}{M_I}
                                \psset{PointSymbolB=none}
                                \pstMediatorAB[CodeFig=true, PointSymbolB=none]
                                       {A}{C}{J}{M_J}
                                \pstMediatorAB[PosAngleA=45, linecolor=blue]
                                       {C}{B}{K}{M_K}

4.5 Bissectors of angles

\pstBissectBAC[⟨par⟩]{⟨B⟩}{⟨A⟩}{⟨C⟩}{⟨N⟩}

\pstOutBissectBAC[⟨par⟩]{⟨B⟩}{⟨A⟩}{⟨C⟩}{⟨N⟩}

there are two bisectors for a given geometric angle: the inside one and the outside one; this is why there is two commands. The angle is specified by three points specified in the trigonometric direction (anti-clockwise). The result of the commands is the specific line and a point belonging to this line. This point is built by a rotation of point B.

A B C A_{′} A_{′′}

                                \pstGeonode[PosAngle=-75](4,1){A}
                                \pstGeonode[PosAngle=180](1,4){B}
                                \pstGeonode[PosAngle=45](5,4){C}
                                \psset{linecolor=red}
                                \ncline{A}{B}\ncline{A}{C}
                                \pstBissectBAC[linecolor=blue]{C}{A}{B}{A'}
                                \pstOutBissectBAC[linecolor=green, PosAngle=180]
                                  {C}{A}{B}{A''}

5 Intersections

Points can be defined by intersections. Three intersection types are managed:

• line-line;

• line-circle;

• circle-circle.

An intersection can not exist: case of parallel lines. In such a case, the point(s) are positioned at the origin. In fact, the user has to manage the existence of these points.

5.1 Line-Line

\pstInterLL[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨C⟩}{⟨D⟩}{⟨M⟩}

Draw the intersection point between lines (AB) and (CD).

basique

\begin{matrix}A \\ B \\ C \\ D \\ E \end{matrix}

\pstGeonode(0,-1){A}\pstGeonode(3,2){B}
\pstGeonode(3,0){C}\pstGeonode(1,2){D}
\pstInterLL[PointSymbol=square]{A}{B}{C}{D}{E}
\psset{linecolor=blue, nodesep=-1}
\pstLineAB{A}{B}\pstLineAB{C}{D}

Horthocentre

A B C C_{′} A_{′} B_{′} H

\psset{CodeFig=true}
\pstTriangle[PosAngleA=180](-1,0){A}(3,-1){B}(3,2){C}
\pstProjection[PosAngle=-90]{B}{A}{C}{C'}
\pstProjection{B}{C}{A}{A'}
\pstProjection[PosAngle=90]{A}{C}{B}{B'}
\pstInterLL[PosAngle=135, PointSymbol=square]
 {A}{A'}{B}{B'}{H}

5.2 Circle–Line

\pstInterLC[⟨par⟩]{⟨A⟩}{⟨B⟩}{⟨O⟩}{⟨C⟩}{⟨M_{1}⟩}{⟨M_{2}⟩}

Draw the one or two intersection point(s) between the line (AB) and the circle of centre O and with radius OC.

The circle is specified with its center and either a point of its circumference or with a radius specified with parameter radius or its diameter specified with parameter Diameter. These two parameters can be modify by coefficient DistCoef.

\begin{matrix}O \\ A \\ B \\ C \\ I \\ D \\ E \\ F \\ G \\ H \\ J \end{matrix}

\pstGeonode(-.9,.5){O}
\pstGeonode(0,2){A}
\pstGeonode[PosAngle=-135](-1,0){B}
\pstGeonode[PosAngle=80](3,-1){C}
\pstGeonode(-2,3){I}
\pstCircleOA[linecolor=red]{O}{A}
\pstInterLC[PosAngle=-80]{C}{B}{O}{A}{D}{E}
\pstInterLC[PosAngleB=60, Radius=\pstDistAB{O}{D}]
  {I}{C}{O}{}{F}{G}
\pstInterLC[PosAngleB=180, DistCoef=1.3,
  Diameter=\pstDistAB{O}{D}]
  {I}{B}{O}{}{H}{J}
\pstCircleOA[linecolor=red, DistCoef=1.3,
  Diameter=\pstDistAB{O}{D}]{O}{}
\psset{nodesep=-1}
\pstLineAB[linecolor=green]{E}{C}
\pstLineAB[linecolor=cyan]{I}{C}
\pstLineAB[linecolor=magenta]{H}{I}

In the case of a two points intersection, their position is not specified, the user will have to check the result. It can arise that after a modification the name of points can be swapped leading to a wrong figure as shown in the following example:

\begin{matrix}O \\ A \\ B \\ C \\ D \\ E \end{matrix}  \begin{matrix}O \\ A \\ B \\ C \\ D \\ E \end{matrix}

This management is the same for the circle-circle intersection.

5.3 Circle–Circle

\pstInterCC[⟨par⟩]{⟨O_{1}⟩}{⟨B⟩}{⟨O_{2}⟩}{⟨C⟩}{⟨M_{1}⟩}{⟨M_{2}⟩}

This function is similar to the last one. The boolean parameters CodeFigA et CodeFigB allow the drawing of the arcs at the intersection. In order to get a coherence CodeFig allow the drawing of both arcs. The boolean parameters CodeFigAarc and CodeFigBarc specified the direction of these optional arcs: trigonometric (by default) or clockwise. Here is a first example.

\begin{matrix}O \\ A \\ B \\ C \end{matrix} ; D ; E ; F

                              \rput{10}{%
                                \pstGeonode(1,-1){O}
                                \pstGeonode[PosAngle=-90](2,1){A}
                                \pstGeonode[PosAngle=-90](2,0.1){B}
                                \pstGeonode[PosAngle=90](2.5,1){C}}
                              \pstCircleOA[linecolor=red]{C}{B}
                              \pstInterCC[PosAngleA=135, CodeFigA=true, CodeFigAarc=false,
                                CodeFigColor=magenta]{O}{A}{C}{B}{D}{E}
                              \pstInterCC[PointSymbolB=none, PosAngleA=170, CodeFigA=true,
                                CodeFigAarc=false, CodeFigColor=green]{B}{E}{C}{B}{F}{G}

And a more complete one, which includes the special circle specification using radius and diameter. For such specifications it exists the parameters RadiusA, RadiusB, DiameterA and DiameterB.

\begin{matrix}O \\ Ω \\ A \\ B \\ D \\ E \\ F \\ G \\ H \\ I \\ J \\ K \end{matrix}

\pstGeonode(1,-1){O}
\pstGeonode[PointName=\Omega](3,-1){Omega}
\psset{PointSymbol=square}
\pstGeonode[PosAngle=-90](0,3){A}
\pstGeonode[PosAngle=90](2,2){B}
\psset{PointSymbol=o}
\pstCircleOA[linecolor=red, DistCoef=1 3 10 div add,
             Radius=\pstDistAB{A}{B}]{O}{}
\pstCircleOA[linecolor=Orange, Diameter=\pstDistAB{A}{B}]{O}{}
\pstCircleOA[linecolor=Violet, Radius=\pstDistAB{A}{B}]{Omega}{}
\pstCircleOA[linecolor=Purple, Diameter=\pstDistAB{A}{B}]{Omega}{}
\pstInterCC[DistCoef=1 3 10 div add, RadiusA=\pstDistAB{A}{B},
            DistCoef=none, RadiusB=\pstDistAB{A}{B}]
  {O}{}{Omega}{}{D}{E}
\pstInterCC[DiameterA=\pstDistAB{A}{B}, RadiusB=\pstDistAB{A}{B}]
  {O}{}{Omega}{}{F}{G}
\pstInterCC[DistCoef=1 3 10 div add, RadiusA=\pstDistAB{A}{B},
            DistCoef=none, DiameterB=\pstDistAB{A}{B}]
  {O}{}{Omega}{}{H}{I}
\pstInterCC[DiameterA=\pstDistAB{A}{B}, DiameterB=\pstDistAB{A}{B}]
  {O}{}{Omega}{}{J}{K}

6 Examples gallery

6.1 Basic geometry

6.1.1 Drawing of the bissector

O A B C O_{′}

\pstGeonode[PosAngle=180](0,1){O}
\pstGeonode[PosAngle=130](1,4){A}
\pstGeonode[PosAngle=-90](2,0){B}
\pstLineAB[nodesepB=-1, linecolor=red]{O}{A}
\pstLineAB[nodesepB=-1, linecolor=red]{O}{B}
\pstInterLC[PointSymbolB=none, PosAngleA=-45]
   {O}{B}{O}{A}{C}{G}
\pstArcOAB[arcsepA=-1, arcsepB=-1, linecolor=green,
   linestyle=dashed]{O}{C}{A}
\pstInterCC[PointSymbolB=none, PosAngleA=100]
  {A}{O}{C}{O}{O'}{OO}
\pstArcOAB[arcsepA=-1, arcsepB=-1, linecolor=blue,
  linestyle=dashed]{A}{O'}{O'}
\pstArcOAB[arcsepA=-1, arcsepB=-1, linecolor=blue,
  linestyle=dashed]{C}{O'}{O'}
\pstLineAB[nodesepB=-1, linecolor=cyan]{O}{O'}
\psset{linecolor=magenta, doubleline=true}
\pstMarkAngle{C}{O}{O'}{}
\pstMarkAngle[MarkAngleRadius=.5]{O'}{O}{A}{}

6.1.2 German right angle

In Germany, there is another convention for the right angle (remark of U. Dirr).

A B C·

\pstTriangle[PosAngle=-90, PosAngleC=90]
  (1,2){A}(4,2){B}(1,5){C}
\pstMarkAngle[MarkAngleRadius=.5, LabelSep=.3]
  {B}{A}{C}{\boldmath$\cdot$}

6.1.3 Triangle lines

A B C IJ K O C_{′} A_{′} B_{′} H G

\pstTriangle[PosAngleA=180, PosAngleB=80](-2,-1){A}(1,2){B}(2,0){C}
% les médiatrices
{% encapsulation de modif paramètres
  \psset{linestyle=none, PointSymbolB=none}
  \pstMediatorAB{B}{A}{I}{IP}
  \pstMediatorAB[PosAngleA=-40]{A}{C}{J}{JP}
  \pstMediatorAB[PosAngleA=75]{B}{C}{K}{KP}
}% fin
\pstInterLL[PointSymbol=square, PosAngle=-170]{I}{IP}{J}{JP}{O}
{% encapsulation de modif paramètres
  \psset{nodesep=-.8, linecolor=green}
  \pstLineAB{O}{I}\pstLineAB{O}{J}\pstLineAB{O}{K}
}% fin
\pstCircleOA[linecolor=red]{O}{A}
% pour que le symbol de O soit sur et non sous les droites
\psdot[dotstyle=square](O)
% les hauteurs et l'orthocentre
\pstProjection[PosAngle=95]{B}{A}{C}{C'}
\pstProjection{B}{C}{A}{A'}
\pstProjection[PosAngle=-90]{A}{C}{B}{B'}
\psset{linecolor=blue}\ncline{A}{A'}\ncline{C}{C'}\ncline{B}{B'}
\pstInterLL[PointSymbol=square]{A}{A'}{B}{B'}{H}
% les médianes et le centre de gravité
\psset{linecolor=magenta}\ncline{A}{K}\ncline{C}{I}\ncline{B}{J}
\pstCGravABC[PointSymbol=square, PosAngle=95]{A}{B}{C}{G}

6.1.4 Euler circle

A B C IJ K O C_{′} A_{′} B_{′} H ω // // ∧ ∧ ∪ ∪

\pstTriangle[PosAngleA=180, PosAngleC=0](-2,-1){A}(1,2){B}(2,-1){C}
{% encapsulation de modif paramètres
  \psset{linestyle=none, PointSymbolB=none}
  \pstMediatorAB{B}{A}{I}{IP}
  \pstMediatorAB[PosAngleA=-40]{A}{C}{J}{JP}
  \pstMediatorAB[PosAngleA=75]{B}{C}{K}{KP}
}% fin
\pstInterLL[PointSymbol=square, PosAngle=-170]{I}{IP}{J}{JP}{O}
{% encapsulation de modif paramètres
  \psset{nodesep=-.8, linecolor=green}
  \pstLineAB{O}{I}\pstLineAB{O}{J}\pstLineAB{O}{K}
}% fin
\psdot[dotstyle=square](O)
\pstProjection[PosAngle=95]{B}{A}{C}{C'}
\pstProjection{B}{C}{A}{A'}
\pstProjection[PosAngle=-90]{A}{C}{B}{B'}
\psset{linecolor=blue}\ncline{A}{A'}\ncline{C}{C'}\ncline{B}{B'}
\pstInterLL[PointSymbol=square]{A}{A'}{B}{B'}{H}
\psset{linecolor=magenta}\ncline{A}{K}\ncline{C}{I}\ncline{B}{J}
% le cercle d'Euler (centre au milieu de [OH])
\pstMiddleAB[PointSymbol=o, PointName=\omega]{O}{H}{omega}
\pstCircleOA[linecolor=Orange, linestyle=dashed, dash=5mm 1mm]{omega}{B'}
\psset{PointName=none}
% il passe par le milieu des segments joignant l'orthocentre et les sommets
\pstMiddleAB{H}{A}{AH}\pstMiddleAB{H}{B}{BH}\pstMiddleAB{H}{C}{CH}
\pstSegmentMark{H}{AH}\pstSegmentMark{AH}{A}
\psset{SegmentSymbol=wedge}\pstSegmentMark{H}{BH}\pstSegmentMark{BH}{B}
\psset{SegmentSymbol=cup}\pstSegmentMark{H}{CH}\pstSegmentMark{CH}{C}

6.1.5 Orthocenter and hyperbola

The orthocenter of a triangle whose points are on the branches of the hyperbola ℋ : y = a/x belong to this hyperbola.

\begin{matrix}A \\ B \\ C \\ H \end{matrix}

\psset{linecolor=blue, linewidth=2\pslinewidth}
\psplot{-10}{-.1}{1 x div}
\psplot{.1}{10}{1 x div}
\psset{linewidth=.5\pslinewidth}
\pstTriangle[linecolor=magenta, PosAngleB=-85, PosAngleC=-90]
  (.2,5){A}(1,1){B}(10,.1){C}
%\pstTriangle[linecolor=magenta, PosAngleB=-135](.2, 5){A}(-1,-1){B}(10,.1){C}
\psset{PointSymbol=none, linecolor=magenta, CodeFig=true, CodeFigColor=red}
\pstProjection[PosAngle=-90]{B}{A}{C}{C'}
\ncline[nodesepA=-1, linestyle=dashed, linecolor=magenta]{C'}{B}
\pstProjection{B}{C}{A}{A'}
\ncline[nodesepA=-1, linestyle=dashed, linecolor=magenta]{A'}{B}
\pstProjection[PosAngle=90]{A}{C}{B}{B'}
\pstInterLL[PosAngle=135, PointSymbol=square]{A}{A'}{B}{B'}{H}
\psset{linecolor=green, nodesep=-1}
\pstLineAB{A}{H}\pstLineAB{B'}{H}\pstLineAB{C}{H}
\psdot[dotstyle=square](H)

6.1.6 17 sides regular polygon Striking picture created by K. F. Gauss. he also demonstrates that it is possible to build the polygons which have 2^{2^{p}} + 1 sides, the following one has 257 sides!

O P_{1} B JJE F // // K N_{4} N_{6} P_{6} P_{13} ∧ ∧ P_{4} P_{15} ∪ ∪ P_{5} P_{14} // // P_{3} P_{16} // P_{2} P_{17} /// /// P_{7} P_{12} ∘ ∘ P_{8} P_{11} × × P_{9} P_{10} ≡ ≡

6.1.7 Circles tangents The drawing of the circle tangents which crosses a given point.

\begin{matrix}O \\ M \\ A \\ B \end{matrix}

The drawing of the common tangent of two circles.

O O_{′}

6.1.8 Fermat’s point Drawing of Manuel Luque.

6.1.9 Escribed and inscribed circles of a triangle

C I I_{C} I_{B} I_{A} I_{1} I_{2} I_{3} I_{1C} I_{1B} I_{1A} I_{2B} I_{2C} I_{2A} I_{3A} I_{3C} I_{3B}

6.2 Some locus points

6.2.1 Parabola

The parabola is the set of points which is at the same distance between a point and a line.

O A B // // B

\psset{linewidth=1.2\pslinewidth}\renewcommand{\NbPt}{11}
\pstGeonode(5,4){O}
\pstGeonode[PosAngle=-90](1,2){A}\pstGeonode[PosAngle=-90](9,1.5){B}
\newcommand{\Parabole}[1][100]{%
  \pstLineAB[nodesep=-.9, linecolor=green]{A}{B}
  \psset{RotAngle=90, PointSymbol=none}
  \multido{\n=1+1}{\NbPt}{%
    \pstHomO[HomCoef=\n\space \NbPt\space 1 add div]{A}{B}{M\n}
    \pstMediatorAB[linestyle=none]{M\n}{O}{M\n_I}{M\n_IP}
    \pstRotation{M\n}{A}{M\n_P}
    \pstInterLL[PointSymbol=square, PointName=none]{M\n_I}{M\n_IP}{M\n}{M\n_P}{P_\n}
    \ifnum\n=#1
      \bgroup
      \pstRightAngle{A}{M\n}{M\n_P}
      \psset{linewidth=.5\pslinewidth, nodesep=-1, linecolor=blue}
      \pstLineAB{M\n_I}{P_\n}\pstLineAB{M\n}{P_\n}
      \pstRightAngle{P_\n}{M\n_I}{M\n}
      \psset{linecolor=red}\pstSegmentMark{M\n}{M\n_I}\pstSegmentMark{M\n_I}{O}
      \egroup
    \fi}}%fin multido-newcommand
\Parabole[2]\pstGenericCurve[linecolor=magenta]{P_}{1}{\NbPt}
%% Nouvelle parabole avec un nouveau point B
\pstGeonode[PointSymbol=*, PosAngle=-90](10,3.5){B}
\psset{linestyle=dashed}
\Parabole\pstGenericCurve[linecolor=magenta]{P_}{1}{\NbPt}

6.2.2 Hyperbola

The hyperbola is the set of points whose difference between their distance of two points (the focus) is constant.

O F F_{′} S A_{1} A_{2} Ψ

6.2.3 Cycloid

The wheel rolls from M to A. The circle points are on a cycloids.

\begin{matrix}M \\ A \end{matrix}

\renewcommand{\NbPt}{11}\psset{linewidth=1.2\pslinewidth}%
\pstGeonode[PointSymbol=none](0,1){O}
\pstGeonode[PosAngle=180]{M}
%% 12*pi=12.5663706144
\pstGeonode(12.5663706144,0){A}
\pstTranslation[PointSymbol=none]{M}{A}{O}{B}%
\multido{\n=1+1}{\NbPt}{%
  \pstHomO[HomCoef=\n\space \NbPt\space 1 add div,
           PointSymbol=none]{O}{B}{O\n}%
  \pstProjection[PointSymbol=none]{M}{A}{O\n}{P\n}%
  %\pstCircleOA[linestyle=dashed, linecolor=red]{O\arabic{i}}{P\arabic{i}}%
  \pstCurvAbsNode[PointSymbol=square, PointName=none,CurvAbsNeg=true]%
    {O\n}{P\n}{M\n}{\pstDistAB{O}{O\n}}
  \ifnum\n=2%affichage du second cercle
    \bgroup
    \pstCircleOA{O\n}{M\n}%
    \psset{linecolor=magenta, linewidth=1.5\pslinewidth}
    \pstArcnOAB{{O\n}}{P\n}{M\n}%
    \ncline{O\n}{M\n}\ncline{P\n}{M}
    \egroup

  \fi}% fin du multido
\psset{linecolor=blue, linewidth=.5\pslinewidth}
\pstGenericCurve[GenCurvFirst=M]{M}{1}{6}
\pstGenericCurve[GenCurvLast=A]{M}{6}{\NbPt}
\psset{linecolor=green, linewidth=1.5\pslinewidth}
%% juste pour la vérification
%\parametricplot{0}{12.5663706144}
%  {t t 3.1415926 div 180 mul sin sub 1 t 3.1415926 div 180 mul cos sub}

6.2.4 Hypocycloids (Astroid and Deltoid)

A wheel rolls inside a circle, and depending of the radius ratio, it is an astroid, a deltoid and in the general case hypo-cycloids.

O  O

\newcommand{\HypoCyclo}[4][100]{%
  \def\R{#2}\def\petitR{#3}\def\NbPt{#4}% définitions locales pour lisibilité
  %% Selon la valeur de R sur petitR :
  %%     4 une astroïde -- 3 une deltoïde -- 2 un diamètre (!)
  \def\Anglen{\n\space 360 \NbPt\space 1 add div mul}
  \pstGeonode{O}\pstCircleOA[Radius=\pstDistVal{\R}]{O}{}
  \pstGeonode[PointName=none](\R;0){P}
  \pstHomO[HomCoef=\petitR\space\R\space div, PointSymbol=none]{P}{O}{M}
  \multido{\n=1+1}{\NbPt}{%
    \pstRotation[RotAngle=\Anglen, PointSymbol=none]{O}{M}{M\n}
    \rput(M\n){\pstGeonode[PointSymbol=none](\petitR;0){Q}}
    \pstRotation[RotAngle=\Anglen, PointSymbol=none]{M\n}{Q}{N}
    \pstRotation[RotAngle=\n\space -360 \NbPt\space 1 add div
    mul \R\space\petitR\space div mul, PointName=none]%
    {M\n}{N}{N\n}
    \ifnum\n=#1
      \pstCircleOA{M\n}{N\n}\ncline{M\n}{N\n}%
      \psset{linecolor=red, linewidth=2\pslinewidth}
      \pstArcOAB{M\n}{N\n}{N}\pstArcOAB{O}{P}{N}

    \fi}}%fin multido-newcommand
\HypoCyclo[4]{4}{1}{27}
\psset{linecolor=blue, linewidth=1.5\pslinewidth}
%% il est préférable de mettre les quatre branches séparément à cause
%% des points de rebroussement
\pstGenericCurve[GenCurvFirst=P]{N}{1}{7}
\pstGenericCurve{N}{7}{14}\pstGenericCurve{N}{14}{21}
\pstGenericCurve[GenCurvLast=P]{N}{21}{27}

6.3 Lines and circles envelope

6.3.1 Conics

Let’s consider a circle and a point A not on the circle. The set of all the mediator lines of segments defined by A and the circle points, create two conics depending of the position of A:

• inside the circle: an hyperbola;

• outside the circle: an ellipse.

(figure of O. Reboux).

A

\psset{linewidth=0.4pt,PointSymbol=+}
\pstGeonode[PosAngle=-90](4;132){A}
\pstGeonode[PointName=none]{O}

\pstGeonode[PointName=none](5,0){O'}
\pstCircleOA{O}{O'}
\multido{\n=5+5}{72}{%
  \pstGeonode[PointSymbol=none](5;\n){M_\n}
  \pstMediatorAB[PointSymbol=none, nodesep=-15,linecolor=magenta]
    {A}{M_\n}{I}{J}}% fin multido

6.3.2 Cardioid

The cardioid is defined by the circles centred on a circle and crossing a given point.

\psset{linewidth=0.4pt,PointSymbol=x,nodesep=0,linecolor=magenta}
\pstGeonode[PointName=none]{O}
\pstGeonode[PointName=none](2,0){O'}
\pstCircleOA[linecolor=black]{O}{O'}
\multido{\n=5+5}{72}
{%
  \pstGeonode[PointSymbol=none](2;\n){M_\n}
  \pstCircleOA{M_\n}{O'}}

6.4 Homotethy and fractals

\begin{matrix}A_{0} \\ B_{0} \\ D_{0} \\ C_{0} \end{matrix}

\pstGeonode[PosAngle=0](2,2){A_0}%
\pstGeonode[PosAngle=90](-2,2){B_0}%
\psset{RotAngle=90}
\pstRotation[PosAngle=270]{A_0}{B_0}{D_0}%
\pstRotation[PosAngle=180]{D_0}{A_0}{C_0}%
\pspolygon(A_0)(B_0)(C_0)(D_0)%
\psset{PointSymbol=none, HomCoef=.2}
\multido{\n=1+1,\i=0+1}{20}{%
  \pstHomO[PosAngle=0]{B_\i}{A_\i}{A_\n}
  \pstHomO[PosAngle=90]{C_\i}{B_\i}{B_\n}
  \pstHomO[PosAngle=180]{D_\i}{C_\i}{C_\n}
  \pstHomO[PosAngle=270]{A_\i}{D_\i}{D_\n}
  \pspolygon(A_\n)(B_\n)(C_\n)(D_\n)}% fin multido

6.5 hyperbolic geometry: a triangle and its altitudes

\begin{matrix}M \\ N \\ P \end{matrix}