It is split into several pages, because of the large number of applets.
The demo applets generally display the given elements in blue, the constructed elements in red and the intermediate constructions (normally "hidden") in various colors.
The given codes are directly compatible with my compiler (genapp), otherwise you have to translate symbolic names to their rank in the construction. But this code is restricted to the demonstrative part of the construction (the base elements in blue are not defined).
The full code is however available in the very HTML source of the page !
As it is about construction tricks, sometimes using side effects, all this is true for the current version of JavaSketchpad (DR4.07) and may change in the future.

Copying distances and angles, perpendicular bisector, angle bisector, trisector, polygons, oriented geometry, intersections.

3. Circles
Circles, circle arcs, sectors, tangents, common tangents
Pole, polar, radical axis, pencil of circles, inversion
Centroid, orthocenter, circumcircle, Euler line and circle, incircle and excircles,
Nagel, Gergonne, Spieker, Lemoine ... points
Isogonal conjugate, isotomic conjugate. Fermat, Brocard ... points
Points in barycentric coordinates

# 1. Classical constructions

#### Midpoint of AB

Never use Midpoint(segment), as the segment is undefined when A=B, but :

{M} Dilation (A,B,0.5);
(not usefull to show a demo applet for that !)

#### Perpendicular bisector

Sorry, your browser is not Java compliant.

 ```{ if not already constructed, also Segment } {ab} Line (A,B)[hidden]; {M} Dilation (A,B,0.5); Perpendicular (ab,M);```

#### Define a line by location and slope

Sorry, your browser is not Java compliant. Better than define a line by two free points, the location and the direction of the line are independantly defined as :

 ```{O} Point (100,100); {r} Translation (O,70,0)[hidden]; {C} Circle (O,r)[hidden]; {u} Point on object (C, -0.7); {d} Line (O,u)[red];```

#### Copying angles

Sorry, your browser is not Java compliant. To copy the given angle AOB to DCm, from given C,D.

 ```{Cd Ray (D,C) } {Cm} Rotation/MarkedAngle (Cd,C,A,O,B);```
It is the very definition of this function !
Ray may be replaced by Point, Line etc...

#### Copying a distance

Sorry, your browser is not Java compliant. To copy the given distance AB along line CD, from C.

 ```{B!} VectorTranslation (B,A,C)[hidden]; {M} Rotation/MarkedAngle (B!,C,B!,C,D); {M!} Dilation (M,C,-1);```

#### Regular polygon

In the lack of loops or macro, all the vertices and sides have to be individually defined.
Unless we want to show such a construction, the available classical compass and straightedge constructions are not used.
We better directly calculate the angles, or even simpler from a numeric approximation, even for a simple equilateral triangle !
Example : regular pentagon.
Sorry, your browser is not Java compliant. From given center and one vertex

 ```{A1} Rotation (A0,O, 1.256637061435917295385); {c0} Segment (A0,A1)[red]; {A2} Rotation (A1,O, 1.256637061435917295385); {c1} Segment (A1,A2)[red]; {A3} Rotation (A2,O, 1.256637061435917295385); {c2} Segment (A2,A3)[red]; {A4} Rotation (A3,O, 1.256637061435917295385); {c3} Segment (A3,A4)[red]; {c4} Segment (A0,A4)[red];```
from a given side

Sorry, your browser is not Java compliant.

 ```{ calcul 3pi/5 } {c} Distance (A0,A1,0,0,' ')[hidden]; {a} Calculate (0,0,' ','1@atan12*5/')(c)[hidden]; {c0} Segment (A0,A1); {A2} Rotation/MeasuredAngle (A0,A1,a); {c1} Segment (A1,A2); {A3} Rotation/MeasuredAngle (A1,A2,a); {c2} Segment (A2,A3); {A4} Rotation/MeasuredAngle (A2,A3,a); {c3} Segment (A3,A4); {c4} Segment (A0,A4);```
Here with an explicit calculation of angle 3π/5.
The distance c measurement is just to give some mandatory parameter to the Calculate.
(it may be replaced by any previously defined parameter or measurement)

We may want to directly calculate each vertex, instead of cumulating inaccuracies...
Sorry, your browser is not Java compliant. Example : Hexagon

 ```{A1} Rotation (A0,O, 1.047197551196597746)[label('A1'),red]; {c0} Segment (A0,A1)[red]; {A2} Rotation (A0,O, 2.0943951023931954923)[label('A2'),red]; {c1} Segment (A1,A2)[red]; {A3} Dilation (A0,O,-1)[label('A3'),red]; {c2} Segment (A2,A3)[red]; {A4} Rotation (A0,O, -2.0943951023931954923)[label('A4'),red]; {c3} Segment (A3,A4)[red]; {A5} Rotation (A0,O, -1.047197551196597746)[label('A5'),red]; {c4} Segment (A4,A5)[red]; {c5} Segment (A0,A5)[red];```

#### Angle bisector of ABC

Sorry, your browser is not Java compliant. The following construction works for any angle except 180°

 ```{A!} Rotation/MarkedAngle (A,O,A,O,B)[hidden]; {I} Dilation (A,A!, 0.5)[hidden]; {Oi} Ray (I,O)[red];```

We may replace Ray by Line, or draw the symmetric of I :
{I!} Dilation (I,O, -1)[hidden]; for the angle bisector of the angle >180°
The "external" angle bisector is then just a perpendicular to the internal one :
{Oj} Perpendicular (Oi,O);

#### Angle trisector of ABC

Sorry, your browser is not Java compliant. There doesn't exist any compass and straightedge construction of an angle trisector.
We have to go through measurement and calculation :

 ```{a} Angle (A,O,B,0,0,' ')[hidden]; {a!} Calculate (0,0,' ','1@atanA*135/')(a)[hidden]; {A!} Rotation/MeasuredAngle (A,O,a!)[hidden]; {OA1} Ray (A!,O); {OA2} Rotation (OA1,O, 2.0943951023931954923); {OA3} Rotation (OA1,O, -2.0943951023931954923);```
The two other angle trisectors are at ±2π/3
Don't confuse with the trisectors of the opposite angle BOA, neither with the trisectors of the supplementary angle.

#### Oriented lines

Sorry, your browser is not Java compliant. It is important to care of the direction of the lines and circles in JavaSketchpad.
A Ray(A,B) is oriented from B to A (B is the origin of the ray)
But it is the same for Segments and Lines
Segment (A,B) is then oriented from B to A and Line (A,B) from B to A also.
Note : The Point on object on the segments and lines are therefore with B = 0 and A = 1.

The geometric transforms are performed on all points of the lines, the origin and orientation is a consequence.

 ```{OA} Ray (A,O); {OA!} Rotation (OA,I,0.785398); {A!} Point on object (OA!,1); ...```

 A perpendicular is a rotation by -π/2 P is at 0.5 on that perpendicular Similarily, a parallel = rotation by 0 and P at 0.5 ```{OA} Ray (A,O); {perp} Perpendicular (OA,P); {O!} Point on object (perp,0); {A!} Point on object (perp,1); {para} Parallel (OA,P); ...```

A circle is always oriented in the clockwise direction, and its origin at θ = 0 (horizontal towards x > 0)
Therefore a Point on object on a circle is defined by that.
A point at 45° in the trigonometric direction is then at -π/4 as a Point on object. (but is obtained in a Rotation by +π/4)

#### Intersections

If intersection of lines, segments and rays has no theoretical problem, it is not the same for circles, in which the choice of which intersection point arises (Intersect1 or Intersect2).
Just mention a bug in JavaSketchpad 4.07 when intersecting with quasi vertical segments. We avoid then as possible intersections with segments, prefering always to consider intersections with whole lines, and restrict intersections with segments and rays for just a few conditional constructions.

Get back to intersections of circles with lines and circles :

 In the direction of the line - Intersect1 is the first point traversed - Intersect2 is the second point traversed

Intersections of circles are harder to predict :
They are the intersections with their radical axis, the orientation of which is defined by the orientation of the center line.
Specifically the intersections are exchanged when exchanging the two circles, by that reverting the orientation of the center line.
In a counter intuitive way, the radical axis orientation of circles C1,C2 is that of the perpendicular to O1→O2, so that points

 `{P1} Intersect1 (C1,C2);`
and
 ```{O1O2} Line (O2,O1)[hidden]; {axe} Perpendicular (O1O2,P1)[hidden]; {P1!} Intersect1 (axe,C2);```
are the same (note the inversion of subscripts between Intersect and Line).

Sorry, your browser is not Java compliant. The applet shows the lines orientation as two half lines from the line's origin, the blue half-line being towards the > 0 direction.

 ```{oo} Line (O2,O1); {I1} Intersect1 (C1,C2)[label('1')]; {I2} Intersect2 (C1,C2)[label('2')]; {axe} Perpendicular (oo, I2); {ab} Line B,A); {P1} Intersect1 (ab,C2)[label('1')]; {P2} Intersect2 (ab,C2)[label('2')];```

#### Other intersection

Sorry, your browser is not Java compliant. Given a line d through a given point A of a given circle, to construct the other intersection of the line with the circle.
Intersect1/Intersect2 is useless here : depending on the direction of the line we may get A itself !

 ```{perp} Perpendicular (d, O)[hidden]; Reflection (A,perp);```
Intersect1/Intersect2 are to be considered only in the case when we can define the line's orientation.

Given two circles intersecting in A, to construct the other intersection point.
Sorry, your browser is not Java compliant. Here also, don't use Intersect1/Intersect2 but :

 ```{oo} Line (O1, O2)[hidden]; Reflection (A,oo);```

#### Concurent or parallel

From a projective point of view, "concurent" and "parallel" are equivallent.
Let then be given two lines d and d', of which we don't know in advance if they are concurent or parallel.
To construct through P a line being concurent or parallel to the given lines.
The intersection of d and d' being impossible to define, we have to use another method.

A right method is here to draw any two parallel secants to both lines intersecting those in AA' and BB'
Then construct a triangle P'BB' similar to PAA' gives a second point P' on the searched line.
The only problem is in the choice of the two secants. They may here be defined from Point on objects A, A' and B on the given lines.
An automatic choice of these points is almost impossible because of too many specific cases.
In the demo applet A, A' and B are just the points used to define d and d'.

Sorry, your browser is not Java compliant.

 ```{A} Point on object (d,0)[hidden]; {B} Point on object (d,1)[hidden]; {A!} Point on object (d!,0)[hidden]; {aa} Line (A,A!)[green]; {bb} Parallel (aa,B)[green]; {B!} Intersect (bb,d!)[hidden]; {pa} Line (P,A)[hidden]; {pa!} Line (P,A!)[hidden]; {p!b} Parallel (pa,B)[hidden]; {p!b!} Parallel (pa!,B!)[hidden]; {P!} Intersect (p!b,p!b!)[hidden]; {pp} Line (P,P!);```
The construction fails if P is on line AA', if A = A' or if AA' = d, we have then to chose different points A, A' (by hand).
If d = d', the construction is meaningless.
A method avoiding a manual choice of the definition points is given in conditional constructions