tkz-euclide3.06c AlterMundusAlterMundus
Alain Matthes
http://altermundus.fr
March 18, 2020 DocumentationV.3.06c
c d
a btkz-euclide
tool for
Euclidean Geometry
tkz-euclide
Alte
rMun
dus
Alain Matthes☞ The tkz-euclide is a set of convenient macros for drawing in a plane (fundamental two-dimensional object) with a Cartesian coordinate system. It handles the most classic situations inEuclidean Geometry. tkz-euclide is built on top of PGF and its associated front-end TikZ and is a(La)TeX-friendly drawing package. The aim is to provide a high-level user interface to build graphicsrelatively simply. It uses a Cartesian coordinate system orthogonal provided by the tkz-base packageas well as tools to define the unique coordinates of points and to manipulate them. The idea is to allowyou to follow step by step a construction that would be done by hand as naturally as possible.Now the package needs the version 3.0 of TikZ. English is not my native language so there might besome errors.
☞ Firstly, I would like to thank Till Tantau for the beautiful LATEX package, namely TikZ.
☞ I received much valuable advice, remarks, corrections and examples from Jean-Côme Charpentier, JosselinNoirel,Manuel Pégourié-Gonnard, Franck Pastor,David Arnold,Ulrike Fischer, Stefan Kottwitz, ChristianTellechea, Nicolas Kisselhoff, David Arnold, Wolfgang Büchel, John Kitzmiller, Dimitri Kapetas, GaétanMarris,MarkWibrow, Yves Combe for his work on a protractor, Paul Gaborit and Laurent Van Deik for all hiscorrections, remarks and questions.
☞ I would also like to thank EricWeisstein, creator of MathWorld: MathWorld.
☞You can find some examples on my site: altermundus.fr. under construction!
Please report typos or any other comments to this documentation to: Alain Matthes.This file can be redistributed and/or modified under the terms of the LATEX Project Public License Distributed fromCTAN archives.
Contents 3
Contents
1 Presentation and Overview 101.1 Why tkz-euclide? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.2 tkz-euclide vs TikZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.3 How it works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 Example Part I: gold triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.3.2 Example Part II: two others methods gold and euclide triangle . . . . . . . . . . . . . . . 131.3.3 Complete but minimal example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 The Elements of tkz code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.5 Notations and conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.6 How to use the tkz-euclide package ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.6.1 Let’s look at a classic example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181.6.2 Set, Calculate, Draw, Mark, Label . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2 Installation 202.1 List of folder files tkzbase and tkzeuclide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 News and compatibility 22
4 Definition of a point 234.1 Defining a named point \tkzDefPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1.1 Cartesian coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.1.2 Calculations with xfp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.1.3 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.1.4 Calculations and coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.1.5 Relative points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2 Point relative to another: \tkzDefShiftPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.2.1 Isosceles triangle with \tkzDefShiftPoint . . . . . . . . . . . . . . . . . . . . . . . . . 264.2.2 Equilateral triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.2.3 Parallelogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3 Definition of multiple points: \tkzDefPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.4 Create a triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.5 Create a square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5 Special points 285.1 Middle of a segment \tkzDefMidPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.1.1 Use of \tkzDefMidPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2 Barycentric coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2.1 Using \tkzDefBarycentricPoint with two points . . . . . . . . . . . . . . . . . . . . . 295.2.2 Using \tkzDefBarycentricPoint with three points . . . . . . . . . . . . . . . . . . . . . 29
5.3 Internal Similitude Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6 Special points relating to a triangle 316.1 Triangle center: \tkzDefTriangleCenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.1.1 Option ortho or orthic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.1.2 Option centroid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.1.3 Option circum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.1.4 Option in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.1.5 Option ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.1.6 Option euler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.1.7 Option symmedian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.1.8 Option nagel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.1.9 Option mittenpunkt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7 Draw a point 357.0.1 Drawing points \tkzDrawPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
tkz-euclide AlterMundus
Contents 4
7.0.2 Example of point drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.0.3 First example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367.0.4 Second example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8 Point on line or circle 378.1 Point on a line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.1.1 Use of option pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378.2 Point on a circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9 Definition of points by transformation; \tkzDefPointBy 399.1 Examples of transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9.1.1 Example of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409.2 Example of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9.2.1 Example of reflection (orthogonal symmetry) . . . . . . . . . . . . . . . . . . . . . . . . . 409.2.2 Example of homothety and projection . . . . . . . . . . . . . . . . . . . . . . . . . . . 419.2.3 Example of projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429.2.4 Example of symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429.2.5 Example of rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439.2.6 Example of rotation in radian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439.2.7 Inversion of points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449.2.8 Point Inversion: Orthogonal Circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9.3 Transformation of multiple points; \tkzDefPointsBy . . . . . . . . . . . . . . . . . . . . . . . . 449.3.1 Example of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
10 Defining points using a vector 4610.1 \tkzDefPointWith . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.1.1 Option colinear at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4610.1.2 Option colinear at with𝐾 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4710.1.3 Option colinear at with𝐾 = √2
2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4710.1.4 Option orthogonal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4710.1.5 Option orthogonal with𝐾 =−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4710.1.6 Option orthogonal more complicated example . . . . . . . . . . . . . . . . . . . . . . . 4810.1.7 Options colinear and orthogonal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4810.1.8 Option orthogonal normed,𝐾 = 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4810.1.9 Option orthogonal normed and𝐾 = 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4910.1.10 Option linear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4910.1.11 Option linear normed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
10.2 \tkzGetVectxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5010.2.1 Coordinate transfer with \tkzGetVectxy . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
11 Random point definition 5111.1 Obtaining random points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5111.2 Random point in a rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5111.3 Random point on a segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5211.4 Random point on a straight line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11.4.1 Example of random points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5311.5 Random point on a circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.5.1 Random example and circle of Apollonius . . . . . . . . . . . . . . . . . . . . . . . . . . . 5411.6 Middle of a compass segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
12 The straight lines 5512.1 Definition of straight lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
12.1.1 Example with mediator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5512.1.2 Example with bisector and normed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5612.1.3 Example with orthogonal and parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . 5612.1.4 An envelope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
tkz-euclide AlterMundus
Contents 5
12.1.5 A parabola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5712.2 Specific lines: Tangent to a circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
12.2.1 Example of a tangent passing through a point on the circle . . . . . . . . . . . . . . . . . 5812.2.2 Example of tangents passing through an external point . . . . . . . . . . . . . . . . . . . 5912.2.3 Example of Andrew Mertz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5912.2.4 Drawing a tangent option fromwith R and at . . . . . . . . . . . . . . . . . . . . . . . . 5912.2.5 Drawing a tangent option from . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
13 Drawing, naming the lines 6013.1 Draw a straight line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
13.1.1 Examples with add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6113.1.2 Example with \tkzDrawLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6113.1.3 Example with the option add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6113.1.4 Medians in a triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6213.1.5 Altitudes in a triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6213.1.6 Bisectors in a triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
13.2 Add labels on a straight line \tkzLabelLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6213.2.1 Example with \tkzLabelLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
14 Draw, Mark segments 6314.1 Draw a segment \tkzDrawSegment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
14.1.1 Example with point references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6314.1.2 Example of extending an segment with option add . . . . . . . . . . . . . . . . . . . . . . 6414.1.3 Example of adding dimensions with option dim . . . . . . . . . . . . . . . . . . . . . . . 64
14.2 Drawing segments \tkzDrawSegments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6514.2.1 Place an arrow on segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
14.3 Mark a segment \tkzMarkSegment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6514.3.1 Several marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6614.3.2 Use of mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
14.4 Marking segments \tkzMarkSegments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6614.4.1 Marks for an isosceles triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
14.5 Another marking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6714.5.1 Multiple labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6714.5.2 Labels and right-angled triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6814.5.3 Labels for an isosceles triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
15 Triangles 6915.1 Definition of triangles \tkzDefTriangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
15.1.1 Option golden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6915.1.2 Option equilateral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7015.1.3 Option gold or euclide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
15.2 Drawing of triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7115.2.1 Option pythagore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7115.2.2 Option school . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7115.2.3 Option golden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7115.2.4 Option gold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7215.2.5 Option euclide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
16 Specific triangles with \tkzDefSpcTriangle 7216.0.1 Option medial or centroid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7216.0.2 Option in or incentral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7316.0.3 Option ex or excentral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7316.0.4 Option intouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7416.0.5 Option extouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7416.0.6 Option feuerbach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7516.0.7 Option tangential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
tkz-euclide AlterMundus
Contents 6
16.0.8 Option euler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
17 Definition of polygons 7717.1 Defining the points of a square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
17.1.1 Using \tkzDefSquare with two points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7717.1.2 Use of \tkzDefSquare to obtain an isosceles right-angled triangle . . . . . . . . . . . . . 7717.1.3 Pythagorean Theorem and \tkzDefSquare . . . . . . . . . . . . . . . . . . . . . . . . . . 78
17.2 Definition of parallelogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7817.3 Defining the points of a parallelogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
17.3.1 Example of a parallelogram definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7817.3.2 Simple example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7817.3.3 Construction of the golden rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
17.4 Drawing a square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7917.4.1 The idea is to inscribe two squares in a semi-circle. . . . . . . . . . . . . . . . . . . . . . . 80
17.5 The golden rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8017.5.1 Golden Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
17.6 Drawing a polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8117.6.1 \tkzDrawPolygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
17.7 Drawing a polygonal chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8117.7.1 Polygonal chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8217.7.2 Polygonal chain: index notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
17.8 Clip a polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8217.8.1 \tkzClipPolygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8217.8.2 Example: use of ”Clip” for Sangaku in a square . . . . . . . . . . . . . . . . . . . . . . . . 83
17.9 Color a polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8317.9.1 \tkzFillPolygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
17.10Regular polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8417.10.1 Option center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8417.10.2 Option side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
18 The Circles 8518.1 Characteristics of a circle: \tkzDefCircle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
18.1.1 Example with a random point and option through . . . . . . . . . . . . . . . . . . . . . . 8618.1.2 Example with option diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8618.1.3 Circles inscribed and circumscribed for a given triangle . . . . . . . . . . . . . . . . . . . 8618.1.4 Example with option ex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8718.1.5 Euler’s circle for a given triangle with option euler . . . . . . . . . . . . . . . . . . . . . . 8718.1.6 Apollonius circles for a given segment option apollonius . . . . . . . . . . . . . . . . . 8818.1.7 Circles exinscribed to a given triangle option ex . . . . . . . . . . . . . . . . . . . . . . . 8818.1.8 Spieker circle with option spieker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8818.1.9 Orthogonal circle passing through two given points, option orthogonal through . . . . 8918.1.10 Orthogonal circle of given center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
19 Draw, Label the Circles 8919.1 Draw a circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
19.1.1 Circles and styles, draw a circle and color the disc . . . . . . . . . . . . . . . . . . . . . . 9019.2 Drawing circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
19.2.1 Circles defined by a triangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9119.2.2 Concentric circles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9119.2.3 Exinscribed circles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9219.2.4 Cardioid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
19.3 Draw a semicircle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9219.3.1 Use of \tkzDrawSemiCircle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
19.4 Colouring a disc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9319.4.1 Example from a sangaku . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
tkz-euclide AlterMundus
Contents 7
19.5 Clipping a disc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9419.5.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
19.6 Giving a label to a circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9519.6.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
20 Intersections 9620.1 Intersection of two straight lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
20.1.1 Example of intersection between two straight lines . . . . . . . . . . . . . . . . . . . . . . 9620.2 Intersection of a straight line and a circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
20.2.1 Simple example of a line-circle intersection . . . . . . . . . . . . . . . . . . . . . . . . . . 9720.2.2 More complex example of a line-circle intersection . . . . . . . . . . . . . . . . . . . . . . 9720.2.3 Circle defined by a center and a measure, and special cases . . . . . . . . . . . . . . . . . 9720.2.4 More complex example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9820.2.5 Calculation of radius example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9820.2.6 Calculation of radius example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9820.2.7 Calculation of radius example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9920.2.8 Squares in half a disc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9920.2.9 Option ”with nodes” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
20.3 Intersection of two circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10020.3.1 Construction of an equilateral triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10020.3.2 Example a mediator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10120.3.3 An isosceles triangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10120.3.4 Segment trisection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10120.3.5 With the optionwith nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
21 The angles 10321.1 Colour an angle: fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
21.1.1 Example with size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10321.1.2 Changing the order of items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10321.1.3 Multiples angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
21.2 Mark an angle mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10421.2.1 Example with mark = x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10721.2.2 Example with mark = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
21.3 Label at an angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10721.3.1 Example with pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
21.4 Marking a right angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10821.4.1 Example of marking a right angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10921.4.2 Example of marking a right angle, german style . . . . . . . . . . . . . . . . . . . . . . . . 10921.4.3 Mix of styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10921.4.4 Full example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
21.5 \tkzMarkRightAngles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
22 Angles tools 11022.1 Recovering an angle \tkzGetAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11022.2 Example of the use of \tkzGetAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11022.3 Angle formed by three points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
22.3.1 Verification of angle measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11222.4 Example of the use of \tkzFindAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
22.4.1 Determination of the three angles of a triangle . . . . . . . . . . . . . . . . . . . . . . . . 11322.5 Determining a slope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11322.6 Angle formed by a straight line with the horizontal axis \tkzFindSlopeAngle . . . . . . . . . . . 114
22.6.1 Folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11522.6.2 Example of the use of \tkzFindSlopeAngle . . . . . . . . . . . . . . . . . . . . . . . . . 115
tkz-euclide AlterMundus
Contents 8
23 Sectors 11623.1 \tkzDrawSector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
23.1.1 \tkzDrawSector and towards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11623.1.2 \tkzDrawSector and rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11723.1.3 \tkzDrawSector and R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11723.1.4 \tkzDrawSector and R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11723.1.5 \tkzDrawSector and R with nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
23.2 \tkzFillSector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11823.2.1 \tkzFillSector and towards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11823.2.2 \tkzFillSector and rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
23.3 \tkzClipSector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11923.3.1 \tkzClipSector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
24 The arcs 12124.1 Option towards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12124.2 Option towards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12124.3 Option rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12224.4 Option R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12224.5 Option R with nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12324.6 Option delta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12324.7 Option angles: example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12424.8 Option angles: example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
25 Miscellaneous tools 12525.1 Duplicate a segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
25.1.1 Proportion of gold with \tkzDuplicateSegment . . . . . . . . . . . . . . . . . . . . . . . 12625.2 Segment length \tkzCalcLength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
25.2.1 Compass square construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12725.3 Transformation from pt to cm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12725.4 Transformation from cm to pt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
25.4.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12825.5 Get point coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
25.5.1 Coordinate transfer with \tkzGetPointCoord . . . . . . . . . . . . . . . . . . . . . . . . 12825.5.2 Sum of vectors with \tkzGetPointCoord . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
26 Using the compass 13026.1 Main macro \tkzCompass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
26.1.1 Option length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13026.1.2 Option delta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
26.2 Multiple constructions \tkzCompasss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13026.3 Configuration macro \tkzSetUpCompass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
26.3.1 Use of \tkzSetUpCompass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
27 The Show 13227.1 Show the constructions of some lines \tkzShowLine . . . . . . . . . . . . . . . . . . . . . . . . . 132
27.1.1 Example of \tkzShowLine and parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . 13227.1.2 Example of \tkzShowLine and perpendicular . . . . . . . . . . . . . . . . . . . . . . . 13227.1.3 Example of \tkzShowLine and bisector . . . . . . . . . . . . . . . . . . . . . . . . . . . 13327.1.4 Example of \tkzShowLine and mediator . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
27.2 Constructions of certain transformations \tkzShowTransformation . . . . . . . . . . . . . . . . 13327.2.1 Example of the use of \tkzShowTransformation . . . . . . . . . . . . . . . . . . . . . . 13427.2.2 Another example of the use of \tkzShowTransformation . . . . . . . . . . . . . . . . . . 134
28 Different points 13528.1 \tkzDefEquiPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
28.1.1 Using \tkzDefEquiPoints with options . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
tkz-euclide AlterMundus
Contents 9
29 Protractor 13629.1 The circular protractor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13629.2 The circular protractor, transparent and returned . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
30 Some examples 13730.1 Some interesting examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
30.1.1 Similar isosceles triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13730.1.2 Revised version of ”Tangente” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13830.1.3 ”Le Monde” version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13930.1.4 Triangle altitudes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13930.1.5 Altitudes - other construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
30.2 Different authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14130.2.1 Square root of the integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14130.2.2 About right triangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14130.2.3 Archimedes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14130.2.4 Example: Dimitris Kapeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14230.2.5 Example 1: John Kitzmiller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14330.2.6 Example 2: John Kitzmiller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14430.2.7 Example 3: John Kitzmiller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14530.2.8 Example 4: author John Kitzmiller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14630.2.9 Example 1: from Indonesia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14730.2.10 Example 2: from Indonesia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14830.2.11 Three circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15030.2.12 ”The” Circle of APOLLONIUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
31 Customization 15431.1 Use of \tkzSetUpLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
31.1.1 Example 1: change line width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15431.1.2 Example 2: change style of line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15531.1.3 Example 3: extend lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
31.2 Points style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15531.2.1 Use of \tkzSetUpPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15631.2.2 Use of \tkzSetUpPoint inside a group . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
31.3 Use of \tkzSetUpCompass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15631.3.1 Use of \tkzSetUpCompass with bisector . . . . . . . . . . . . . . . . . . . . . . . . . . . 15731.3.2 Another example of of\tkzSetUpCompass . . . . . . . . . . . . . . . . . . . . . . . . . . 157
31.4 Own style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
32 Summary of tkz-base 15832.1 Utility of tkz-base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15832.2 \tkzInit and \tkzShowBB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15832.3 \tkzClip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15832.4 \tkzClip and the option space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
33 FAQ 16033.1 Most common errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Index 161
tkz-euclide AlterMundus
1 Presentation and Overview 10
1 Presentation and Overview
\begin{tikzpicture}[scale=.25]\tkzDefPoints{00/0/A,12/0/B,6/12*sind(60)/C}\foreach \density in {20,30,...,240}{%\tkzDrawPolygon[fill=teal!\density](A,B,C)\pgfnodealias{X}{A}\tkzDefPointWith[linear,K=.15](A,B) \tkzGetPoint{A}\tkzDefPointWith[linear,K=.15](B,C) \tkzGetPoint{B}\tkzDefPointWith[linear,K=.15](C,X) \tkzGetPoint{C}}
\end{tikzpicture}
1.1 Why tkz-euclide?
My initial goal was to provide other mathematics teachers and myself with a tool to quickly create Euclideangeometry figures without investing too much effort in learning a new programming language. Of course, tkz-euclide is for math teachers who use LATEX and makes it possible to easily create correct drawings by means ofLATEX.
It appeared that the simplest method was to reproduce the one used to obtain construction by hand. To describea construction, you must, of course, define the objects but also the actions that you perform. It seemed to methat syntax close to the language of mathematicians and their students would be more easily understandable;moreover, it also seemed to me that this syntax should be close to that of LATEX. The objects, of course, are points,segments, lines, triangles, polygons and circles. As for actions, I considered five to be sufficient, namely: define,create, draw, mark and label.
The syntax is perhaps too verbose but it is, I believe, easily accessible. As a result, the students like teachers wereable to easily access this tool.
1.2 tkz-euclide vs TikZ
I love programming withTikZ, and without TikZ I would never have had the idea to create tkz-euclide but neverforget that behind it there is TikZ and that it is always possible to insert code fromTikZ. tkz-euclide doesn’tprevent you from using TikZ. That said, I don’t think mixing syntax is a good thing.
There is no need to compare TikZ and tkz-euclide. The latter is not addressed to the same audience as TikZ.The first one allows you to do a lot of things, the second one only does geometry drawings. The first one can doeverything the second one does, but the second one will more easily do what you want.
tkz-euclide AlterMundus
1 Presentation and Overview 11
1.3 How it works
1.3.1 Example Part I: gold triangle
𝛼
𝛼
𝐶 𝐴𝐷
𝐵
𝐸
Let’s analyze the figure
1. 𝐶𝐵𝐷 and𝐷𝐵𝐸 are isosceles triangles;
2. 𝐵𝐶 = 𝐵𝐸 and (𝐵𝐷) is a bisector of the angle 𝐶𝐵𝐸;
3. From this we deduce that the 𝐶𝐵𝐷 and𝐷𝐵𝐸 angles are equal and have the same measure 𝛼
𝐵𝐴𝐶+𝐴𝐵𝐶+𝐵𝐶𝐴= 180∘ in the triangle 𝐵𝐴𝐶
3𝛼+𝐵𝐶𝐴= 180∘ in the triangle 𝐶𝐵𝐷
then𝛼+2𝐵𝐶𝐴= 180∘
or𝐵𝐶𝐴= 90∘−𝛼/2
4. Finally𝐶𝐵𝐷=𝛼 = 36∘
the triangle 𝐶𝐵𝐷 is a ”gold” triangle.
How construct a gold triangle or an angle of 36∘?
1. We place the fixed points 𝐶 and𝐷. \tkzDefPoint(0,0){C} and \tkzDefPoint(4,0){D};
2. We construct a square 𝐶𝐷𝑒𝑓 and we construct the midpoint𝑚 of [𝐶𝑓];
We can do all of this with a compass and a rule;
3. Then we trace an arc with center𝑚 through 𝑒. This arc cross the line (𝐶𝑓) at 𝑛;
4. Now the two arcs with center 𝐶 and𝐷 and radius 𝐶𝑛 define the point 𝐵.
tkz-euclide AlterMundus
1 Presentation and Overview 12
\begin{tikzpicture}\tkzDefPoint(0,0){C}\tkzDefPoint(4,0){D}\tkzDefSquare(C,D)\tkzGetPoints{e}{f}\tkzDefMidPoint(C,f)\tkzGetPoint{m}\tkzInterLC(C,f)(m,e)\tkzGetSecondPoint{n}\tkzInterCC[with nodes](C,C,n)(D,C,n)\tkzGetFirstPoint{B}\tkzDrawSegment[brown,dashed](f,n)\pgfinterruptboundingbox\tkzDrawPolygon[brown,dashed](C,D,e,f)\tkzDrawArc[brown,dashed](m,e)(n)\tkzCompass[brown,dashed,delta=20](C,B)\tkzCompass[brown,dashed,delta=20](D,B)\endpgfinterruptboundingbox\tkzDrawPoints(C,D,B)\tkzDrawPolygon(B,...,D)\end{tikzpicture}
After building the golden triangle 𝐵𝐶𝐷, we build the point 𝐴 by noticing that 𝐵𝐷 =𝐷𝐴. Then we get the point 𝐸and finally the point 𝐹. This is done with already intersections of defined objects (line and circle).
𝛼
𝛼
𝐴𝐶 𝐷
𝐸
𝐵
𝐹
\begin{tikzpicture}\tkzDefPoint(0,0){C}\tkzDefPoint(4,0){D}\tkzDefSquare(C,D)\tkzGetPoints{e}{f}\tkzDefMidPoint(C,f)\tkzGetPoint{m}\tkzInterLC(C,f)(m,e)\tkzGetSecondPoint{n}\tkzInterCC[with nodes](C,C,n)(D,C,n)\tkzGetFirstPoint{B}\tkzInterLC(C,D)(D,B) \tkzGetSecondPoint{A}
tkz-euclide AlterMundus
1 Presentation and Overview 13
\tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E}\tkzInterLL(B,D)(C,E) \tkzGetPoint{F}\tkzDrawPoints(C,D,B)\tkzDrawPolygon(B,...,D)\tkzDrawPolygon(B,C,D)\tkzDrawSegments(D,A A,B C,E)\tkzDrawArc[delta=10](B,C)(E)\tkzDrawPoints(A,...,F)\tkzMarkRightAngle[fill=blue!20](B,F,C)\tkzFillAngles[fill=blue!10](C,B,D E,A,D)\tkzMarkAngles(C,B,D E,A,D)\tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$}\tkzLabelPoints[below](A,C,D,E)\tkzLabelPoints[above right](B,F)
\end{tikzpicture}
1.3.2 Example Part II: two others methods gold and euclide triangle
tkz-euclide knows how to define a ”gold” or ”euclide” triangle. We can define 𝐵𝐶𝐷 and 𝐵𝐶𝐴 like gold triangles.
\begin{tikzpicture}\tkzDefPoint(0,0){C}\tkzDefPoint(4,0){D}\tkzDefTriangle[euclide](C,D)\tkzGetPoint{B}\tkzDefTriangle[euclide](B,C)\tkzGetPoint{A}\tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E}\tkzInterLL(B,D)(C,E) \tkzGetPoint{F}\tkzDrawPoints(C,D,B)\tkzDrawPolygon(B,...,D)\tkzDrawPolygon(B,C,D)\tkzDrawSegments(D,A A,B C,E)\tkzDrawArc[delta=10](B,C)(E)\tkzDrawPoints(A,...,F)\tkzMarkRightAngle[fill=blue!20](B,F,C)\tkzFillAngles[fill=blue!10](C,B,D E,A,D)\tkzMarkAngles(C,B,D E,A,D)\tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$}\tkzLabelPoints[below](A,C,D,E)\tkzLabelPoints[above right](B,F)
\end{tikzpicture}
Here is a final method that uses rotations:
\begin{tikzpicture}\tkzDefPoint(0,0){C} % possible% \tkzDefPoint[label=below:$C$](0,0){C}% but don't do this\tkzDefPoint(2,6){B}% We get D and E with a rotation\tkzDefPointBy[rotation= center B angle 36](C) \tkzGetPoint{D}\tkzDefPointBy[rotation= center B angle 72](C) \tkzGetPoint{E}% To get A we use an intersection of lines\tkzInterLL(B,E)(C,D) \tkzGetPoint{A}\tkzInterLL(C,E)(B,D) \tkzGetPoint{H}% drawing
tkz-euclide AlterMundus
1 Presentation and Overview 14
\tkzDrawArc[delta=10](B,C)(E)\tkzDrawPolygon(C,B,D)\tkzDrawSegments(D,A B,A C,E)% angles\tkzMarkAngles(C,B,D E,A,D) %this is to draw the arcs\tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$}\tkzMarkRightAngle(B,H,C)\tkzDrawPoints(A,...,E)% Label only now\tkzLabelPoints[below left](C,A)\tkzLabelPoints[below right](D)\tkzLabelPoints[above](B,E)\end{tikzpicture}
1.3.3 Complete but minimal example
A unit of length being chosen, the example shows how to obtain a segment of length√𝑎 from a segment of length𝑎, using a ruler and a compass.
𝐼𝐵 = 𝑎, 𝐴𝐼 = 1
1𝑎/2
𝑎/2
𝐴(0,0) 𝐼 𝑀
𝐶
𝐵(10,0)
√𝑎2 =𝑎 (𝑎 > 0)
Comments
– The Preamble
Let us first look at the preamble. If you need it, you have to load xcolor before tkz-euclide, that is, beforeTikZ. TikZ may cause problems with the active characters, but... provides a library in its latest version that’ssupposed to solve these problems babel.
\documentclass{standalone} % or another class% \usepackage{xcolor} % before tikz or tkz-euclide if necessary
\usepackage{tkz-euclide} % no need to load TikZ% \usetkzobj{all} is no longer necessary% \usetikzlibrary{babel} if there are problems with the active characters
The following code consists of several parts:
– Definition of fixed points: the first part includes the definitions of the points necessary for the construction,these are the fixed points. The macros \tkzInit and \tkzClip in most cases are not necessary.
\tkzDefPoint(0,0){A}\tkzDefPoint(1,0){I}
tkz-euclide AlterMundus
1 Presentation and Overview 15
– The second part is dedicated to the creation of new points from the fixed points; a 𝐵 point is placed at 10 cmfrom 𝐴. The middle of [𝐴𝐵] is defined by𝑀 and then the orthogonal line to the (𝐴𝐵) line is searched for atthe 𝐼 point. Then we look for the intersection of this line with the semi-circle of center𝑀 passing through 𝐴.
\tkzDefPointBy[homothety=center A ratio 10 ](I)\tkzGetPoint{B}
\tkzDefMidPoint(A,B)\tkzGetPoint{M}
\tkzDefPointWith[orthogonal](I,M)\tkzGetPoint{H}
\tkzInterLC(I,H)(M,A)\tkzGetSecondPoint{B}
– The third one includes the different drawings;
\tkzDrawSegment[style=orange](I,H)\tkzDrawPoints(O,I,A,B,M)\tkzDrawArc(M,A)(O)\tkzDrawSegment[dim={$1$,-16pt,}](O,I)\tkzDrawSegment[dim={$a/2$,-10pt,}](I,M)\tkzDrawSegment[dim={$a/2$,-16pt,}](M,A)
– Marking: the fourth is devoted to marking;
\tkzMarkRightAngle(A,I,B)
– Labelling: the latter only deals with the placement of labels.
\tkzLabelPoint[left](O){$A(0,0)$}\tkzLabelPoint[right](A){$B(10,0)$}\tkzLabelSegment[right=4pt](I,B){$\sqrt{a^2}=a \ (a>0)$}
– The full code:
\begin{tikzpicture}[scale=1,ra/.style={fill=gray!20}]% fixed points\tkzDefPoint(0,0){A}\tkzDefPoint(1,0){I}% calculation\tkzDefPointBy[homothety=center A ratio 10 ](I) \tkzGetPoint{B}\tkzDefMidPoint(A,B) \tkzGetPoint{M}\tkzDefPointWith[orthogonal](I,M) \tkzGetPoint{H}\tkzInterLC(I,H)(M,B) \tkzGetSecondPoint{C}\tkzDrawSegment[style=orange](I,C)\tkzDrawArc(M,B)(A)\tkzDrawSegment[dim={$1$,-16pt,}](A,I)\tkzDrawSegment[dim={$a/2$,-10pt,}](I,M)\tkzDrawSegment[dim={$a/2$,-16pt,}](M,B)\tkzMarkRightAngle[ra](A,I,C)\tkzDrawPoints(I,A,B,C,M)\tkzLabelPoint[left](A){$A(0,0)$}\tkzLabelPoints[above right](I,M)\tkzLabelPoints[above left](C)\tkzLabelPoint[right](B){$B(10,0)$}\tkzLabelSegment[right=4pt](I,C){$\sqrt{a^2}=a \ (a>0)$}
tkz-euclide AlterMundus
1 Presentation and Overview 16
\end{tikzpicture}
1.4 The Elements of tkz code
In this paragraph, we start looking at the ”rules” and ”symbols” used to create a figure with tkz-euclide.
The primitive objects are points. You can refer to a point at any time using the name given when defining it. (it ispossible to assign a different name later on).
In general, tkz-euclide macros have a name beginning with tkz. There are four main categories starting with:\tkzDef... \tkzDraw... \tkzMark... and \tkzLabel...
Among the first category, \tkzDefPoint allows you to define fixed points. It will be studied in detail later. Herewe will see in detail the macro \tkzDefTriangle.
This macro makes it possible to associate to a pair of points a third point in order to define a certain triangle\tkzDefTriangle(A,B). The obtained point is referenced tkzPointResult and it is possible to choose anotherreference with \tkzGetPoint{C} for example. Parentheses are used to pass arguments. In (A,B) 𝐴 and 𝐵 are thepoints with which a third will be defined.
However, in {C} we use braces to retrieve the new point. In order to choose a certain type of triangle amongthe following choices: equilateral, half, pythagoras, school, golden or sublime, euclide, gold, cheops...and two angles you just have to choose between hooks, for example:
\tkzDefTriangle[euclide](A,B) \tkzGetPoint{C}
equilateral
half
pythagore
schoolgolden
euclide
goldcheops
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/A,8/0/B}\foreach \tr in {equilateral,half,pythagore,%
school,golden,euclide, gold,cheops}{\tkzDefTriangle[\tr](A,B) \tkzGetPoint{C}\tkzDrawPoint(C)\tkzLabelPoint[right](C){\tr}\tkzDrawSegments(A,C C,B)}\tkzDrawPoints(A,B)\tkzDrawSegments(A,B)\end{tikzpicture}
1.5 Notations and conventions
I deliberately chose to use the geometric French and personal conventions to describe the geometric objectsrepresented. The objects defined and represented by tkz-euclide are points, lines and circles located in a plane.They are the primary objects of Euclidean geometry from which we will construct figures.
According to Euclidian these figures will only illustrate pure ideas produced by our brain. Thus a point has nodimension and therefore no real existence. In the same way the line has no width and therefore no existence inthe real world. The objects that we are going to consider are only representations of ideal mathematical objects.
tkz-euclide AlterMundus
1 Presentation and Overview 17
tkz-euclide will follow the steps of the ancient Greeks to obtain geometrical constructions using the ruler andthe compass.
Here are the notations that will be used:
– The points are represented geometrically either by a small disc or by the intersection of two lines (twostraight lines, a straight line and a circle or two circles). In this case, the point is represented by a cross.
𝐴
𝐵\begin{tikzpicture}\tkzDefPoints{0/0/A,4/2/B}\tkzDrawPoints(A,B)\tkzLabelPoints(A,B)
\end{tikzpicture}
or else
𝐴
𝐵\begin{tikzpicture}\tkzSetUpPoint[shape=cross, color=red]\tkzDefPoints{0/0/A,4/2/B}\tkzDrawPoints(A,B)\tkzLabelPoints(A,B)\end{tikzpicture}
The existence of a point being established, we can give it a label which will be a capital letter (with someexceptions) of the Latin alphabet such as 𝐴, 𝐵 or 𝐶. For example:
– 𝑂 is a center for a circle, a rotation, etc.;
– 𝑀 defined a midpoint;
– 𝐻 defined the foot of an altitude;
– 𝑃′ is the image of 𝑃 by a transformation ;
It is important to note that the reference name of a point in the code may be different from the label todesignate it in the text. So we can define a point A and give it as label 𝑃. In particular the style will bedifferent, point A will be labeled 𝐴.
𝑃\begin{tikzpicture}\tkzDefPoints{0/0/A}\tkzDrawPoints(A)\tkzLabelPoint(A){$P$}
\end{tikzpicture}
Exceptions: some points such as the middle of the sides of a triangle share a characteristic, so it is normalthat their names also share a common character. We will designate these points by𝑀𝑎,𝑀𝑏 and𝑀𝑐 or𝑀𝐴,𝑀𝐵 and𝑀𝐶.
In the code, these points will be referred to as: M_A, M_B and M_C.
Another exception relates to intermediate construction points which will not be labelled. They will often bedesignated by a lowercase letter in the code.
– The line segments are designated by two points representing their ends in square brackets: [𝐴𝐵].
– The straight lines are in Euclidean geometry defined by two points so 𝐴 and 𝐵 define the straight line (𝐴𝐵).We can also designate this stright line using the Greek alphabet and name it (𝛿) or (Δ). It is also possible todesignate the straight line with lowercase letters such as 𝑑 and 𝑑′.
– The semi-straight line is designated as follows [𝐴𝐵).
– Relation between the straight lines. Two perpendicular (𝐴𝐵) and (𝐶𝐷) lines will be written (𝐴𝐵) ⟂ (𝐶𝐷) andif they are parallel we will write (𝐴𝐵) � (𝐶𝐷).
tkz-euclide AlterMundus
1 Presentation and Overview 18
– The lengths of the sides of triangle ABC are 𝐴𝐵, 𝐴𝐶 and 𝐵𝐶. The numbers are also designated by a lowercaseletter so we will write: 𝐴𝐵 = 𝑐, 𝐴𝐶 = 𝑏 and 𝐵𝐶 = 𝑎. The letter 𝑎 is also used to represent an angle, and 𝑟 isfrequently used to represent a radius, 𝑑 a diameter, 𝑙 a length, 𝑑 a distance.
– Polygons are designated afterwards by their vertices so 𝐴𝐵𝐶 is a triangle, 𝐸𝐹𝐺𝐻 a quadrilateral.
– Angles are generally measured in degrees (ex 60∘) and in an equilateral 𝐴𝐵𝐶 triangle we will write 𝐴𝐵𝐶=𝐵 = 60∘.
– The arcs are designated by their extremities. For example if 𝐴 and 𝐵 are two points of the same circle then�𝐴𝐵.
– Circles are noted either 𝒞 if there is no possible confusion or 𝒞 (𝑂 ; 𝐴) for a circle with center 𝑂 and passingthrough the point 𝐴 or 𝒞 (𝑂 ; 1) for a circle with center O and radius 1 cm.
– Name of the particular lines of a triangle: I used the terms bisector, bisector out, mediator (sometimescalled perpendicular bisectors), altitude, median and symmedian.
– (𝑥1,𝑦1) coordinates of the point 𝐴1, (𝑥𝐴,𝑦𝐴) coordinates of the point 𝐴.
1.6 How to use the tkz-euclide package ?
1.6.1 Let's look at a classic example
In order to show the right way, we will see how to build an equilateral triangle. Several possibilities are open to us,we are going to follow the steps of Euclid.
– First of all you have to use a document class. The best choice to test your code is to create a single figurewith the class standalone.
\documentclass{standalone}
– Then load the tkz-euclide package:
\usepackage{tkz-euclide}
You don’t need to load TikZ because the tkz-euclide package works on top of TikZ and loads it.
– �\usetkzobjall With the new version 3.03 you don’t need this line anymore. All objects are now loaded.
– Start the document and open a TikZ picture environment:
\begin{document}\begin{tikzpicture}
– Now we define two fixed points:
\tkzDefPoint(O,O){A}\tkzDefPoint(5,2){B}
– Two points define two circles, let’s use these circles:
circle with center 𝐴 through 𝐵 and circle with center 𝐵 through 𝐴. These two circles have two points incommon.
\tkzInterCC(A,B)(B,A)
We can get the points of intersection with
\tkzGetPoints{C}{D}
– All the necessary points are obtained, we can move on to the final steps including the plots.
\tkzDrawCircles[gray,dashed](A,B B,A)\tkzDrawPolygon(A,B,C)% The triangle
– Draw all points 𝐴, 𝐵, 𝐶 and𝐷:
\tkzDrawPoints(A,...,D)
tkz-euclide AlterMundus
1 Presentation and Overview 19
– The final step, we print labels to the points and use options for positioning:
\tkzLabelSegments[swap](A,B){$c$}\tkzLabelPoints(A,B,D)\tkzLabelPoints[above](C)
– We finally close both environments
\end{tikzpicture}\end{document}
– The complete code
𝑐𝐴
𝐵
𝐷
𝐶
\begin{tikzpicture}[scale=.5]% fixed points\tkzDefPoint(0,0){A}\tkzDefPoint(5,2){B}% calculus\tkzInterCC(A,B)(B,A)\tkzGetPoints{C}{D}% drawings\tkzDrawCircles[gray,dashed](A,B B,A)\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,...,D)% marking\tkzMarkSegments[mark=s||](A,B B,C C,A)% labelling\tkzLabelSegments[swap](A,B){$c$}\tkzLabelPoints(A,B,D)\tkzLabelPoints[above](C)
\end{tikzpicture}
1.6.2 Set, Calculate, Draw, Mark, Label
The title could have been: Separation of Calculus and Drawings
When a document is prepared using the LATEX system, the source code of the document can be divided into twoparts: the document body and the preamble. Under this methodology, publications can be structured, styled andtypeset with minimal effort. I propose a similar methodology for creating figures with tkz-euclide.
The first part defines the fixed points, the second part allows the creation of new points. These are the two mainparts. All that is left to do is to draw, mark and label.
tkz-euclide AlterMundus
2 Installation 20
2 Installation
tkz-euclide and tkz-base are now on the server of the CTAN1. If you want to test a beta version, just put thefollowing files in a texmf folder that your system can find. You will have to check several points:
– The tkz-base and tkz-euclide folders must be located on a path recognized by latex.
– The xfp2, numprint and tikz 3.00 must be installed as they are mandatory, for the proper functioning oftkz-euclide.
– This documentation and all examples were obtained with lualatex-dev but pdflatex should be suitable.
2.1 List of folder files tkzbase and tkzeuclide
In the folder base:
– tkz-base.cfg
– tkz-base.sty
– tkz-lib-marks.tex
– tkz-obj-axes.tex
– tkz-obj-grids.tex
– tkz-obj-marks.tex
– tkz-obj-points.tex
– tkz-obj-rep.tex
– tkz-tools-arith.tex
– tkz-tools-base.tex
– tkz-tools-BB.tex
– tkz-tools-misc.tex
– tkz-tools-modules.tex
– tkz-tools-print.tex
– tkz-tools-text.tex
– tkz-tools-utilities.tex
In the folder euclide:
– tkz-euclide.sty
– tkz-obj-eu-angles.tex
– tkz-obj-eu-arcs.tex
– tkz-obj-eu-circles.tex
– tkz-obj-eu-compass.tex
– tkz-obj-eu-draw-circles.tex
– tkz-obj-eu-draw-lines.tex
– tkz-obj-eu-draw-polygons.tex
– tkz-obj-eu-draw-triangles.tex
1 tkz-base and tkz-euclide are part of TeXLive and tlmgr allows you to install them. These packages are also part of MiKTeX underWindows.
2 xfp replaces fp.
tkz-euclide AlterMundus
2 Installation 21
– tkz-obj-eu-lines.tex
– tkz-obj-eu-points-by.tex
– tkz-obj-eu-points-rnd.tex
– tkz-obj-eu-points-with.tex
– tkz-obj-eu-points.tex
– tkz-obj-eu-polygons.tex
– tkz-obj-eu-protractor.tex
– tkz-obj-eu-sectors.tex
– tkz-obj-eu-show.tex
– tkz-obj-eu-triangles.tex
– tkz-tools-angles.tex
– tkz-tools-intersections.tex
– tkz-tools-math.tex
☞ � Now tkz-euclide loads all the files.
tkz-euclide AlterMundus
3 News and compatibility 22
3 News and compatibility
Some changes have beenmade tomake the syntaxmore homogeneous and especially to distinguish the definitionand search for coordinates from the rest, i.e. drawing, marking and labelling. In the future, the definition macrosbeing isolated, it will be easier to introduce a phase of coordinate calculations using Lua.
An important novelty is the recent replacement of the fp package by xfp. This is to improve the calculations alittle bit more and to make it easier to use.
Here are some of the changes.
– Improved code and bug fixes;
– With tkz-euclide loads all objects, so there’s no need to place \usetkzobj{all};
– The bounding box is now controlled in each macro (hopefully) to avoid the use of \tkzInit followed by\tkzClip;
– Added macros for the bounding box: \tkzSaveBB \tkzClipBB and so on;
– Logically most macros accept TikZ options. So I removed the ”duplicate” options when possible thus the”label options” option is removed;
– Randompoints arenow intkz-euclideand themacro\tkzGetRandPointOn is replacedby\tkzDefRandPointOn.For homogeneity reasons, the points must be retrieved with \tkzGetPoint;
– The options end and start which allowed to give a label to a straight line are removed. You now have to usethe macro \tkzLabelLine;
– Introduction of the libraries quotes and angles; it allows to give a label to a point, even if I am not in favourof this practice;
– The notion of vector disappears, to draw a vector just pass ”->” as an option to \tkzDrawSegment;
– Many macros still exist, but are obsolete and will disappear:
– \tkzDrawMedians trace and create midpoints on the sides of a triangle. The creation and draw-ing separation is not respected so it is preferable to first create the coordinates of these points with\tkzSpcTriangle[median]and then to choose theones youare going todrawwith\tkzDrawSegmentsor \tkzDrawLines;
– \tkzDrawMedians(A,B)(C) is now spelled \tkzDrawMedians(A,C,B). This defines the median from𝐶;
– Another example \tkzDrawTriangle[equilateral] was handy but it is better to get the third pointwith \tkzDefTriangle[equilateral] and then draw with \tkzDrawPolygon;
– \tkzDefRandPointOn is replaced by \tkzGetRandPointOn;
– now \tkzTangent is replaced by \tkzDefTangent;
– You can use global path name if you want find intersection but it’s very slow like in TikZ.
– Appearance of the macro \usetkztool which allows to load new ”tools”.
tkz-euclide AlterMundus
4 Definition of a point 23
4 Definition of a point
Points can be specified in any of the following ways:
– Cartesian coordinates;
– Polar coordinates;
– Named points;
– Relative points.
Even if it’s possible, I think it’s a bad idea to work directly with coordinates. Preferable is to use named points. Apoint is defined if it has a name linked to a unique pair of decimal numbers. Let (𝑥,𝑦) or (𝑎 ∶ 𝑑) i.e. (𝑥 abscissa,𝑦 ordinate) or (𝑎 angle: 𝑑 distance). This is possible because the plan has been provided with an orthonormedCartesian coordinate system. The working axes are supposed to be (ortho)normed with unity equal to 1 cm orsomething equivalent like 0.39370 in. Now by default if you use a grid or axes, the rectangle used is defined by thecoordinate points: (0,0) and (10,10). It’s the macro \tkzInit of the package tkz-base that creates this rectangle.Look at the following two codes and the result of their compilation:
\begin{tikzpicture}\tkzGrid\tkzDefPoint(0,0){O}\tkzDrawPoint[red](O)\tkzShowBB[line width=2pt,teal]\end{tikzpicture}
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(5,5){A}\tkzDrawSegment[blue](O,A)\tkzDrawPoints[red](O,A)\tkzShowBB[line width=2pt,teal]
\end{tikzpicture}
tkz-euclide AlterMundus
4 Definition of a point 24
The Cartesian coordinate (𝑎,𝑏) refers to the point 𝑎 centimeters in the 𝑥-direction and 𝑏 centimeters in the𝑦-direction.
A point in polar coordinates requires an angle 𝛼, in degrees, and a distance 𝑑 from the origin with a dimensionalunit by default it’s the cm.Cartesian coordinates
𝑥
𝑦
𝐴1(𝑥1,𝑦1)
𝑥1
𝑦1
𝑂 𝐼
𝐽
\begin{tikzpicture}[scale=1]\tkzInit[xmax=5,ymax=5]\tkzDefPoints{0/0/O,1/0/I,0/1/J}\tkzDrawXY[noticks,>=latex]\tkzDefPoint(3,4){A}\tkzDrawPoints(O,A)\tkzLabelPoint(A){$A_1 (x_1,y_1)$}\tkzShowPointCoord[xlabel=$x_1$,
ylabel=$y_1$](A)\tkzLabelPoints(O,I)\tkzLabelPoints[left](J)\tkzDrawPoints[shape=cross](I,J)
\end{tikzpicture}
Polar coordinates
𝑥
𝑦
𝑑
𝛼
𝑃(𝛼 ∶ 𝑑)
𝑂 𝐼
𝐽
\begin{tikzpicture}[,scale=1]\tkzInit[xmax=5,ymax=5]\tkzDefPoints{0/0/O,1/0/I,0/1/J}\tkzDefPoint(40:4){P}\tkzDrawXY[noticks,>=triangle 45]\tkzDrawSegment[dim={$d$,
16pt,above=6pt}](O,P)\tkzDrawPoints(O,P)\tkzMarkAngle[mark=none,->](I,O,P)\tkzFillAngle[fill=blue!20,
opacity=.5](I,O,P)\tkzLabelAngle[pos=1.25](I,O,P){$\alpha$}\tkzLabelPoint(P){$P (\alpha : d )$}\tkzDrawPoints[shape=cross](I,J)\tkzLabelPoints(O,I)\tkzLabelPoints[left](J)
\end{tikzpicture}
The \tkzDefPoint macro is used to define a point by assigning coordinates to it. This macro is based on\coordinate, a macro of TikZ. It can use TikZ-specific options such as shift. If calculations are requiredthen the xfp package is chosen. We can use Cartesian or polar coordinates.
4.1 Defining a named point \tkzDefPoint
\tkzDefPoint[⟨local options⟩](⟨𝑥,𝑦⟩){⟨name⟩} or (⟨𝛼:𝑑⟩){⟨name⟩}
arguments default definition
(𝑥,𝑦) no default 𝑥 and 𝑦 are two dimensions, by default in cm.(𝛼:𝑑) no default 𝛼 is an angle in degrees, 𝑑 is a dimension{name} no default Name assigned to the point: 𝐴, 𝑇𝑎 ,𝑃1 etc ...
The obligatory arguments of this macro are two dimensions expressed with decimals, in the first case they aretwo measures of length, in the second case they are a measure of length and the measure of an angle in degrees.
tkz-euclide AlterMundus
4 Definition of a point 25
options default definition
label no default allows you to place a label at a predefined distanceshift no default adds (𝑥,𝑦) or (𝛼 ∶ 𝑑) to all coordinates
4.1.1 Cartesian coordinates
\begin{tikzpicture}\tkzInit[xmax=5,ymax=5]\tkzDefPoint(0,0){A}\tkzDefPoint(4,0){B}\tkzDefPoint(0,3){C}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,B,C)\end{tikzpicture}
4.1.2 Calculations with xfp
\begin{tikzpicture}[scale=1]\tkzInit[xmax=4,ymax=4]\tkzGrid\tkzDefPoint(-1+2,sqrt(4)){O}\tkzDefPoint({3*ln(exp(1))},{exp(1)}){A}\tkzDefPoint({4*sin(pi/6)},{4*cos(pi/6)}){B}\tkzDrawPoints[color=blue](O,B,A)
\end{tikzpicture}
4.1.3 Polar coordinates
\begin{tikzpicture}\foreach \an [count=\i] in {0,60,...,300}{ \tkzDefPoint(\an:3){A_\i}}\tkzDrawPolygon(A_1,A_...,A_6)\tkzDrawPoints(A_1,A_...,A_6)\end{tikzpicture}
4.1.4 Calculations and coordinates
Youmust follow the syntax of xfp here. It is always possible to go through pgfmath but in this case, the coordinatesmust be calculated before using the macro \tkzDefPoint.
tkz-euclide AlterMundus
4 Definition of a point 26
\begin{tikzpicture}[scale=.5]\foreach \an [count=\i] in {0,2,...,358}{ \tkzDefPoint(\an:sqrt(sqrt(\an mm))){A_\i}}\tkzDrawPoints(A_1,A_...,A_180)\end{tikzpicture}
4.1.5 Relative points
First, we canuse thescope environment fromTikZ. In the following example, wehave away todefine anequilateraltriangle.
𝐵 𝐶
𝐴
\begin{tikzpicture}[scale=1]\tkzSetUpLine[color=blue!60]
\begin{scope}[rotate=30]\tkzDefPoint(2,3){A}\begin{scope}[shift=(A)]
\tkzDefPoint(90:5){B}\tkzDefPoint(30:5){C}
\end{scope}\end{scope}\tkzDrawPolygon(A,B,C)
\tkzLabelPoints[above](B,C)\tkzLabelPoints[below](A)\tkzDrawPoints(A,B,C)\end{tikzpicture}
4.2 Point relative to another: \tkzDefShiftPoint
\tkzDefShiftPoint[⟨Point⟩](⟨𝑥,𝑦⟩){⟨name⟩} or (⟨𝛼:𝑑⟩){⟨name⟩}
arguments default definition
(𝑥,𝑦) no default 𝑥 and 𝑦 are two dimensions, by default in cm.(𝛼:𝑑) no default 𝛼 is an angle in degrees, 𝑑 is a dimension
options default definition
[pt] no default \tkzDefShiftPoint[A](0:4){B}
4.2.1 Isosceles triangle with \tkzDefShiftPoint
This macro allows you to place one point relative to another. This is equivalent to a translation. Here is how toconstruct an isosceles triangle with main vertex 𝐴 and angle at vertex of 30∘.
tkz-euclide AlterMundus
4 Definition of a point 27
𝐵
𝐶𝐴 \begin{tikzpicture}[rotate=-30]
\tkzDefPoint(2,3){A}\tkzDefShiftPoint[A](0:4){B}\tkzDefShiftPoint[A](30:4){C}\tkzDrawSegments(A,B B,C C,A)\tkzMarkSegments[mark=|,color=red](A,B A,C)\tkzDrawPoints(A,B,C)\tkzLabelPoints(B,C)\tkzLabelPoints[above left](A)
\end{tikzpicture}
4.2.2 Equilateral triangle
Let’s see how to get an equilateral triangle (there is much simpler)
𝐵
𝐶
𝐴
\begin{tikzpicture}[scale=1]\tkzDefPoint(2,3){A}\tkzDefShiftPoint[A](30:3){B}\tkzDefShiftPoint[A](-30:3){C}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,B,C)\tkzLabelPoints(B,C)\tkzLabelPoints[above left](A)\tkzMarkSegments[mark=|,color=red](A,B A,C B,C)
\end{tikzpicture}
4.2.3 Parallelogram
There’s a simpler way
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(30:3){B}\tkzDefShiftPointCoord[B](10:2){C}\tkzDefShiftPointCoord[A](10:2){D}\tkzDrawPolygon(A,...,D)\tkzDrawPoints(A,...,D)
\end{tikzpicture}
4.3 Definition of multiple points: \tkzDefPoints
\tkzDefPoints[⟨local options⟩]{⟨𝑥1/𝑦1/𝑛1,𝑥2/𝑦2/𝑛2, ...⟩}
𝑥𝑖 and 𝑦𝑖 are the coordinates of a referenced point 𝑛𝑖
arguments default example
𝑥𝑖/𝑦𝑖/𝑛𝑖 \tkzDefPoints{0/0/O,2/2/A}
options default definition
shift no default Adds (𝑥,𝑦) or (𝛼 ∶ 𝑑) to all coordinates
tkz-euclide AlterMundus
5 Special points 28
4.4 Create a triangle
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,4/0/B,4/3/C}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,B,C)
\end{tikzpicture}
4.5 Create a square
Note here the syntax for drawing the polygon.
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,2/0/B,2/2/C,0/2/D}\tkzDrawPolygon(A,...,D)\tkzDrawPoints(A,B,C,D)
\end{tikzpicture}
5 Special points
The introduction of the dots was done in tkz-base, the most important macro being \tkzDefPoint. Here aresome special points.
5.1 Middle of a segment \tkzDefMidPoint
It is a question of determining the middle of a segment.
\tkzDefMidPoint(⟨pt1,pt2⟩)
The result is in tkzPointResult. We can access it with \tkzGetPoint.
arguments default definition
(pt1,pt2) no default pt1 and pt2 are two points
5.1.1 Use of \tkzDefMidPoint
Review the use of \tkzDefPoint in tkz-base.
𝐴
𝐵
𝐶
\begin{tikzpicture}[scale=1]\tkzDefPoint(2,3){A}\tkzDefPoint(4,0){B}\tkzDefMidPoint(A,B) \tkzGetPoint{C}\tkzDrawSegment(A,B)\tkzDrawPoints(A,B,C)\tkzLabelPoints[right](A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
5 Special points 29
5.2 Barycentric coordinates
𝑝𝑡1, 𝑝𝑡2, …, 𝑝𝑡𝑛 being 𝑛 points, they define 𝑛 vectors 𝑣1, 𝑣2, …, 𝑣𝑛 with the origin of the referential as the commonendpoint. 𝛼1, 𝛼2, …𝛼𝑛 are 𝑛 numbers, the vector obtained by:
𝛼1𝑣1+𝛼2𝑣2+⋯+𝛼𝑛𝑣𝑛𝛼1+𝛼2+⋯+𝛼𝑛
defines a single point.
\tkzDefBarycentricPoint(⟨pt1=𝛼1,pt2=𝛼2,…⟩)
arguments default definition
(pt1=𝛼1,pt2=𝛼2,…) no default Each point has a assigned weight
You need at least two points.
5.2.1 Using \tkzDefBarycentricPoint with two points
In the following example, we obtain the barycentre of points 𝐴 and 𝐵with coefficients 1 and 2, in other words:
𝐴𝐼 =23𝐴𝐵
𝐴
𝐵
𝐼
\begin{tikzpicture}\tkzDefPoint(2,3){A}\tkzDefShiftPointCoord[2,3](30:4){B}\tkzDefBarycentricPoint(A=1,B=2)\tkzGetPoint{I}\tkzDrawPoints(A,B,I)\tkzDrawLine(A,B)\tkzLabelPoints(A,B,I)
\end{tikzpicture}
5.2.2 Using \tkzDefBarycentricPoint with three points
This time𝑀 is simply the centre of gravity of the triangle. For reasons of simplification and homogeneity, there isalso \tkzCentroid.
𝑀
𝐴
𝐵
𝐶
𝐴′
𝐵′
𝐶′
\begin{tikzpicture}[scale=.8]\tkzDefPoint(2,1){A}\tkzDefPoint(5,3){B}\tkzDefPoint(0,6){C}\tkzDefBarycentricPoint(A=1,B=1,C=1)\tkzGetPoint{M}\tkzDefMidPoint(A,B) \tkzGetPoint{C'}\tkzDefMidPoint(A,C) \tkzGetPoint{B'}\tkzDefMidPoint(C,B) \tkzGetPoint{A'}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A',B',C')\tkzDrawPoints(A,B,C,M)\tkzDrawLines[add=0 and 1](A,M B,M C,M)\tkzLabelPoint(M){$M$}\tkzAutoLabelPoints[center=M](A,B,C)\tkzAutoLabelPoints[center=M,above right](A',B',C')
\end{tikzpicture}
tkz-euclide AlterMundus
5 Special points 30
5.3 Internal Similitude Center
The centres of the two homotheties in which two circles correspond are called external and internal centres ofsimilitude.
𝑂
𝐴
𝐼
𝐽
𝐷
𝐸
𝐹
𝐺
𝐷′ 𝐸′
𝐹′
𝐺′
\begin{tikzpicture}[scale=.75,rotate=-30]\tkzDefPoint(0,0){O}\tkzDefPoint(4,-5){A}\tkzDefIntSimilitudeCenter(O,3)(A,1)\tkzGetPoint{I}\tkzExtSimilitudeCenter(O,3)(A,1)\tkzGetPoint{J}\tkzDefTangent[from with R= I](O,3 cm)\tkzGetPoints{D}{E}\tkzDefTangent[from with R= I](A,1 cm)\tkzGetPoints{D'}{E'}\tkzDefTangent[from with R= J](O,3 cm)\tkzGetPoints{F}{G}\tkzDefTangent[from with R= J](A,1 cm)\tkzGetPoints{F'}{G'}\tkzDrawCircle[R,fill=red!50,opacity=.3](O,3 cm)\tkzDrawCircle[R,fill=blue!50,opacity=.3](A,1 cm)\tkzDrawSegments[add = .5 and .5,color=red](D,D' E,E')\tkzDrawSegments[add= 0 and 0.25,color=blue](J,F J,G)\tkzDrawPoints(O,A,I,J,D,E,F,G,D',E',F',G')\tkzLabelPoints[font=\scriptsize](O,A,I,J,D,E,F,G,D',E',F',G')
\end{tikzpicture}
tkz-euclide AlterMundus
6 Special points relating to a triangle 31
6 Special points relating to a triangle
6.1 Triangle center: \tkzDefTriangleCenter
This macro allows you to define the center of a triangle.
\tkzDefTriangleCenter[⟨local options⟩](⟨A,B,C⟩)
☞ � Be careful, the arguments are lists of three points. This macro is used in conjunction with \tkzGetPoint to getthe center you are looking for. You can use tkzPointResult if it is not necessary to keep the results.
arguments default definition
(pt1,pt2,pt3) no default three points
options default definition
ortho circum intersection of the altitudes of a trianglecentroid circum centre of gravity. Intersection of the medianscircum circum circle center circumscribedin circum center of the circle inscribed in a triangleex circum center of a circle exinscribed to a triangleeuler circum center of Euler's circlesymmedian circum Lemoine's point or symmedian centre or Grebe's pointspieker circum Spieker Circle Centernagel circum Nagel Centermittenpunkt circum also called the middlespointfeuerbach circum Feuerbach Point
6.1.1 Option ortho or orthic
The intersection𝐻 of the three altitudes of a triangle is called the orthocenter.
𝐻
𝐴
𝐵
𝐶\begin{tikzpicture}
\tkzDefPoint(0,0){A}\tkzDefPoint(5,1){B}\tkzDefPoint(1,4){C}\tkzClipPolygon(A,B,C)\tkzDefTriangleCenter[ortho](B,C,A)\tkzGetPoint{H}
\tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawPoints(A,B,C,H)\tkzDrawLines[add=0 and 1](A,Ha B,Hb C,Hc)\tkzLabelPoint(H){$H$}\tkzAutoLabelPoints[center=H](A,B,C)\tkzMarkRightAngles(A,Ha,B B,Hb,C C,Hc,A)
\end{tikzpicture}
tkz-euclide AlterMundus
6 Special points relating to a triangle 32
6.1.2 Option centroid
\begin{tikzpicture}[scale=.75]\tkzDefPoints{-1/1/A,5/1/B}\tkzDefEquilateral(A,B)\tkzGetPoint{C}\tkzDefTriangleCenter[centroid](A,B,C)
\tkzGetPoint{G}\tkzDrawPolygon[color=brown](A,B,C)\tkzDrawPoints(A,B,C,G)\tkzDrawLines[add = 0 and 2/3](A,G B,G C,G)
\end{tikzpicture}
6.1.3 Option circum
\begin{tikzpicture}\tkzDefPoints{0/1/A,3/2/B,1/4/C}\tkzDefTriangleCenter[circum](A,B,C)\tkzGetPoint{G}\tkzDrawPolygon[color=brown](A,B,C)\tkzDrawCircle(G,A)\tkzDrawPoints(A,B,C,G)\end{tikzpicture}
6.1.4 Option in
In geometry, the incircle or inscribed circle of a triangle is the largest circle contained in the triangle; it touches(is tangent to) the three sides. The center of the incircle is a triangle center called the triangle’s incenter. Thecenter of the incircle, called the incenter, can be found as the intersection of the three internal angle bisectors.The center of an excircle is the intersection of the internal bisector of one angle (at vertex 𝐴, for example) andthe external bisectors of the other two. The center of this excircle is called the excenter relative to the vertex𝐴, or the excenter of 𝐴. Because the internal bisector of an angle is perpendicular to its external bisector, itfollows that the center of the incircle together with the three excircle centers form an orthocentric system.(https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle)
We get the centre of the inscribed circle of the triangle. The result is of course in tkzPointResult. We can retrieveit with \tkzGetPoint.
\begin{tikzpicture}\tkzDefPoints{0/1/A,3/2/B,1/4/C}\tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I}\tkzDefPointBy[projection=onto A--C](I)\tkzGetPoint{Ib}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawPoints(A,B,C,I)\tkzDrawLines[add = 0 and 2/3](A,I B,I C,I)\tkzDrawCircle(I,Ib)
\end{tikzpicture}
6.1.5 Option ex
An excircle or escribed circle of the triangle is a circle lying outside the triangle, tangent to one of its sides andtangent to the extensions of the other two. Every triangle has three distinct excircles, each tangent to one of the
tkz-euclide AlterMundus
6 Special points relating to a triangle 33
triangle’s sides. (https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle)
We get the centre of an inscribed circle of the triangle. The result is of course in tkzPointResult. We can retrieveit with \tkzGetPoint.
𝐽𝑐
\begin{tikzpicture}[scale=.5]\tkzDefPoints{0/1/A,3/2/B,1/4/C}\tkzDefTriangleCenter[ex](B,C,A)\tkzGetPoint{J_c}\tkzDefPointBy[projection=onto A--B](J_c)\tkzGetPoint{Tc}%or% \tkzDefCircle[ex](B,C,A)% \tkzGetFirstPoint{J_c}% \tkzGetSecondPoint{Tc}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawPoints(A,B,C,J_c)\tkzDrawCircle[red](J_c,Tc)\tkzDrawLines[add=1.5 and 0](A,C B,C)\tkzLabelPoints(J_c)
\end{tikzpicture}
6.1.6 Option euler
This macro allows to obtain the center of the circle of the nine points or euler’s circle or Feuerbach’s circle.The nine-point circle, also called Euler’s circle or the Feuerbach circle, is the circle that passes through theperpendicular feet𝐻𝐴,𝐻𝐵, and𝐻𝐶 dropped from the vertices of any reference triangle 𝐴𝐵𝐶 on the sides oppositethem. Euler showed in 1765 that it also passes through the midpoints 𝑀𝐴, 𝑀𝐵, 𝑀𝐶 of the sides of 𝐴𝐵𝐶. ByFeuerbach’s theorem, the nine-point circle also passes through the midpoints 𝐸𝐴, 𝐸𝐵, and 𝐸𝐶 of the segmentsthat join the vertices and the orthocenter𝐻. These points are commonly referred to as the Euler points. (http://mathworld.wolfram.com/Nine-PointCircle.html)
𝐴 𝐵
𝐶
𝑀𝐴𝑀𝐵
𝑀𝐶
𝐻𝐴
𝐻𝐵
𝐻𝐶
𝐸𝐴 𝐸𝐵
𝐸𝐶
𝐻𝑁
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefSpcTriangle[medial,
name=M](A,B,C){_A,_B,_C}\tkzDefTriangleCenter[euler](A,B,C)
\tkzGetPoint{N} % I= N nine points\tkzDefTriangleCenter[ortho](A,B,C)
\tkzGetPoint{H}\tkzDefMidPoint(A,H) \tkzGetPoint{E_A}\tkzDefMidPoint(C,H) \tkzGetPoint{E_C}\tkzDefMidPoint(B,H) \tkzGetPoint{E_B}\tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawCircle(N,E_A)\tkzDrawSegments[blue](A,H_A B,H_B C,H_C)\tkzDrawPoints(A,B,C,N,H)\tkzDrawPoints[red](M_A,M_B,M_C)\tkzDrawPoints[blue]( H_A,H_B,H_C)\tkzDrawPoints[green](E_A,E_B,E_C)\tkzAutoLabelPoints[center=N,font=\scriptsize](A,B,C,%M_A,M_B,M_C,%H_A,H_B,H_C,%E_A,E_B,E_C)
\tkzLabelPoints[font=\scriptsize](H,N)\tkzMarkSegments[mark=s|,size=3pt,
color=blue,line width=1pt](B,E_B E_B,H)\end{tikzpicture}
tkz-euclide AlterMundus
6 Special points relating to a triangle 34
6.1.7 Option symmedian
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(5,0){B}\tkzDefPoint(1,4){C}\tkzDefTriangleCenter[symmedian](A,B,C)\tkzGetPoint{K}\tkzDefTriangleCenter[median](A,B,C)\tkzGetPoint{G}\tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I}\tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c}\tkzDefSpcTriangle[incentral,name=I](A,B,C){a,b,c}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawLines[add = 0 and 2/3,blue](A,K B,K C,K)\tkzDrawSegments[red,dashed](A,Ma B,Mb C,Mc)\tkzDrawSegments[orange,dashed](A,Ia B,Ib C,Ic)\tkzDrawLine[add=2 and 2](G,I)\tkzDrawPoints(A,B,C,K,G,I)
\end{tikzpicture}
6.1.8 Option nagel
Let 𝑇𝑎 be the point at which the excircle with center 𝐽𝑎meets the side 𝐵𝐶 of a triangle 𝐴𝐵𝐶, and define 𝑇𝑏 and𝑇𝑐 similarly. Then the lines 𝐴𝑇𝑎, 𝐵𝑇𝑏, and 𝐶𝑇𝑐 concur in the Nagel point𝑁𝑎. Weisstein, EricW. ”Nagel point.”From MathWorld–AWolframWeb Resource.
𝐽𝑎
𝐽𝑏
𝐽𝑐
𝑇𝑎𝑇𝑏
𝑇𝑐 𝐵
𝐶
𝐴
𝑁𝑎
\begin{tikzpicture}[scale=.5]\tkzDefPoints{0/0/A,6/0/B,4/6/C}\tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc}\tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc}\tkzDrawPoints(Ja,Jb,Jc,Ta,Tb,Tc)\tkzLabelPoints(Ja,Jb,Jc,Ta,Tb,Tc)\tkzDrawPolygon[blue](A,B,C)\tkzDefTriangleCenter[nagel](A,B,C) \tkzGetPoint{Na}\tkzDrawPoints[blue](B,C,A)\tkzDrawPoints[red](Na)\tkzLabelPoints[blue](B,C,A)\tkzLabelPoints[red](Na)\tkzDrawLines[add=0 and 1](A,Ta B,Tb C,Tc)\tkzShowBB\tkzClipBB\tkzDrawLines[add=1 and 1,dashed](A,B B,C C,A)\tkzDrawCircles[ex,gray](A,B,C C,A,B B,C,A)\tkzDrawSegments[dashed](Ja,Ta Jb,Tb Jc,Tc)\tkzMarkRightAngles[fill=gray!20](Ja,Ta,C
Jb,Tb,A Jc,Tc,B)\end{tikzpicture}
tkz-euclide AlterMundus
7 Draw a point 35
6.1.9 Option mittenpunkt
𝑀𝑖
𝑀𝑏𝑀𝑎
𝑀𝑐
𝐽𝑏
𝐽𝑐
𝐽𝑎
𝐽𝑐
\begin{tikzpicture}[scale=.5]\tkzDefPoints{0/0/A,6/0/B,4/6/C}\tkzDefSpcTriangle[centroid](A,B,C){Ma,Mb,Mc}\tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc}\tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc}\tkzDefTriangleCenter[mittenpunkt](A,B,C)\tkzGetPoint{Mi}\tkzDrawPoints(Ma,Mb,Mc,Ja,Jb,Jc)\tkzClipBB\tkzDrawPolygon[blue](A,B,C)\tkzDrawLines[add=0 and 1](Ja,Ma
Jb,Mb Jc,Mc)\tkzDrawLines[add=1 and 1](A,B A,C B,C)\tkzDrawCircles[gray](Ja,Ta Jb,Tb Jc,Tc)\tkzDrawPoints[blue](B,C,A)\tkzDrawPoints[red](Mi)\tkzLabelPoints[red](Mi)\tkzLabelPoints[left](Mb)\tkzLabelPoints(Ma,Mc,Jb,Jc)\tkzLabelPoints[above left](Ja,Jc)\tkzShowBB
\end{tikzpicture}
7 Draw a point
7.0.1 Drawing points \tkzDrawPoint
\tkzDrawPoint[⟨local options⟩](⟨name⟩)
arguments default definition
name of point no default Only one point name is accepted
The argument is required. The disc takes the color of the circle, but lighter. It is possible to change everything.The point is a node and therefore it is invariant if the drawing is modified by scaling.
options default definition
shape circle Possible cross or cross outsize 6 6× \pgflinewidthcolor black the default color can be changed
We can create other forms such as cross
7.0.2 Example of point drawings
Note that scale does not affect the shape of the dots. Which is normal. Most of the time, we are satisfied with asingle point shape that we can define from the beginning, either with a macro or by modifying a configuration file.
tkz-euclide AlterMundus
7 Draw a point 36
\begin{tikzpicture}[scale=.5]\tkzDefPoint(1,3){A}\tkzDefPoint(4,1){B}\tkzDefPoint(0,0){O}\tkzDrawPoint[color=red](A)\tkzDrawPoint[fill=blue!20,draw=blue](B)\tkzDrawPoint[color=green](O)\end{tikzpicture}
It is possible to draw several points at once but this macro is a little slower than the previous one. Moreover, wehave to make do with the same options for all the points.
\tkzDrawPoints[⟨local options⟩](⟨liste⟩)
arguments default definition
points list no default example \tkzDrawPoints(A,B,C)
options default definition
shape circle Possible cross or cross outsize 6 6× \pgflinewidthcolor black the default color can be changed
☞ � Beware of the final ”s”, an oversight leads to cascading errors if you try to draw multiple points. The options arethe same as for the previous macro.
7.0.3 First example
\begin{tikzpicture}\tkzDefPoint(1,3){A}\tkzDefPoint(4,1){B}\tkzDefPoint(0,0){C}\tkzDrawPoints[size=6,color=red,
fill=red!50](A,B,C)\end{tikzpicture}
7.0.4 Second example
𝒞
𝐵
𝐶
𝐴
\begin{tikzpicture}[scale=.5]\tkzDefPoint(2,3){A} \tkzDefPoint(5,-1){B}\tkzDefPoint[label=below:$\mathcal{C}$,
shift={(2,3)}](-30:5.5){E}\begin{scope}[shift=(A)]
\tkzDefPoint(30:5){C}\end{scope}\tkzCalcLength[cm](A,B)\tkzGetLength{rAB}\tkzDrawCircle[R](A,\rAB cm)\tkzDrawSegment(A,B)\tkzDrawPoints(A,B,C)\tkzLabelPoints(B,C)\tkzLabelPoints[above](A)
\end{tikzpicture}
tkz-euclide AlterMundus
8 Point on line or circle 37
8 Point on line or circle
8.1 Point on a line
\tkzDefPointOnLine[⟨local options⟩](⟨A,B⟩)
arguments default definition
pt1,pt2 no default Two points to define a line
options default definition
pos=nb nb is a decimal
8.1.1 Use of option pos
𝐴 𝐵pos=1.2pos=−.2 pos=.5
𝐴 𝐵
\begin{tikzpicture}\tkzDefPoints{0/0/A,4/0/B}\tkzDrawLine[red](A,B)\tkzDefPointOnLine[pos=1.2](A,B)\tkzGetPoint{P}\tkzDefPointOnLine[pos=-0.2](A,B)\tkzGetPoint{R}\tkzDefPointOnLine[pos=0.5](A,B)\tkzGetPoint{S}\tkzDrawPoints(A,B,P)\tkzLabelPoints(A,B)\tkzLabelPoint[above](P){pos=$1.2$}\tkzLabelPoint[above](R){pos=$-.2$}\tkzLabelPoint[above](S){pos=$.5$}\tkzDrawPoints(A,B,P,R,S)\tkzLabelPoints(A,B)\end{tikzpicture}
8.2 Point on a circle
\tkzDefPointOnCircle[⟨local options⟩]
options default definition
angle 0 angle formed with the abscissa axiscenter tkzPointResult circle center requiredradius \tkzLengthResult radius circle
tkz-euclide AlterMundus
8 Point on line or circle 38
𝐺
𝐽
\begin{tikzpicture}\tkzDefPoints{0/0/A,4/0/B,0.8/3/C}\tkzDefPointOnCircle[angle=90,center=B,radius=1 cm]\tkzGetPoint{I}\tkzDefCircle[circum](A,B,C)\tkzGetPoint{G} \tkzGetLength{rG}\tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt]\tkzGetPoint{J}\tkzDrawCircle[R,teal](B,1cm)\tkzDrawPoint[teal](I)\tkzDrawPoints(A,B,C)\tkzDrawCircle(G,J)\tkzDrawPoints(G,J)\tkzDrawPoint[red](J)\tkzLabelPoints(G,J)
\end{tikzpicture}
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 39
9 Definition of points by transformation; \tkzDefPointBy
These transformations are:
– translation;
– homothety;
– orthogonal reflection or symmetry;
– central symmetry;
– orthogonal projection;
– rotation (degrees or radians);
– inversion with respect to a circle.
The choice of transformations is made through the options. There are two macros, one for the transformationof a single point \tkzDefPointBy and the other for the transformation of a list of points \tkzDefPointsBy. Bydefault the image of 𝐴 is 𝐴′. For example, we’ll write:
\tkzDefPointBy[translation= from A to A'](B)
The result is in tkzPointResult
\tkzDefPointBy[⟨local options⟩](⟨pt⟩)
The argument is a simple existing point and its image is stored in tkzPointResult. If you want to keep this pointthen the macro \tkzGetPoint{M} allows you to assign the name M to the point.
arguments definition examples
pt existing point name (𝐴)
options examples
translation = from #1 to #2 [translation=from A to B](E)homothety = center #1 ratio #2 [homothety=center A ratio .5](E)reflection = over #1--#2 [reflection=over A--B](E)symmetry = center #1 [symmetry=center A](E)projection = onto #1--#2 [projection=onto A--B](E)rotation = center #1 angle #2 [rotation=center O angle 30](E)rotation in rad = center #1 angle #2 [rotation in rad=center O angle pi/3](E)inversion = center #1 through #2 [inversion =center O through A](E)
The image is only defined and not drawn.
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 40
9.1 Examples of transformations
9.1.1 Example of translation
9.2 Example of translation
𝐴
𝐵
𝐶
𝐷
\begin{tikzpicture}[>=latex]\tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B}\tkzDefPoint(3,0){C}\tkzDefPointBy[translation= from B to A](C)\tkzGetPoint{D}\tkzDrawPoints[teal](A,B,C,D)\tkzLabelPoints[color=teal](A,B,C,D)\tkzDrawSegments[orange,->](A,B D,C)
\end{tikzpicture}
9.2.1 Example of reflection (orthogonal symmetry)
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 41
\begin{tikzpicture}[scale=1]\tkzDefPoints{1.5/-1.5/C,-4.5/2/D}\tkzDefPoint(-4,-2){O}\tkzDefPoint(-2,-2){A}\foreach \i in {0,1,...,4}{%\pgfmathparse{0+\i * 72}\tkzDefPointBy[rotation=%center O angle \pgfmathresult](A)\tkzGetPoint{A\i}\tkzDefPointBy[reflection = over C--D](A\i)\tkzGetPoint{A\i'}}\tkzDrawPolygon(A0, A2, A4, A1, A3)\tkzDrawPolygon(A0', A2', A4', A1', A3')\tkzDrawLine[add= .5 and .5](C,D)
\end{tikzpicture}
9.2.2 Example of homothety and projection
𝑎
𝑎′
𝑘
𝐴
\begin{tikzpicture}[scale=1.2]\tkzDefPoint(0,1){A} \tkzDefPoint(5,3){B} \tkzDefPoint(3,4){C}\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a}\tkzDrawLine[add=0 and 0,color=magenta!50 ](A,a)\tkzDefPointBy[homothety=center A ratio .5](a) \tkzGetPoint{a'}\tkzDefPointBy[projection = onto A--B](a') \tkzGetPoint{k'}\tkzDefPointBy[projection = onto A--B](a) \tkzGetPoint{k}\tkzDrawLines[add= 0 and .3](A,k A,C)\tkzDrawSegments[blue](a',k' a,k)\tkzDrawPoints(a,a',k,k',A)\tkzDrawCircles(a',k' a,k)\tkzLabelPoints(a,a',k,A)
\end{tikzpicture}
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 42
9.2.3 Example of projection
𝐴 𝐶
𝐹
𝐵
𝐷
𝐸
𝐺
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){A}\tkzDefPoint(0,4){B}\tkzDefTriangle[pythagore](B,A) \tkzGetPoint{C}\tkzDefLine[bisector](B,C,A) \tkzGetPoint{c}\tkzInterLL(C,c)(A,B) \tkzGetPoint{D}\tkzDefPointBy[projection=onto B--C](D) \tkzGetPoint{G}\tkzInterLC(C,D)(D,A) \tkzGetPoints{E}{F}\tkzDrawPolygon[teal](A,B,C)\tkzDrawSegment(C,D)\tkzDrawCircle(D,A)\tkzDrawSegment[orange](D,G)\tkzMarkRightAngle[fill=orange!20](D,G,B)\tkzDrawPoints(A,C,F) \tkzLabelPoints(A,C,F)\tkzDrawPoints(B,D,E,G)\tkzLabelPoints[above right](B,D,E,G)\end{tikzpicture}
9.2.4 Example of symmetry
60∘
𝐴
𝐵
𝑂
𝐴′
𝐵′
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 43
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){O}\tkzDefPoint(2,-1){A}\tkzDefPoint(2,2){B}\tkzDefPointsBy[symmetry=center O](B,A){}\tkzDrawLine(A,A')\tkzDrawLine(B,B')\tkzMarkAngle[mark=s,arc=lll,
size=2 cm,mkcolor=red](A,O,B)\tkzLabelAngle[pos=1,circle,draw,
fill=blue!10](A,O,B){$60^{\circ}$}\tkzDrawPoints(A,B,O,A',B')\tkzLabelPoints(A,B,O,A',B')
\end{tikzpicture}
9.2.5 Example of rotation
\begin{tikzpicture}[scale=0.5]\tkzDefPoint(0,0){A}\tkzDefPoint(5,0){B}\tkzDrawSegment(A,B)\tkzDefPointBy[rotation=center A angle 60](B)\tkzGetPoint{C}\tkzDefPointBy[symmetry=center C](A)\tkzGetPoint{D}\tkzDrawSegment(A,tkzPointResult)\tkzDrawLine(B,D)\tkzDrawArc[orange,delta=10](A,B)(C)\tkzDrawArc[orange,delta=10](B,C)(A)\tkzDrawArc[orange,delta=10](C,D)(D)\tkzMarkRightAngle(D,B,A)
\end{tikzpicture}
9.2.6 Example of rotation in radian
𝐴
𝐵
𝐶
\begin{tikzpicture}\tkzDefPoint["$A$" left](1,5){A}\tkzDefPoint["$B$" right](5,2){B}\tkzDefPointBy[rotation in rad= center A angle pi/3](B)\tkzGetPoint{C}\tkzDrawSegment(A,B)\tkzDrawPoints(A,B,C)\tkzCompass[color=red](A,C)\tkzCompass[color=red](B,C)\tkzLabelPoints(C)
\end{tikzpicture}
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 44
9.2.7 Inversion of points
𝑂 𝐴
𝑧1
𝑧2𝑍1
𝑍2
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){O}\tkzDefPoint(1,0){A}\tkzDefPoint(-1.5,-1.5){z1}\tkzDefPoint(0.35,0){z2}\tkzDefPointBy[inversion =%
center O through A](z1)\tkzGetPoint{Z1}\tkzDefPointBy[inversion =%
center O through A](z2)\tkzGetPoint{Z2}\tkzDrawCircle(O,A)\tkzDrawPoints[color=black,
fill=red,size=4](Z1,Z2)\tkzDrawSegments(z1,Z1 z2,Z2)\tkzDrawPoints[color=black,
fill=red,size=4](O,z1,z2)\tkzLabelPoints(O,A,z1,z2,Z1,Z2)
\end{tikzpicture}
9.2.8 Point Inversion: Orthogonal Circles
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){O}\tkzDefPoint(1,0){A}\tkzDrawCircle(O,A)\tkzDefPoint(0.5,-0.25){z1}\tkzDefPoint(-0.5,-0.5){z2}\tkzDefPointBy[inversion = %
center O through A](z1)\tkzGetPoint{Z1}\tkzCircumCenter(z1,z2,Z1)\tkzGetPoint{c}\tkzDrawCircle(c,Z1)\tkzDrawPoints[color=black,
fill=red,size=4](O,z1,z2,Z1,O,A)\end{tikzpicture}
9.3 Transformation of multiple points; \tkzDefPointsBy
Variant of the previous macro for defining multiple images. You must give the names of the images as arguments,or indicate that the names of the images are formed from the names of the antecedents, leaving the argumentempty.
\tkzDefPointsBy[translation= from A to A'](B,C){}
The images are 𝐵′ and 𝐶′.
\tkzDefPointsBy[translation= from A to A'](B,C){D,E}
The images are𝐷 and 𝐸.
tkz-euclide AlterMundus
9 Definition of points by transformation; \tkzDefPointBy 45
\tkzDefPointsBy[translation= from A to A'](B)
The image is 𝐵′.
\tkzDefPointsBy[⟨local options⟩](⟨list of points⟩){⟨list of points⟩}
arguments examples
(⟨list of points⟩){⟨list of pts⟩} (A,B){E,F} 𝐸 is the image of 𝐴 and 𝐹 is the image of 𝐵.
If the list of images is empty then the name of the image is the name of the antecedent to which ” ’ ” is added.
options examples
translation = from #1 to #2 [translation=from A to B](E){}homothety = center #1 ratio #2 [homothety=center A ratio .5](E){F}reflection = over #1--#2 [reflection=over A--B](E){F}symmetry = center #1 [symmetry=center A](E){F}projection = onto #1--#2 [projection=onto A--B](E){F}rotation = center #1 angle #2 [rotation=center angle 30](E){F}rotation in rad = center #1 angle #2 for instance angle pi/3
The points are only defined and not drawn.
9.3.1 Example of translation
𝐴 𝐵
𝐴′ 𝐵′
𝐶
𝐶′\begin{tikzpicture}[>=latex]\tkzDefPoint(0,0){A} \tkzDefPoint(3,1){A'}\tkzDefPoint(3,0){B} \tkzDefPoint(1,2){C}\tkzDefPointsBy[translation= from A to A'](B,C){}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawPolygon[color=red](A',B',C')\tkzDrawPoints[color=blue](A,B,C)\tkzDrawPoints[color=red](A',B',C')\tkzLabelPoints(A,B,A',B')\tkzLabelPoints[above](C,C')\tkzDrawSegments[color = gray,->,
style=dashed](A,A' B,B' C,C')\end{tikzpicture}
tkz-euclide AlterMundus
10 Defining points using a vector 46
10 Defining points using a vector
10.1 \tkzDefPointWith
There are several possibilities to create points that meet certain vector conditions. This can be done with\tkzDefPointWith. The general principle is as follows, two points are passed as arguments, i.e. a vector. Thedifferent options allow to obtain a new point forming with the first point (with some exceptions) a collinearvector or a vector orthogonal to the first vector. Then the length is either proportional to that of the first one, orproportional to the unit. Since this point is only used temporarily, it does not have to be named immediately. Theresult is in tkzPointResult. The macro \tkzGetPoint allows you to retrieve the point and name it differently.
There are options to define the distance between the given point and the obtained point. In the general case thisdistance is the distance between the 2 points given as arguments if the option is of the ”normed” type then thedistance between the given point and the obtained point is 1 cm. Then the𝐾 option allows to obtain multiples.
\tkzDefPointWith(⟨pt1,pt2⟩)
It is in fact the definition of a point meeting vectorial conditions.
arguments definition explication
(pt1,pt2) point couple the result is a point in tkzPointResult
In what follows, it is assumed that the point is recovered by \tkzGetPoint{C}
options example explication
orthogonal [orthogonal](A,B) 𝐴𝐶 =𝐴𝐵 and 𝐴𝐶⟂ 𝐴𝐵orthogonal normed [orthogonal normed](A,B) 𝐴𝐶 = 1 and 𝐴𝐶⟂ 𝐴𝐵linear [linear](A,B) 𝐴𝐶 =𝐾×𝐴𝐵linear normed [linear normed](A,B) 𝐴𝐶 =𝐾 and 𝐴𝐶 = 𝑘×𝐴𝐵colinear= at #1 [colinear= at C](A,B) 𝐶𝐷 = 𝐴𝐵colinear normed= at #1 [colinear normed= at C](A,B) 𝐶𝐷 = 𝐴𝐵K [linear](A,B),K=2 𝐴𝐶 = 2×𝐴𝐵
10.1.1 Option colinear at
(𝐴𝐵 = 𝐶𝐷)
𝐴
𝐵
𝐶
𝐷
\begin{tikzpicture}[scale=1.2,vect/.style={->,shorten >=3pt,>=latex'}]\tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B}\tkzDefPoint(0,1){C}\tkzDefPointWith[colinear=at C](A,B)\tkzGetPoint{D}\tkzDrawPoints[color=red](A,B,C,D)\tkzLabelPoints[above right=3pt](A,B,C,D)\tkzDrawSegments[vect](A,B C,D)
\end{tikzpicture}
tkz-euclide AlterMundus
10 Defining points using a vector 47
10.1.2 Option colinear at with 𝐾
𝐴 𝐵
𝐶 𝐺𝐻\begin{tikzpicture}[vect/.style={->,
shorten >=3pt,>=latex'}]\tkzDefPoint(0,0){A}\tkzDefPoint(5,0){B}\tkzDefPoint(1,2){C}\tkzDefPointWith[colinear=at C](A,B)\tkzGetPoint{G}\tkzDefPointWith[colinear=at C,K=0.5](A,B)\tkzGetPoint{H}\tkzLabelPoints(A,B,C,G,H)\tkzDrawPoints(A,B,C,G,H)
\tkzDrawSegments[vect](A,B C,H)\end{tikzpicture}
10.1.3 Option colinear at with 𝐾 = √22
\begin{tikzpicture}[vect/.style={->,shorten >=3pt,>=latex'}]
\tkzDefPoint(1,1){A}\tkzDefPoint(4,2){B}\tkzDefPoint(2,2){CU}\tkzDefPointWith[colinear=at C,K=sqrt(2)/2](A,B)\tkzGetPoint{D}\tkzDrawPoints[color=red](A,B,C,D)\tkzDrawSegments[vect](A,B C,D)
\end{tikzpicture}
10.1.4 Option orthogonal
AB=AC since𝐾 = 1.
𝐵
𝐶
𝐴
\begin{tikzpicture}[scale=1.2,vect/.style={->,shorten >=3pt,>=latex'}]\tkzDefPoint(2,3){A}\tkzDefPoint(4,2){B}\tkzDefPointWith[orthogonal,K=1](A,B)
\tkzGetPoint{C}\tkzDrawPoints[color=red](A,B,C)\tkzLabelPoints[right=3pt](B,C)\tkzLabelPoints[below=3pt](A)\tkzDrawSegments[vect](A,B A,C)\tkzMarkRightAngle(B,A,C)
\end{tikzpicture}
10.1.5 Option orthogonal with 𝐾 =−1
OK=OI since |𝐾| = 1 then OI=OJ=OK.
tkz-euclide AlterMundus
10 Defining points using a vector 48
𝑂
𝐼
𝐽
𝐾
\begin{tikzpicture}[scale=.75]\tkzDefPoint(1,2){O}\tkzDefPoint(2,5){I}\tkzDefPointWith[orthogonal](O,I)\tkzGetPoint{J}\tkzDefPointWith[orthogonal,K=-1](O,I)\tkzGetPoint{K}\tkzDrawSegment(O,I)\tkzDrawSegments[->](O,J O,K)\tkzMarkRightAngles(I,O,J I,O,K)\tkzDrawPoints(O,I,J,K)\tkzLabelPoints(O,I,J,K)
\end{tikzpicture}
10.1.6 Option orthogonal more complicated example
𝐴 𝐵
𝐶
𝐹
𝑀
𝐸
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/A,6/0/B}\tkzDefMidPoint(A,B)\tkzGetPoint{I}\tkzDefPointWith[orthogonal,K=-.75](B,A)\tkzGetPoint{C}\tkzInterLC(B,C)(B,I)\tkzGetPoints{D}{F}\tkzDuplicateSegment(B,F)(A,F)\tkzGetPoint{E}\tkzDrawArc[delta=10](F,E)(B)\tkzInterLC(A,B)(A,E)\tkzGetPoints{N}{M}\tkzDrawArc[delta=10](A,M)(E)\tkzDrawLines(A,B B,C A,F)\tkzCompass(B,F)\tkzDrawPoints(A,B,C,F,M,E)\tkzLabelPoints(A,B,C,F,M,E)
\end{tikzpicture}
10.1.7 Options colinear and orthogonal
\begin{tikzpicture}[scale=1.2,vect/.style={->,shorten >=3pt,>=latex'}]\tkzDefPoint(2,1){A}\tkzDefPoint(6,2){B}\tkzDefPointWith[orthogonal,K=.5](A,B)\tkzGetPoint{C}\tkzDefPointWith[colinear=at C,K=.5](A,B)\tkzGetPoint{D}\tkzMarkRightAngle[fill=gray!20](B,A,C)\tkzDrawSegments[vect](A,B A,C C,D)\tkzDrawPoints(A,...,D)
\end{tikzpicture}
10.1.8 Option orthogonal normed, 𝐾 = 1
𝐴𝐶 = 1.
tkz-euclide AlterMundus
10 Defining points using a vector 49
\begin{tikzpicture}[scale=1.2,vect/.style={->,shorten >=3pt,>=latex'}]\tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B}\tkzDefPointWith[orthogonal normed](A,B)\tkzGetPoint{C}\tkzDrawPoints[color=red](A,B,C)\tkzDrawSegments[vect](A,B A,C)\tkzMarkRightAngle[fill=gray!20](B,A,C)
\end{tikzpicture}
10.1.9 Option orthogonal normed and 𝐾 = 2
𝐾 = 2 therefore 𝐴𝐶 = 2.
𝐴
𝐵
𝐶 \begin{tikzpicture}[scale=1.2,vect/.style={->,shorten >=3pt,>=latex'}]\tkzDefPoint(2,3){A} \tkzDefPoint(5,1){B}\tkzDefPointWith[orthogonal normed,K=2](A,B)\tkzGetPoint{C}\tkzDrawPoints[color=red](A,B,C)\tkzDrawCircle[R](A,2cm)\tkzDrawSegments[vect](A,B A,C)\tkzMarkRightAngle[fill=gray!20](B,A,C)\tkzLabelPoints[above=3pt](A,B,C)
\end{tikzpicture}
10.1.10 Option linear
Here𝐾 = 0.5.
This amounts to applying a homothety or a multiplication of a vector by a real. Here is the middle of [𝐴𝐵].
𝐴
𝐵
𝐶
\begin{tikzpicture}[scale=1.2]\tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B}\tkzDefPointWith[linear,K=0.5](A,B)\tkzGetPoint{C}\tkzDrawPoints[color=red](A,B,C)\tkzDrawSegment(A,B)\tkzLabelPoints[above right=3pt](A,B,C)
\end{tikzpicture}
10.1.11 Option linear normed
In the following example 𝐴𝐶 = 1 and 𝐶 belongs to (𝐴𝐵).
1𝐴
𝐵
𝐶
\begin{tikzpicture}[scale=1.2]\tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B}\tkzDefPointWith[linear normed](A,B)\tkzGetPoint{C}\tkzDrawPoints[color=red](A,B,C)\tkzDrawSegment(A,B)\tkzLabelSegment(A,C){$1$}\tkzLabelPoints[above right=3pt](A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
10 Defining points using a vector 50
10.2 \tkzGetVectxy
Retrieving the coordinates of a vector.
\tkzGetVectxy(⟨𝐴,𝐵⟩){⟨text⟩}
Allows to obtain the coordinates of a vector.
arguments example explication
(point){name of macro} \tkzGetVectxy(A,B){V} \Vx,\Vy: coordinates of 𝐴𝐵
10.2.1 Coordinate transfer with \tkzGetVectxy
𝐴
𝐵
𝑂
𝑉
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(1,1){A}\tkzDefPoint(4,2){B}\tkzGetVectxy(A,B){v}\tkzDefPoint(\vx,\vy){V}\tkzDrawSegment[->,color=red](O,V)\tkzDrawSegment[->,color=blue](A,B)\tkzDrawPoints(A,B,O)\tkzLabelPoints(A,B,O,V)
\end{tikzpicture}
tkz-euclide AlterMundus
11 Random point definition 51
11 Random point definition
At the moment there are four possibilities:
1. point in a rectangle;
2. on a segment;
3. on a straight line;
4. on a circle.
11.1 Obtaining random points
This is the new version that replaces \tkzGetRandPointOn.
\tkzDefRandPointOn[⟨local options⟩]
The result is a point with a random position that can be named with the macro \tkzGetPoint. It is possible touse tkzPointResult if it is not necessary to retain the results.
options default definition
rectangle=pt1 and pt2 [rectangle=A and B]segment= pt1--pt2 [segment=A--B]line=pt1--pt2 [line=A--B]circle =center pt1 radius dim [circle = center A radius 2 cm]circle through=center pt1 through pt2 [circle through= center A through B]disk through=center pt1 through pt2 [disk through=center A through B]
11.2 Random point in a rectangle
𝐴
𝐵
𝐶
𝑎
𝑑
\begin{tikzpicture}\tkzInit[xmax=5,ymax=5]\tkzGrid\tkzDefPoints{0/0/A,2/2/B,5/5/C}\tkzDefRandPointOn[rectangle = A and B]\tkzGetPoint{a}\tkzDefRandPointOn[rectangle = B and C]\tkzGetPoint{d}\tkzDrawLine(a,d)\tkzDrawPoints(A,B,C,a,d)\tkzLabelPoints(A,B,C,a,d)
\end{tikzpicture}
tkz-euclide AlterMundus
11 Random point definition 52
11.3 Random point on a segment
𝐴
𝐵
𝐶
𝐷
𝑎
𝑑\begin{tikzpicture}
\tkzInit[xmax=5,ymax=5] \tkzGrid\tkzDefPoints{0/0/A,2/2/B,3/3/C,5/5/D}\tkzDefRandPointOn[segment = A--B]\tkzGetPoint{a}\tkzDefRandPointOn[segment = C--D]\tkzGetPoint{d}\tkzDrawPoints(A,B,C,D,a,d)\tkzLabelPoints(A,B,C,D,a,d)
\end{tikzpicture}
11.4 Random point on a straight line
𝐴
𝐵
𝐶
𝐷
𝐸
𝐹
\begin{tikzpicture}\tkzInit[xmax=5,ymax=5] \tkzGrid\tkzDefPoints{0/0/A,2/2/B,3/3/C,5/5/D}\tkzDefRandPointOn[line = A--B]\tkzGetPoint{E}\tkzDefRandPointOn[line = C--D]\tkzGetPoint{F}\tkzDrawPoints(A,...,F)\tkzLabelPoints(A,...,F)
\end{tikzpicture}
11.4.1 Example of random points
𝐴
𝐵
𝐶
𝑎 𝑏
𝑐𝑑
𝑒
\begin{tikzpicture}\tkzDefPoints{0/0/A,2/2/B,-1/-1/C}\tkzDefCircle[through=](A,C)\tkzGetLength{rAC}\tkzDrawCircle(A,C)\tkzDrawCircle(A,B)\tkzDefRandPointOn[rectangle=A and B]\tkzGetPoint{a}\tkzDefRandPointOn[segment=A--B]\tkzGetPoint{b}\tkzDefRandPointOn[circle=center A radius \rAC pt]
\tkzGetPoint{d}\tkzDefRandPointOn[circle through= center A through B]
\tkzGetPoint{c}\tkzDefRandPointOn[disk through=center A through B]
\tkzGetPoint{e}\tkzLabelPoints[above right=3pt](A,B,C,a,b,...,e)\tkzDrawPoints[](A,B,C,a,b,...,e)\tkzDrawRectangle(A,B)
\end{tikzpicture}
tkz-euclide AlterMundus
11 Random point definition 53
11.5 Random point on a circle
𝐴
𝐵
𝑎
\begin{tikzpicture}\tkzInit[xmax=5,ymax=5] \tkzGrid\tkzDefPoints{3/2/A,1/1/B}\tkzCalcLength[cm](A,B) \tkzGetLength{rAB}\tkzDrawCircle[R](A,\rAB cm)\tkzDefRandPointOn[circle = center A radius\rAB cm]\tkzGetPoint{a}\tkzDrawSegment(A,a)\tkzDrawPoints(A,B,a)\tkzLabelPoints(A,B,a)
\end{tikzpicture}
11.5.1 Random example and circle of Apollonius
𝐴 𝐵 𝑃𝑀
𝑁𝑀𝐴/𝑀𝐵 = 2𝑁𝐴/𝑁𝐵 = 2
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,3/0/B}\def\coeffK{2}\tkzApolloniusCenter[K=\coeffK](A,B)\tkzGetPoint{P}\tkzDefApolloniusPoint[K=\coeffK](A,B)\tkzGetPoint{M}\tkzDefApolloniusRadius[K=\coeffK](A,B)\tkzDrawCircle[R,color = blue!50!black,
fill=blue!20,opacity=.4](tkzPointResult,\tkzLengthResult pt)
\tkzDefRandPointOn[circle through= center P through M]\tkzGetPoint{N}\tkzDrawPoints(A,B,P,M,N)\tkzLabelPoints(A,B,P,M,N)\tkzDrawSegments[red](N,A N,B)\tkzDrawPoints(A,B)\tkzDrawSegments[red](A,B)\tkzLabelCircle[R,draw,fill=green!10,%
text width=3cm,%text centered](P,\tkzLengthResult pt-20pt)(-
120)%{ $MA/MB=\coeffK$\\$NA/NB=\coeffK$}
\end{tikzpicture}
11.6 Middle of a compass segment
To conclude this section, here is a more complex example. It involves determining the middle of a segment, usingonly a compass.
tkz-euclide AlterMundus
11 Random point definition 54
𝐴
𝐵
𝑀
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){A}\tkzDefRandPointOn[circle= center A radius 4cm]\tkzGetPoint{B}\tkzDrawPoints(A,B)\tkzDefPointBy[rotation= center A angle 180](B)\tkzGetPoint{C}\tkzInterCC[R](A,4 cm)(B,4 cm)\tkzGetPoints{I}{I'}\tkzInterCC[R](A,4 cm)(I,4 cm)\tkzGetPoints{J}{B}\tkzInterCC(B,A)(C,B)\tkzGetPoints{D}{E}\tkzInterCC(D,B)(E,B)\tkzGetPoints{M}{M'}\tikzset{arc/.style={color=brown,style=dashed,delta=10}}\tkzDrawArc[arc](C,D)(E)\tkzDrawArc[arc](B,E)(D)\tkzDrawCircle[color=brown,line width=.2pt](A,B)\tkzDrawArc[arc](D,B)(M)\tkzDrawArc[arc](E,M)(B)\tkzCompasss[color=red,style=solid](B,I I,J J,C)\tkzDrawPoints(B,C,D,E,M)\tkzLabelPoints(A,B,M)
\end{tikzpicture}
tkz-euclide AlterMundus
12 The straight lines 55
12 The straight lines
It is of course essential to draw straight lines, but before this can be done, it is necessary to be able to define certainparticular lines such as mediators, bisectors, parallels or even perpendiculars. The principle is to determine twopoints on the straight line.
12.1 Definition of straight lines
\tkzDefLine[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩)
The argument is a list of two or three points. Depending on the case, the macro defines one or two pointsnecessary to obtain the line sought. Either the macro \tkzGetPoint or the macro \tkzGetPoints must beused.
arguments example explication
(⟨pt1,pt2⟩) (⟨A,B⟩) [mediator](A,B)(⟨pt1,pt2,pt3⟩) (⟨A,B,C⟩) [bisector](B,A,C)
options default definitionmediator two points are definedperpendicular=through… mediator perpendicular to a straight line passing through a pointorthogonal=through… mediator see aboveparallel=through… mediator parallel to a straight line passing through a pointbisector mediator bisector of an angle defined by three pointsbisector out mediator Exterior Angle BisectorK 1 coefficient for the perpendicular linenormed false normalizes the created segment
12.1.1 Example with mediator
\begin{tikzpicture}[rotate=25]\tkzDefPoints{-2/0/A,1/2/B}\tkzDefLine[mediator](A,B) \tkzGetPoints{C}{D}\tkzDefPointWith[linear,K=.75](C,D) \tkzGetPoint{D}\tkzDefMidPoint(A,B) \tkzGetPoint{I}\tkzFillPolygon[color=orange!30](A,C,B,D)\tkzDrawSegments(A,B C,D)\tkzMarkRightAngle(B,I,C)\tkzDrawSegments(D,B D,A)\tkzDrawSegments(C,B C,A)
\end{tikzpicture}
tkz-euclide AlterMundus
12 The straight lines 56
12.1.2 Example with bisector and normed
\begin{tikzpicture}[rotate=25,scale=.75]\tkzDefPoints{0/0/C, 2/-3/A, 4/0/B}\tkzDefLine[bisector,normed](B,A,C) \tkzGetPoint{a}\tkzDrawLines[add= 0 and .5](A,B A,C)\tkzShowLine[bisector,gap=4,size=2,color=red](B,A,C)\tkzDrawLines[blue!50,dashed,add= 0 and 3](A,a)
\end{tikzpicture}
12.1.3 Example with orthogonal and parallel
(𝑑1)
(𝛿)
(𝑑2)
\begin{tikzpicture}\tkzDefPoints{-1.5/-0.25/A,1/-0.75/B,-0.7/1/C}\tkzDrawLine(A,B)\tkzLabelLine[pos=1.25,below left](A,B){$(d_1)$}\tkzDrawPoints(A,B,C)\tkzDefLine[orthogonal=through C](B,A) \tkzGetPoint{c}\tkzDrawLine(C,c)\tkzLabelLine[pos=1.25,left](C,c){$(\delta)$}\tkzInterLL(A,B)(C,c) \tkzGetPoint{I}\tkzMarkRightAngle(C,I,B)\tkzDefLine[parallel=through C](A,B) \tkzGetPoint{c'}\tkzDrawLine(C,c')\tkzLabelLine[pos=1.25,below left](C,c'){$(d_2)$}\tkzMarkRightAngle(I,C,c')
\end{tikzpicture}
12.1.4 An envelope
Based on a figure from O. Reboux with pst-eucl by D Rodriguez.
tkz-euclide AlterMundus
12 The straight lines 57
\begin{tikzpicture}[scale=.75]\tkzInit[xmin=-6,ymin=-4,xmax=6,ymax=6] % necessary\tkzClip\tkzDefPoint(0,0){O}\tkzDefPoint(132:4){A}\tkzDefPoint(5,0){B}\foreach \ang in {5,10,...,360}{%\tkzDefPoint(\ang:5){M}\tkzDefLine[mediator](A,M)\tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)}
\end{tikzpicture}
12.1.5 A parabola
Based on a figure from O. Reboux with pst-eucl by D Rodriguez. It is not necessary to name the two points thatdefine the mediator.
\begin{tikzpicture}[scale=.75]\tkzInit[xmin=-6,ymin=-4,xmax=6,ymax=6]\tkzClip\tkzDefPoint(0,0){O}\tkzDefPoint(132:5){A}\tkzDefPoint(4,0){B}\foreach \ang in {5,10,...,360}{%\tkzDefPoint(\ang:4){M}\tkzDefLine[mediator](A,M)\tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)}
\end{tikzpicture}
12.2 Specific lines: Tangent to a circle
Two constructions are proposed. The first one is the construction of a tangent to a circle at a given point of thiscircle and the second one is the construction of a tangent to a circle passing through a given point outside a disc.
tkz-euclide AlterMundus
12 The straight lines 58
\tkzDefTangent[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,dim⟩)
The parameter in brackets is the center of the circle or the center of the circle and a point on the circle or thecenter and the radius. This macro replaces the old one: \tkzTangent.
arguments example explication
(⟨pt1,pt2 or (⟨pt1,dim⟩)⟩) (⟨A,B⟩) or (⟨A,2cm⟩) [𝐴𝐵] is radius 𝐴 is the center
options default definition
at=pt at tangent to a point on the circlefrom=pt at tangent to a circle passing through a pointfrom with R=pt at idem, but the circle is defined by center = radius
The tangent is not drawn. A second point of the tangent is given by tkzPointResult.
12.2.1 Example of a tangent passing through a point on the circle
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){O}\tkzDefPoint(6,6){E}\tkzDefRandPointOn[circle=center O radius 3cm]\tkzGetPoint{A}\tkzDrawSegment(O,A)\tkzDrawCircle(O,A)\tkzDefTangent[at=A](O)\tkzGetPoint{h}\tkzDrawLine[add = 4 and 3](A,h)\tkzMarkRightAngle[fill=red!30](O,A,h)
\end{tikzpicture}
12.2.2 Example of tangents passing through an external point
\begin{tikzpicture}[scale=.8]\tkzDefPoint(3,3){c}\tkzDefPoint(6,3){a0}\tkzRadius=1 cm\tkzDrawCircle[R](c,\tkzRadius)\foreach \an in {0,10,...,350}{
\tkzDefPointBy[rotation=center c angle \an](a0)\tkzGetPoint{a}\tkzDefTangent[from with R = a](c,\tkzRadius)\tkzGetPoints{e}{f}\tkzDrawLines[color=magenta](a,f a,e)\tkzDrawSegments(c,e c,f)}%
\end{tikzpicture}
tkz-euclide AlterMundus
12 The straight lines 59
12.2.3 Example of Andrew Mertz
\begin{tikzpicture}[scale=.5]\tkzDefPoint(100:8){A}\tkzDefPoint(50:8){B}\tkzDefPoint(0,0){C} \tkzDefPoint(0,4){R}\tkzDrawCircle(C,R)\tkzDefTangent[from = A](C,R) \tkzGetPoints{D}{E}\tkzDefTangent[from = B](C,R) \tkzGetPoints{F}{G}\tkzDrawSector[fill=blue!80!black,opacity=0.5](A,D)(E)\tkzFillSector[color=red!80!black,opacity=0.5](B,F)(G)\tkzInterCC(A,D)(B,F) \tkzGetSecondPoint{I}\tkzDrawPoint[color=black](I)\end{tikzpicture}
http://www.texample.net/tikz/examples/
12.2.4 Drawing a tangent option from with R and at
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){O}\tkzDefRandPointOn[circle=center O radius 4cm]\tkzGetPoint{A}\tkzDefTangent[at=A](O)\tkzGetPoint{h}\tkzDrawSegments(O,A)\tkzDrawCircle(O,A)\tkzDrawLine[add = 1 and 1](A,h)\tkzMarkRightAngle[fill=red!30](O,A,h)\end{tikzpicture}
12.2.5 Drawing a tangent option from
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){B}\tkzDefPoint(0,8){A}\tkzDefSquare(A,B)\tkzGetPoints{C}{D}\tkzDrawSquare(A,B)\tkzClipPolygon(A,B,C,D)\tkzDefPoint(4,8){F}\tkzDefPoint(4,0){E}\tkzDefPoint(4,4){Q}\tkzFillPolygon[color = green](A,B,C,D)\tkzDrawCircle[fill = orange](B,A)\tkzDrawCircle[fill = purple](E,B)\tkzDefTangent[from=B](F,A)\tkzInterLL(F,tkzFirstPointResult)(C,D)\tkzInterLL(A,tkzPointResult)(F,E)\tkzDrawCircle[fill = yellow](tkzPointResult,Q)\tkzDefPointBy[projection= onto B--A](tkzPointResult)\tkzDrawCircle[fill = blue!50!black](tkzPointResult,A)
\end{tikzpicture}
tkz-euclide AlterMundus
13 Drawing, naming the lines 60
13 Drawing, naming the lines
The following macros are simply used to draw, name lines.
13.1 Draw a straight line
To draw a normal straight line, just give a couple of points. You can use the add option to extend the line (Thisoption is due toMarkWibrow, see the code below).
\tikzset{%add/.style args={#1 and #2}{
to path={%($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)%\tikztonodes}}}
In the special case of lines defined in a triangle, the number of arguments is a list of three points (the vertices ofthe triangle). The second point is where the line will come from. The first and last points determine the targetsegment. The old method has therefore been slightly modified. So for \tkzDrawMedian, instead of (𝐴,𝐵)(𝐶) youhave to write (𝐵,𝐶,𝐴)where 𝐶 is the point that will be linked to the middle of the segment [𝐴,𝐵].
\tkzDrawLine[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩)
The arguments are a list of two points or three points.
options default definition
median none [median](A,B,C) median from 𝐵altitude none [altitude](C,A,B) altitude from 𝐴bisector none [bisector](B,C,A) bisector from 𝐶none none draw the straight line (𝐴𝐵)add= nb1 and nb2 .2 and .2 extends the segment
add defines the length of the line passing through the points pt1 and pt2. Both numbers are percentages. Thestyles of TikZ are accessible for plots.
13.1.1 Examples with add
𝐴𝐵
𝐶𝐷
𝐸𝐹
𝐺𝐻
\begin{tikzpicture}\tkzInit[xmin=-2,xmax=3,ymin=-2.25,ymax=2.25]\tkzClip[space=.25]\tkzDefPoint(0,0){A} \tkzDefPoint(2,0.5){B}\tkzDefPoint(0,-1){C}\tkzDefPoint(2,-0.5){D}\tkzDefPoint(0,1){E} \tkzDefPoint(2,1.5){F}\tkzDefPoint(0,-2){G} \tkzDefPoint(2,-1.5){H}\tkzDrawLine(A,B) \tkzDrawLine[add = 0 and .5](C,D)\tkzDrawLine[add = 1 and 0](E,F)\tkzDrawLine[add = 0 and 0](G,H)\tkzDrawPoints(A,B,C,D,E,F,G,H)\tkzLabelPoints(A,B,C,D,E,F,G,H)
\end{tikzpicture}
It is possible to draw several lines, but with the same options.
tkz-euclide AlterMundus
13 Drawing, naming the lines 61
\tkzDrawLines[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩)
Arguments are a list of pairs of points separated by spaces. The styles of TikZ are available for the draws.
13.1.2 Example with \tkzDrawLines
𝐴 𝐵
𝐶 𝐷
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(2,0){B}\tkzDefPoint(1,2){C}\tkzDefPoint(3,2){D}\tkzDrawLines(A,B C,D A,C B,D)\tkzLabelPoints(A,B,C,D)
\end{tikzpicture}
13.1.3 Example with the option add
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){O}\tkzDefPoint(3,1){I}\tkzDefPoint(1,4){J}\tkzDefLine[bisector](I,O,J)\tkzGetPoint{i}
\tkzDefLine[bisector out](I,O,J)\tkzGetPoint{j}
\tkzDrawLines[add = 1 and .5,color=red](O,I O,J)\tkzDrawLines[add = 1 and .5,color=blue](O,i O,j)
\end{tikzpicture}
13.1.4 Medians in a triangle
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C)\tkzSetUpLine[color=blue]\tkzDrawLine[median](B,C,A)\tkzDrawLine[median](C,A,B)\tkzDrawLine[median](A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
13 Drawing, naming the lines 62
13.1.5 Altitudes in a triangle
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C)\tkzSetUpLine[color=magenta]\tkzDrawLine[altitude](B,C,A)\tkzDrawLine[altitude](C,A,B)\tkzDrawLine[altitude](A,B,C)
\end{tikzpicture}
13.1.6 Bisectors in a triangle
You have to give the angles in a straight line.
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C)\tkzSetUpLine[color=purple]\tkzDrawLine[bisector](B,C,A)\tkzDrawLine[bisector](C,A,B)\tkzDrawLine[bisector](A,B,C)
\end{tikzpicture}
13.2 Add labels on a straight line \tkzLabelLine
\tkzLabelLine[⟨local options⟩](⟨pt1,pt2⟩){⟨label⟩}
arguments default definition
label \tkzLabelLine(A,B){$\Delta$}
options default definition
pos .5 pos is an option for TikZ, but essential in this case…
As an option, and in addition to the pos, you can use all styles of TikZ, especially the placement with above,right, …
13.2.1 Example with \tkzLabelLine
An important option is pos, it’s the one that allows you to place the label along the right. The value of pos can begreater than 1 or negative.
tkz-euclide AlterMundus
14 Draw, Mark segments 63
(𝛿)
again (𝛿) \begin{tikzpicture}\tkzDefPoints{0/0/A,3/0/B,1/1/C}\tkzDefLine[perpendicular=through C,K=-1](A,B)\tkzGetPoint{c}\tkzDrawLines(A,B C,c)\tkzLabelLine[pos=1.25,blue,right](C,c){$(\delta)$}\tkzLabelLine[pos=-0.25,red,left](C,c){again $(\delta)$}
\end{tikzpicture}
14 Draw, Mark segments
There is, of course, a macro to simply draw a segment (it would be possible, as for a half line, to create a style with\add).
14.1 Draw a segment \tkzDrawSegment
\tkzDrawSegment[⟨local options⟩](⟨pt1,pt2⟩)
The arguments are a list of two points. The styles of TikZ are available for the drawings.
argument example definition
(pt1,pt2) (A,B) draw the segment [𝐴,𝐵]
options example definition
TikZ options all TikZ options are valid.add 0 and 0 add = 𝑘𝑙 and 𝑘𝑟, …… … allows the segment to be extended to the left and right.dim no default dim = {label,dim,option}, …… … allows you to add dimensions to a figure.
This is of course equivalent to \draw (A)--(B);
14.1.1 Example with point references
𝐴
𝐵\begin{tikzpicture}[scale=1.5]
\tkzDefPoint(0,0){A}\tkzDefPoint(2,1){B}\tkzDrawSegment[color=red,thin](A,B)\tkzDrawPoints(A,B)\tkzLabelPoints(A,B)
\end{tikzpicture}
tkz-euclide AlterMundus
14 Draw, Mark segments 64
14.1.2 Example of extending an segment with option add
𝐴 𝐵
𝐶
𝐸
\begin{tikzpicture}\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefTriangleCenter[euler](A,B,C)\tkzGetPoint{E}\tkzDrawCircle[euler,red](A,B,C)\tkzDrawLines[add=.5 and .5](A,B A,C B,C)\tkzDrawPoints(A,B,C,E)\tkzLabelPoints(A,B,C,E)\end{tikzpicture}
14.1.3 Example of adding dimensions with option dim
2.241.41
3
\begin{tikzpicture}[scale=4]\pgfkeys{/pgf/number format/.cd,fixed,precision=2}% Define the first two points\tkzDefPoint(0,0){A}\tkzDefPoint(3,0){B}\tkzDefPoint(1,1){C}% Draw the triangle and the points\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,B,C)% Label the sides\tkzCalcLength[cm](A,B)\tkzGetLength{ABl}\tkzCalcLength[cm](B,C)\tkzGetLength{BCl}\tkzCalcLength[cm](A,C)\tkzGetLength{ACl}% add dim\tkzDrawSegment[dim={\pgfmathprintnumber\BCl,6pt,transform shape}](C,B)\tkzDrawSegment[dim={\pgfmathprintnumber\ACl,6pt,transform shape}](A,C)\tkzDrawSegment[dim={\pgfmathprintnumber\ABl,-6pt,transform shape}](A,B)
\end{tikzpicture}
tkz-euclide AlterMundus
14 Draw, Mark segments 65
14.2 Drawing segments \tkzDrawSegments
If the options are the same we can plot several segments with the same macro.
\tkzDrawSegments[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩)
The arguments are a two-point couple list. The styles of TikZ are available for the plots.
𝐴 𝐶
𝐵
\begin{tikzpicture}\tkzInit[xmin=-1,xmax=3,ymin=-1,ymax=2]\tkzClip[space=1]\tkzDefPoint(0,0){A}\tkzDefPoint(2,1){B}\tkzDefPoint(3,0){C}\tkzDrawSegments(A,B B,C)\tkzDrawPoints(A,B,C)\tkzLabelPoints(A,C)\tkzLabelPoints[above](B)
\end{tikzpicture}
14.2.1 Place an arrow on segment
\begin{tikzpicture}\tikzset{
arr/.style={postaction=decorate,decoration={markings,mark=at position .5 with {\arrow[thick]{#1}}
}}}\tkzDefPoint(0,0){A}\tkzDefPoint(4,-4){B}\tkzDrawSegments[arr=stealth](A,B)\tkzDrawPoints(A,B)
\end{tikzpicture}
14.3 Mark a segment \tkzMarkSegment
\tkzMarkSegment[⟨local options⟩](⟨pt1,pt2⟩)
The macro allows you to place a mark on a segment.
options default definition
pos .5 position of the markcolor black color of the markmark none choice of the marksize 4pt size of the mark
Possible marks are those provided by TikZ, but other marks have been created based on an idea byYves Combe.
tkz-euclide AlterMundus
14 Draw, Mark segments 66
14.3.1 Several marks
\begin{tikzpicture}\tkzDefPoint(2,1){A}\tkzDefPoint(6,4){B}\tkzDrawSegment(A,B)\tkzMarkSegment[color=brown,size=2pt,pos=0.4, mark=z](A,B)\tkzMarkSegment[color=blue,pos=0.2, mark=oo](A,B)\tkzMarkSegment[pos=0.8,mark=s,color=red](A,B)
\end{tikzpicture}
14.3.2 Use of mark
\begin{tikzpicture}\tkzDefPoint(2,1){A}\tkzDefPoint(6,4){B}\tkzDrawSegment(A,B)\tkzMarkSegment[color=gray,pos=0.2,mark=s|](A,B)\tkzMarkSegment[color=gray,pos=0.4,mark=s||](A,B)\tkzMarkSegment[color=brown,pos=0.6,mark=||](A,B)\tkzMarkSegment[color=red,pos=0.8,mark=|||](A,B)
\end{tikzpicture}
14.4 Marking segments \tkzMarkSegments
\tkzMarkSegments[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩)
Arguments are a list of pairs of points separated by spaces. The styles of TikZ are available for plots.
14.4.1 Marks for an isosceles triangle
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C}\tkzDrawSegments(O,A A,B)\tkzDrawPoints(O,A,B)\tkzDrawLine(O,B)\tkzMarkSegments[mark=||,size=6pt](O,A A,B)
\end{tikzpicture}
tkz-euclide AlterMundus
14 Draw, Mark segments 67
14.5 Another marking
𝐴 𝐶
𝑃
𝑃′
𝐶′
𝐵
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B}\tkzDefPoint(4,0){C}\tkzDefPoint(2.5,1){P}\tkzDrawPolygon(A,B,C)\tkzDefEquilateral(A,P) \tkzGetPoint{P'}\tkzDefPointsBy[rotation=center A angle 60](P,B){P',C'}\tkzDrawPolygon(A,P,P')\tkzDrawPolySeg(P',C',A,P,B)\tkzDrawSegment(C,P)\tkzDrawPoints(A,B,C,C',P,P')\tkzMarkSegments[mark=s|,size=6pt,color=blue](A,P P,P' P',A)\tkzMarkSegments[mark=||,color=orange](B,P P',C')\tkzLabelPoints(A,C) \tkzLabelPoints[below](P)\tkzLabelPoints[above right](P',C',B)
\end{tikzpicture}
\tkzLabelSegment[⟨local options⟩](⟨pt1,pt2⟩){⟨label⟩}
This macro allows you to place a label along a segment or a line. The options are those of TikZ for example pos.
argument example definition
label \tkzLabelSegment(A,B){5} label text(pt1,pt2) (A,B) label along [𝐴𝐵]
options default definition
pos .5 label's position
14.5.1 Multiple labels
𝑎4
\begin{tikzpicture}\tkzInit\tkzDefPoint(0,0){A}\tkzDefPoint(6,0){B}\tkzDrawSegment(A,B)\tkzLabelSegment[above,pos=.8](A,B){$a$}\tkzLabelSegment[below,pos=.2](A,B){$4$}\end{tikzpicture}
tkz-euclide AlterMundus
14 Draw, Mark segments 68
14.5.2 Labels and right-angled triangle
𝐴
𝐵
𝐶
𝑃
𝑐 𝑎
𝑏 \begin{tikzpicture}[rotate=-60]\tikzset{label seg style/.append style = {%
color = red,}}
\tkzDefPoint(0,1){A}\tkzDefPoint(2,4){C}\tkzDefPointWith[orthogonal normed,K=7](C,A)\tkzGetPoint{B}\tkzDrawPolygon[green!60!black](A,B,C)\tkzDrawLine[altitude,dashed,color=magenta](B,C,A)\tkzGetPoint{P}\tkzLabelPoint[left](A){$A$}\tkzLabelPoint[right](B){$B$}\tkzLabelPoint[above](C){$C$}\tkzLabelPoint[below](P){$P$}\tkzLabelSegment[](B,A){$c$}\tkzLabelSegment[swap](B,C){$a$}\tkzLabelSegment[swap](C,A){$b$}\tkzMarkAngles[size=1cm,
color=cyan,mark=|](C,B,A A,C,P)\tkzMarkAngle[size=0.75cm,
color=orange,mark=||](P,C,B)\tkzMarkAngle[size=0.75cm,
color=orange,mark=||](B,A,C)\tkzMarkRightAngles[german](A,C,B B,P,C)\end{tikzpicture}
\tkzLabelSegments[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩)
The arguments are a two-point couple list. The styles of TikZ are available for plotting.
14.5.3 Labels for an isosceles triangle
𝑎 𝑎
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C}\tkzDrawSegments(O,A A,B)\tkzDrawPoints(O,A,B)\tkzDrawLine(O,B)\tkzLabelSegments[color=red,above=4pt](O,A A,B){$a$}
\end{tikzpicture}
tkz-euclide AlterMundus
15 Triangles 69
15 Triangles
15.1 Definition of triangles \tkzDefTriangle
The following macros will allow you to define or construct a triangle from at least two points.
At the moment, it is possible to define the following triangles:
– two angles determines a triangle with two angles;
– equilateral determines an equilateral triangle;
– half determines a right-angled triangle such that the ratio of the measurements of the two adjacent sidesto the right angle is equal to 2;
– pythagore determines a right-angled triangle whose side measurements are proportional to 3, 4 and 5;
– school determines a right-angled triangle whose angles are 30, 60 and 90 degrees;
– golden determines a right-angled triangle such that the ratio of the measurements on the two adjacentsides to the right angle is equal toΦ= 1.618034, I chose ”golden triangle” as the denomination because itcomes from the golden rectangle and I kept the denomination ”gold triangle” or ”Euclid’s triangle” for theisosceles triangle whose angles at the base are 72 degrees;
– euclide or gold for the gold triangle;
– cheops determines a third point such that the triangle is isosceles with side measurements proportional to2,Φ andΦ.
\tkzDefTriangle[⟨local options⟩](⟨A,B⟩)
The points are ordered because the triangle is constructed following the direct direction of the trigonometriccircle. This macro is either used in partnership with \tkzGetPoint or by using tkzPointResult if it is notnecessary to keep the name.
options default definition
two angles= #1 and #2 no defaut triangle knowing two anglesequilateral no defaut equilateral trianglepythagore no defaut proportional to the pythagorean triangle 3-4-5school no defaut angles of 30, 60 and 90 degreesgold no defaut angles of 72, 72 and 36 degrees, 𝐴 is the apexeuclide no defaut same as above but [𝐴𝐵] is the basegolden no defaut B rectangle and 𝐴𝐵/𝐴𝐶 =Φcheops no defaut AC=BC, AC and BC are proportional to 2 and Φ.
\tkzGetPoint allows you to store the point otherwise tkzPointResult allows for immediate use.
15.1.1 Option golden
𝐴 𝐵
𝐶\begin{tikzpicture}[scale=.8]\tkzInit[xmax=5,ymax=3] \tkzClip[space=.5]
\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDefTriangle[golden](A,B)\tkzGetPoint{C}\tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C)\tkzLabelPoints(A,B) \tkzDrawBisector(A,C,B)\tkzLabelPoints[above](C)
\end{tikzpicture}
tkz-euclide AlterMundus
15 Triangles 70
15.1.2 Option equilateral
𝐴 𝐵
𝐶
𝐷
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(4,0){B}\tkzDefTriangle[equilateral](A,B)\tkzGetPoint{C}\tkzDrawPolygon(A,B,C)\tkzDefTriangle[equilateral](B,A)\tkzGetPoint{D}\tkzDrawPolygon(B,A,D)\tkzDrawPoints(A,B,C,D)\tkzLabelPoints(A,B,C,D)
\end{tikzpicture}
15.1.3 Option gold or euclide
𝐴 𝐵
𝐶 \begin{tikzpicture}\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDefTriangle[euclide](A,B)\tkzGetPoint{C}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,B,C)\tkzLabelPoints(A,B)\tkzLabelPoints[above](C)\tkzDrawBisector(A,C,B)
\end{tikzpicture}
tkz-euclide AlterMundus
15 Triangles 71
15.2 Drawing of triangles
\tkzDrawTriangle[⟨local options⟩](⟨A,B⟩)
Macro similar to the previous macro but the sides are drawn.
options default definition
two angles= #1 and #2 equilateral triangle knowing two anglesequilateral equilateral equilateral trianglepythagore equilateral proportional to the pythagorean triangle 3-4-5school equilateral the angles are 30, 60 and 90 degreesgold equilateral the angles are 72, 72 and 36 degrees, 𝐴 is the vertexeuclide equilateral identical to the previous one but [𝐴𝐵] is the basegolden equilateral B rectangle and 𝐴𝐵/𝐴𝐶 =Φcheops equilateral isosceles in C and 𝐴𝐶/𝐴𝐵 = Φ
2
In all its definitions, the dimensions of the triangle depend on the two starting points.
15.2.1 Option pythagore
This triangle has sides whose lengths are proportional to 3, 4 and 5.
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(4,0){B}\tkzDrawTriangle[pythagore,fill=blue!30](A,B)\tkzMarkRightAngles(A,B,tkzPointResult)
\end{tikzpicture}
15.2.2 Option school
The angles are 30, 60 and 90 degrees.
\begin{tikzpicture}\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDrawTriangle[school,fill=red!30](A,B)\tkzMarkRightAngles(tkzPointResult,B,A)
\end{tikzpicture}
15.2.3 Option golden
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,-10){M}\tkzDefPoint(3,-10){N}\tkzDrawTriangle[golden,color=brown](M,N)\end{tikzpicture}
tkz-euclide AlterMundus
16 Specific triangles with \tkzDefSpcTriangle 72
15.2.4 Option gold
\begin{tikzpicture}[scale=1]\tkzDefPoint(5,-5){I}\tkzDefPoint(8,-5){J}\tkzDrawTriangle[gold,color=blue!50](I,J)
\end{tikzpicture}
15.2.5 Option euclide
\begin{tikzpicture}[scale=1]\tkzDefPoint(10,-5){K}\tkzDefPoint(13,-5){L}\tkzDrawTriangle[euclide,color=blue,fill=blue!10](K,L)
\end{tikzpicture}
16 Specific triangles with \tkzDefSpcTriangle
The centers of some triangles have been defined in the ”points” section, here it is a question of determining thethree vertices of specific triangles.
\tkzDefSpcTriangle[⟨local options⟩](⟨A,B,C⟩)
The order of the points is important!
options default definition
in or incentral centroid two-angled triangleex or excentral centroid equilateral triangleextouch centroid proportional to the pythagorean triangle 3-4-5intouch or contact centroid 30, 60 and 90 degree anglescentroid or medial centroid angles of 72, 72 and 36 degrees, 𝐴 is the vertexorthic centroid same as above but [𝐴𝐵] is the basefeuerbach centroid B rectangle and 𝐴𝐵/𝐴𝐶 =Φeuler centroid AC=BC, AC and BC are proportional to 2 and Φ.tangential centroid AC=BC, AC and BC are proportional to 2 and Φ.name no defaut AC=BC, AC and BC are proportional to 2 and Φ.
\tkzGetPoint allows you to store the point otherwise tkzPointResult allows for immediate use.
16.0.1 Option medial or centroid
The geometric centroid of the polygon vertices of a triangle is the point 𝐺 (sometimes also denoted𝑀) which isalso the intersection of the triangle’s three triangle medians. The point is therefore sometimes called the median
tkz-euclide AlterMundus
16 Specific triangles with \tkzDefSpcTriangle 73
point. The centroid is always in the interior of the triangle.Weisstein, EricW. ”Centroid triangle” From MathWorld–AWolframWeb Resource.
In the following example, we obtain the Euler circle which passes through the previously defined points.
𝐴
𝐵
𝐶
𝑀𝐴
𝑀𝐵
𝑀𝐶
𝑀
\begin{tikzpicture}[rotate=90,scale=.75]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefTriangleCenter[centroid](A,B,C)
\tkzGetPoint{M}\tkzDefSpcTriangle[medial,name=M](A,B,C){_A,_B,_C}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawSegments[dashed,red](A,M_A B,M_B C,M_C)\tkzDrawPolygon[color=red](M_A,M_B,M_C)\tkzDrawPoints(A,B,C,M)\tkzDrawPoints[red](M_A,M_B,M_C)
\tkzAutoLabelPoints[center=M,font=\scriptsize]%(A,B,C,M_A,M_B,M_C)\tkzLabelPoints[font=\scriptsize](M)
\end{tikzpicture}
16.0.2 Option in or incentral
The incentral triangle is the triangle whose vertices are determined by the intersections of the reference triangle’sangle bisectors with the respective opposite sides.Weisstein, EricW. ”Incentral triangle” From MathWorld–AWolframWeb Resource.
𝐼𝑎𝐼𝑏
𝐼𝑐𝐴 𝐵
𝐶
𝐼𝑎𝐼𝑏
𝐼𝑐
\begin{tikzpicture}[scale=1]\tkzDefPoints{ 0/0/A,5/0/B,1/3/C}\tkzDefSpcTriangle[in,name=I](A,B,C){_a,_b,_c}\tkzInCenter(A,B,C)\tkzGetPoint{I}\tkzDrawPolygon[red](A,B,C)\tkzDrawPolygon[blue](I_a,I_b,I_c)\tkzDrawPoints(A,B,C,I,I_a,I_b,I_c)\tkzDrawCircle[in](A,B,C)\tkzDrawSegments[dashed](A,I_a B,I_b C,I_c)
\tkzAutoLabelPoints[center=I,blue,font=\scriptsize](I_a,I_b,I_c)
\tkzAutoLabelPoints[center=I,red,font=\scriptsize](A,B,C,I_a,I_b,I_c)
\end{tikzpicture}
16.0.3 Option ex or excentral
The excentral triangle of a triangle 𝐴𝐵𝐶 is the triangle 𝐽𝑎𝐽𝑏𝐽𝑐 with vertices corresponding to the excenters of 𝐴𝐵𝐶.
tkz-euclide AlterMundus
16 Specific triangles with \tkzDefSpcTriangle 74
𝐴 𝐵
𝐶
𝐽𝑏
𝐽𝑐
𝐽𝑎\begin{tikzpicture}[scale=.6]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefSpcTriangle[excentral,name=J](A,B,C){_a,_b,_c}\tkzDefSpcTriangle[extouch,name=T](A,B,C){_a,_b,_c}\tkzDrawPolygon[blue](A,B,C)\tkzDrawPolygon[red](J_a,J_b,J_c)\tkzDrawPoints(A,B,C)\tkzDrawPoints[red](J_a,J_b,J_c)\tkzLabelPoints(A,B,C)\tkzLabelPoints[red](J_b,J_c)\tkzLabelPoints[red,above](J_a)\tkzClipBB \tkzShowBB\tkzDrawCircles[gray](J_a,T_a J_b,T_b J_c,T_c)
\end{tikzpicture}
16.0.4 Option intouch
The contact triangle of a triangle 𝐴𝐵𝐶, also called the intouch triangle, is the triangle formed by the points oftangency of the incircle of 𝐴𝐵𝐶with 𝐴𝐵𝐶.Weisstein, EricW. ”Contact triangle” From MathWorld–AWolframWeb Resource.
We obtain the intersections of the bisectors with the sides.
𝑋𝑎
𝑋𝑏
𝑋𝑐𝐴 𝐵
𝐶 \begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefSpcTriangle[intouch,name=X](A,B,C){_a,_b,_c}\tkzInCenter(A,B,C)\tkzGetPoint{I}\tkzDrawPolygon[red](A,B,C)\tkzDrawPolygon[blue](X_a,X_b,X_c)\tkzDrawPoints[red](A,B,C)\tkzDrawPoints[blue](X_a,X_b,X_c)\tkzDrawCircle[in](A,B,C)\tkzAutoLabelPoints[center=I,blue,font=\scriptsize]%
(X_a,X_b,X_c)\tkzAutoLabelPoints[center=I,red,font=\scriptsize]%
(A,B,C)\end{tikzpicture}
16.0.5 Option extouch
The extouch triangle 𝑇𝑎𝑇𝑏𝑇𝑐 is the triangle formed by the points of tangency of a triangle 𝐴𝐵𝐶with its excircles 𝐽𝑎,𝐽𝑏, and 𝐽𝑐. The points 𝑇𝑎, 𝑇𝑏, and 𝑇𝑐 can also be constructed as the points which bisect the perimeter of 𝐴1𝐴2𝐴3starting at 𝐴, 𝐵, and 𝐶.Weisstein, EricW. ”Extouch triangle” From MathWorld–AWolframWeb Resource.
We obtain the points of contact of the exinscribed circles as well as the triangle formed by the centres of theexinscribed circles.
tkz-euclide AlterMundus
16 Specific triangles with \tkzDefSpcTriangle 75
𝑁𝑎
𝐴 𝐵
𝐶
𝑇𝑎
𝑇𝑏
𝑇𝑐
\begin{tikzpicture}[scale=.7]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefSpcTriangle[excentral,
name=J](A,B,C){_a,_b,_c}\tkzDefSpcTriangle[extouch,
name=T](A,B,C){_a,_b,_c}\tkzDefTriangleCenter[nagel](A,B,C)\tkzGetPoint{N_a}\tkzDefTriangleCenter[centroid](A,B,C)\tkzGetPoint{G}\tkzDrawPoints[blue](J_a,J_b,J_c)\tkzClipBB \tkzShowBB\tkzDrawCircles[gray](J_a,T_a J_b,T_b J_c,T_c)\tkzDrawLines[add=1 and 1](A,B B,C C,A)\tkzDrawSegments[gray](A,T_a B,T_b C,T_c)\tkzDrawSegments[gray](J_a,T_a J_b,T_b J_c,T_c)\tkzDrawPolygon[blue](A,B,C)\tkzDrawPolygon[red](T_a,T_b,T_c)\tkzDrawPoints(A,B,C,N_a)\tkzLabelPoints(N_a)\tkzAutoLabelPoints[center=Na,blue](A,B,C)\tkzAutoLabelPoints[center=G,red,
dist=.4](T_a,T_b,T_c)\tkzMarkRightAngles[fill=gray!15](J_a,T_a,BJ_b,T_b,C J_c,T_c,A)
\end{tikzpicture}
16.0.6 Option feuerbach
The Feuerbach triangle is the triangle formed by the three points of tangency of the nine-point circle with theexcircles.Weisstein, EricW. ”Feuerbach triangle” From MathWorld–AWolframWeb Resource.
The points of tangency define the Feuerbach triangle.
𝐴 𝐵
𝐶
𝐹𝑎𝐹𝑏
𝐹𝑐
𝐽𝑎
𝐽𝑏
𝐽𝑐
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){A}\tkzDefPoint(3,0){B}\tkzDefPoint(0.5,2.5){C}\tkzDefCircle[euler](A,B,C) \tkzGetPoint{N}\tkzDefSpcTriangle[feuerbach,
name=F](A,B,C){_a,_b,_c}\tkzDefSpcTriangle[excentral,
name=J](A,B,C){_a,_b,_c}\tkzDefSpcTriangle[extouch,
name=T](A,B,C){_a,_b,_c}\tkzDrawPoints[blue](J_a,J_b,J_c,F_a,F_b,F_c,A,B,C)\tkzClipBB \tkzShowBB\tkzDrawCircle[purple](N,F_a)\tkzDrawPolygon(A,B,C)\tkzDrawPolygon[blue](F_a,F_b,F_c)\tkzDrawCircles[gray](J_a,F_a J_b,F_b J_c,F_c)\tkzAutoLabelPoints[center=N,dist=.3,font=\scriptsize](A,B,C,F_a,F_b,F_c,J_a,J_b,J_c)
\end{tikzpicture}
tkz-euclide AlterMundus
16 Specific triangles with \tkzDefSpcTriangle 76
16.0.7 Option tangential
The tangential triangle is the triangle 𝑇𝑎𝑇𝑏𝑇𝑐 formed by the lines tangent to the circumcircle of a given triangle𝐴𝐵𝐶 at its vertices. It is therefore antipedal triangle of 𝐴𝐵𝐶with respect to the circumcenter 𝑂.Weisstein, EricW. ”Tangential Triangle.” From MathWorld–AWolframWeb Resource.
𝐴
𝐵
𝐶
𝑇𝑎
𝑇𝑏
𝑇𝑐
\begin{tikzpicture}[scale=.5,rotate=80]\tkzDefPoints{0/0/A,6/0/B,1.8/4/C}\tkzDefSpcTriangle[tangential,
name=T](A,B,C){_a,_b,_c}\tkzDrawPolygon[red](A,B,C)\tkzDrawPolygon[blue](T_a,T_b,T_c)\tkzDrawPoints[red](A,B,C)\tkzDrawPoints[blue](T_a,T_b,T_c)\tkzDefCircle[circum](A,B,C)\tkzGetPoint{O}\tkzDrawCircle(O,A)\tkzLabelPoints[red](A,B,C)\tkzLabelPoints[blue](T_a,T_b,T_c)
\end{tikzpicture}
16.0.8 Option euler
TheEuler triangle of a triangle𝐴𝐵𝐶 is the triangle𝐸𝐴𝐸𝐵𝐸𝐶 whose vertices are themidpoints of the segments joiningthe orthocenter𝐻with the respective vertices. The vertices of the triangle are known as the Euler points, and lieon the nine-point circle.
𝐴
𝐵
𝐶
𝑀𝐴
𝑀𝐵
𝑀𝐶
𝐻𝐴
𝐻𝐵
𝐻𝐶
𝐸𝐴
𝐸𝐵
𝐸𝐶 𝐻
𝑁
\begin{tikzpicture}[rotate=90,scale=1.25]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefSpcTriangle[medial,
name=M](A,B,C){_A,_B,_C}\tkzDefTriangleCenter[euler](A,B,C)
\tkzGetPoint{N} % I= N nine points\tkzDefTriangleCenter[ortho](A,B,C)
\tkzGetPoint{H}\tkzDefMidPoint(A,H) \tkzGetPoint{E_A}\tkzDefMidPoint(C,H) \tkzGetPoint{E_C}\tkzDefMidPoint(B,H) \tkzGetPoint{E_B}\tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawCircle(N,E_A)\tkzDrawSegments[blue](A,H_A B,H_B C,H_C)\tkzDrawPoints(A,B,C,N,H)\tkzDrawPoints[red](M_A,M_B,M_C)\tkzDrawPoints[blue]( H_A,H_B,H_C)\tkzDrawPoints[green](E_A,E_B,E_C)\tkzAutoLabelPoints[center=N,font=\scriptsize]%
(A,B,C,M_A,M_B,M_C,H_A,H_B,H_C,E_A,E_B,E_C)\tkzLabelPoints[font=\scriptsize](H,N)\tkzMarkSegments[mark=s|,size=3pt,
color=blue,line width=1pt](B,E_B E_B,H)\tkzDrawPolygon[color=red](M_A,M_B,M_C)
\end{tikzpicture}
tkz-euclide AlterMundus
17 Definition of polygons 77
17 Definition of polygons
17.1 Defining the points of a square
We have seen the definitions of some triangles. Let us look at the definitions of some quadrilaterals and regularpolygons.
\tkzDefSquare(⟨pt1,pt2⟩)
The square is defined in the forward direction. From two points, two more points are obtained such thatthe four taken in order form a square. The square is defined in the forward direction. The results are intkzFirstPointResult and tkzSecondPointResult.We can rename them with \tkzGetPoints.
Arguments example explication
(⟨pt1,pt2⟩) \tkzDefSquare(⟨A,B⟩) The square is defined in the direct direction.
17.1.1 Using \tkzDefSquare with two points
Note the inversion of the first two points and the result.
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){A} \tkzDefPoint(3,0){B}\tkzDefSquare(A,B)\tkzDrawPolygon[color=red](A,B,tkzFirstPointResult,%
tkzSecondPointResult)\tkzDefSquare(B,A)\tkzDrawPolygon[color=blue](B,A,tkzFirstPointResult,%
tkzSecondPointResult)\end{tikzpicture}
Wemayonlyneedonepoint todrawan isosceles right-angled triangle soweuse\tkzGetFirstPointor\tkzGetSecondPoint.
17.1.2 Use of \tkzDefSquare to obtain an isosceles right-angled triangle
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){A}\tkzDefPoint(3,0){B}\tkzDefSquare(A,B) \tkzGetFirstPoint{C}\tkzDrawPolygon[color=blue,fill=blue!30](A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
17 Definition of polygons 78
17.1.3 Pythagorean Theorem and \tkzDefSquare
𝑎
𝑏𝑐
\begin{tikzpicture}[scale=.5]\tkzInit\tkzDefPoint(0,0){C}\tkzDefPoint(4,0){A}\tkzDefPoint(0,3){B}\tkzDefSquare(B,A)\tkzGetPoints{E}{F}\tkzDefSquare(A,C)\tkzGetPoints{G}{H}\tkzDefSquare(C,B)\tkzGetPoints{I}{J}\tkzFillPolygon[fill = red!50 ](A,C,G,H)\tkzFillPolygon[fill = blue!50 ](C,B,I,J)\tkzFillPolygon[fill = purple!50](B,A,E,F)\tkzFillPolygon[fill = orange,opacity=.5](A,B,C)\tkzDrawPolygon[line width = 1pt](A,B,C)\tkzDrawPolygon[line width = 1pt](A,C,G,H)\tkzDrawPolygon[line width = 1pt](C,B,I,J)\tkzDrawPolygon[line width = 1pt](B,A,E,F)\tkzLabelSegment[](A,C){$a$}\tkzLabelSegment[](C,B){$b$}\tkzLabelSegment[swap](A,B){$c$}\end{tikzpicture}
17.2 Definition of parallelogram
17.3 Defining the points of a parallelogram
It is a matter of completing three points in order to obtain a parallelogram.
\tkzDefParallelogram(⟨pt1,pt2,pt3⟩)
From three points, another point is obtained such that the four taken in order form a parallelogram. The result isin tkzPointResult.We can rename it with the name \tkzGetPoint...
arguments default definition
(⟨pt1,pt2,pt3⟩) no default Three points are necessary
17.3.1 Example of a parallelogram definition
𝐴 𝐵
𝐶𝐷 \begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,3/0/B,4/2/C}\tkzDefParallelogram(A,B,C)\tkzGetPoint{D}\tkzDrawPolygon(A,B,C,D)\tkzLabelPoints(A,B)\tkzLabelPoints[above right](C,D)\tkzDrawPoints(A,...,D)
\end{tikzpicture}
17.3.2 Simple example
Explanation of the definition of a parallelogram
tkz-euclide AlterMundus
17 Definition of polygons 79
𝐴 𝐵
𝐶𝐷 \begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,3/0/B,4/2/C}\tkzDefPointWith[colinear= at C](B,A)\tkzGetPoint{D}\tkzDrawPolygon(A,B,C,D)\tkzLabelPoints(A,B)\tkzLabelPoints[above right](C,D)\tkzDrawPoints(A,...,D)
\end{tikzpicture}
17.3.3 Construction of the golden rectangle
𝐴 𝐵
𝐶𝐷
𝐸
𝐹
\begin{tikzpicture}[scale=.5]\tkzInit[xmax=14,ymax=10]\tkzClip[space=1]\tkzDefPoint(0,0){A}\tkzDefPoint(8,0){B}\tkzDefMidPoint(A,B)\tkzGetPoint{I}\tkzDefSquare(A,B)\tkzGetPoints{C}{D}\tkzDrawSquare(A,B)\tkzInterLC(A,B)(I,C)\tkzGetPoints{G}{E}\tkzDrawArc[style=dashed,color=gray](I,E)(D)\tkzDefPointWith[colinear= at C](E,B)\tkzGetPoint{F}\tkzDrawPoints(C,D,E,F)\tkzLabelPoints(A,B,C,D,E,F)\tkzDrawSegments[style=dashed,color=gray]%
(E,F C,F B,E)\end{tikzpicture}
17.4 Drawing a square
\tkzDrawSquare[⟨local options⟩](⟨pt1,pt2⟩)
The macro draws a square but not the vertices. It is possible to color the inside. The order of the points is that ofthe direct direction of the trigonometric circle.
arguments example explication
(⟨pt1,pt2⟩) \tkzDrawSquare(⟨A,B⟩) \tkzGetPoints{C}{D}
options example explication
Options TikZ red,line width=1pt
tkz-euclide AlterMundus
17 Definition of polygons 80
17.4.1 The idea is to inscribe two squares in a semi-circle.
\begin{tikzpicture}[scale=.75]\tkzInit[ymax=8,xmax=8]
\tkzClip[space=.25] \tkzDefPoint(0,0){A}\tkzDefPoint(8,0){B} \tkzDefPoint(4,0){I}\tkzDefSquare(A,B) \tkzGetPoints{C}{D}\tkzInterLC(I,C)(I,B) \tkzGetPoints{E'}{E}\tkzInterLC(I,D)(I,B) \tkzGetPoints{F'}{F}\tkzDefPointsBy[projection=onto A--B](E,F){H,G}\tkzDefPointsBy[symmetry = center H](I){J}\tkzDefSquare(H,J) \tkzGetPoints{K}{L}\tkzDrawSector[fill=yellow](I,B)(A)\tkzFillPolygon[color=red!40](H,E,F,G)\tkzFillPolygon[color=blue!40](H,J,K,L)\tkzDrawPolySeg[color=red](H,E,F,G)\tkzDrawPolySeg[color=red](J,K,L)\tkzDrawPoints(E,G,H,F,J,K,L)
\end{tikzpicture}
17.5 The golden rectangle
\tkzDefGoldRectangle(⟨point,point⟩)
Themacrodetermines a rectanglewhose size ratio is thenumberΦ. Thecreatedpoints are intkzFirstPointResultand tkzSecondPointResult. They can be obtained with the macro \tkzGetPoints. The following macro isused to draw the rectangle.
arguments example explication
(⟨pt1,pt2⟩) (⟨A,B⟩) If C and D are created then 𝐴𝐵/𝐵𝐶 =Φ.
\tkzDrawGoldRectangle[⟨local options⟩](⟨point,point⟩)
arguments example explication
(⟨pt1,pt2⟩) (⟨A,B⟩) Draws the golden rectangle based on the segment [𝐴𝐵]
options example explication
Options TikZ red,line width=1pt
17.5.1 Golden Rectangles
\begin{tikzpicture}[scale=.6]\tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B}\tkzDefGoldRectangle(A,B) \tkzGetPoints{C}{D}\tkzDefGoldRectangle(B,C) \tkzGetPoints{E}{F}\tkzDrawPolygon[color=red,fill=red!20](A,B,C,D)\tkzDrawPolygon[color=blue,fill=blue!20](B,C,E,F)
\end{tikzpicture}
tkz-euclide AlterMundus
17 Definition of polygons 81
17.6 Drawing a polygon
\tkzDrawPolygon[⟨local options⟩](⟨points list⟩)
Just give a list of points and the macro plots the polygon using the TikZ options present. You can replace(𝐴,𝐵,𝐶,𝐷,𝐸) by (𝐴, ...,𝐸) and (𝑃1,𝑃2,𝑃3,𝑃4,𝑃5) by (𝑃1,𝑃...,𝑃5)
arguments example explication
(⟨pt1,pt2,pt3,...⟩) \tkzDrawPolygon[gray,dashed](A,B,C) Drawing a triangle
options default example
Options TikZ ... \tkzDrawPolygon[red,line width=2pt](A,B,C)
17.6.1 \tkzDrawPolygon
\begin{tikzpicture} [rotate=18,scale=1.5]\tkzDefPoint(0,0){A}\tkzDefPoint(2.25,0.2){B}\tkzDefPoint(2.5,2.75){C}\tkzDefPoint(-0.75,2){D}\tkzDrawPolygon[fill=black!50!blue!20!](A,B,C,D)\tkzDrawSegments[style=dashed](A,C B,D)
\end{tikzpicture}
17.7 Drawing a polygonal chain
\tkzDrawPolySeg[⟨local options⟩](⟨points list⟩)
Just give a list of points and the macro plots the polygonal chain using the TikZ options present.
arguments example explication
(⟨pt1,pt2,pt3,...⟩) \tkzDrawPolySeg[gray,dashed](A,B,C) Drawing a triangle
options default example
Options TikZ ... \tkzDrawPolySeg[red,line width=2pt](A,B,C)
tkz-euclide AlterMundus
17 Definition of polygons 82
17.7.1 Polygonal chain
\begin{tikzpicture}\tkzDefPoints{0/0/A,6/0/B,3/4/C,2/2/D}\tkzDrawPolySeg(A,...,D)\tkzDrawPoints(A,...,D)
\end{tikzpicture}
17.7.2 Polygonal chain: index notation
\begin{tikzpicture}\foreach \pt in {1,2,...,8} {%\tkzDefPoint(\pt*20:3){P_\pt}}\tkzDrawPolySeg(P_1,P_...,P_8)\tkzDrawPoints(P_1,P_...,P_8)\end{tikzpicture}
17.8 Clip a polygon
\tkzClipPolygon[⟨local options⟩](⟨points list⟩)
This macro makes it possible to contain the different plots in the designated polygon.
arguments example explication
(⟨pt1,pt2⟩) (⟨A,B⟩)
17.8.1 \tkzClipPolygon
𝐷
𝐸
\begin{tikzpicture}[scale=1.25]\tkzInit[xmin=0,xmax=4,ymin=0,ymax=3]\tkzClip[space=.5]\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C)\tkzDefPoint(0,2){D} \tkzDefPoint(2,0){E}\tkzDrawPoints(D,E) \tkzLabelPoints(D,E)\tkzClipPolygon(A,B,C)\tkzDrawLine[color=red](D,E)
\end{tikzpicture}
tkz-euclide AlterMundus
17 Definition of polygons 83
17.8.2 Example: use of "Clip" for Sangaku in a square
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B}\tkzDefSquare(A,B) \tkzGetPoints{C}{D}\tkzDrawPolygon(B,C,D,A)\tkzClipPolygon(B,C,D,A)\tkzDefPoint(4,8){F}\tkzDefTriangle[equilateral](C,D)\tkzGetPoint{I}\tkzDrawPoint(I)\tkzDefPointBy[projection=onto B--C](I)\tkzGetPoint{J}\tkzInterLL(D,B)(I,J) \tkzGetPoint{K}\tkzDefPointBy[symmetry=center K](B)\tkzGetPoint{M}\tkzDrawCircle(M,I)\tkzCalcLength(M,I) \tkzGetLength{dMI}\tkzFillPolygon[color = orange](A,B,C,D)\tkzFillCircle[R,color = yellow](M,\dMI pt)\tkzFillCircle[R,color = blue!50!black](F,4 cm)%
\end{tikzpicture}
17.9 Color a polygon
\tkzFillPolygon[⟨local options⟩](⟨points list⟩)
You can color by drawing the polygon, but in this case you color the inside of the polygon without drawing it.
arguments example explication
(⟨pt1,pt2,…⟩) (⟨A,B,…⟩)
17.9.1 \tkzFillPolygon
𝑥
𝑦
𝑥
𝑦
𝑥′
𝑦′
��
𝑣
𝛼
\begin{tikzpicture}[scale=0.7]\tkzInit[xmin=-3,xmax=6,ymin=-1,ymax=6]\tkzDrawX[noticks]\tkzDrawY[noticks]\tkzDefPoint(0,0){O} \tkzDefPoint(4,2){A}\tkzDefPoint(-2,6){B}\tkzPointShowCoord[xlabel=$x$,ylabel=$y$](A)\tkzPointShowCoord[xlabel=$x'$,ylabel=$y'$,%
ystyle={right=2pt}](B)\tkzDrawSegments[->](O,A O,B)\tkzLabelSegment[above=3pt](O,A){$\vec{u}$}\tkzLabelSegment[above=3pt](O,B){$\vec{v}$}\tkzMarkAngle[fill= yellow,size=1.8cm,%
opacity=.5](A,O,B)\tkzFillPolygon[red!30,opacity=0.25](A,B,O)\tkzLabelAngle[pos = 1.5](A,O,B){$\alpha$}\end{tikzpicture}
tkz-euclide AlterMundus
17 Definition of polygons 84
17.10 Regular polygon
\tkzDefRegPolygon[⟨local options⟩](⟨pt1,pt2⟩)
From the number of sides, depending on the options, this macro determines a regular polygon according to itscenter or one side.
arguments example explication
(⟨pt1,pt2⟩) (⟨O,A⟩) with option "center", 𝑂 is the center of the polygon.(⟨pt1,pt2⟩) (⟨A,B⟩) with option "side", [𝐴𝐵] is a side.
options default example
name P The vertices are named 𝑃1,𝑃2,…sides 5 number of sides.center center The first point is the center.side center The two points are vertices.Options TikZ ...
17.10.1 Option center
\begin{tikzpicture}\tkzDefPoints{0/0/P0,0/0/Q0,2/0/P1}\tkzDefMidPoint(P0,P1) \tkzGetPoint{Q1}
\tkzDefRegPolygon[center,sides=7](P0,P1)\tkzDefMidPoint(P1,P2) \tkzGetPoint{Q1}
\tkzDefRegPolygon[center,sides=7,name=Q](P0,Q1)\tkzDrawPolygon(P1,P...,P7)\tkzFillPolygon[gray!20](Q0,Q1,P2,Q2)\foreach \j in {1,...,7} {\tkzDrawSegment[black](P0,Q\j)}\end{tikzpicture}
17.10.2 Option side
\begin{tikzpicture}[scale=1]\tkzDefPoints{-4/0/A, -1/0/B}\tkzDefRegPolygon[side,sides=5,name=P](A,B)\tkzDrawPolygon[thick](P1,P...,P5)
\end{tikzpicture}
tkz-euclide AlterMundus
18 The Circles 85
18 The Circles
Among the following macros, one will allow you to draw a circle, which is not a real feat. To do this, you will needto know the center of the circle and either the radius of the circle or a point on the circumference. It seemed to methat the most frequent use was to draw a circle with a given centre passing through a given point. This will bethe default method, otherwise you will have to use the R option. There are a large number of special circles, forexample the circle circumscribed by a triangle.
– I have created a first macro \tkzDefCircle which allows, according to a particular circle, to retrieve itscenter and the measurement of the radius in cm. This recovery is done with the macros \tkzGetPoint and\tkzGetLength;
– then a macro \tkzDrawCircle;
– then a macro that allows you to color in a disc, but without drawing the circle \tkzFillCircle;
– sometimes, it is necessary for adrawing tobecontained inadisk, this is the role assigned to\tkzClipCircle;
– it finally remains to be able to give a label to designate a circle and if several possibilities are offered, we willsee here \tkzLabelCircle.
18.1 Characteristics of a circle: \tkzDefCircle
This macro allows you to retrieve the characteristics (center and radius) of certain circles.
\tkzDefCircle[⟨local options⟩](⟨A,B⟩) or (⟨A,B,C⟩)
☞ � Attention thearguments are lists of twoor threepoints. Thismacro is eitherused inpartnershipwith\tkzGetPointand/or \tkzGetLength to obtain the center and the radius of the circle, or by using tkzPointResult andtkzLengthResult if it is not necessary to keep the results.
arguments example explication
(⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩) (⟨A,B⟩) [𝐴𝐵] is radius 𝐴 is the center
options default definition
through through circle characterized by two points defining a radiusdiameter through circle characterized by two points defining a diametercircum through circle circumscribed of a trianglein through incircle a triangleex through excircle of a triangleeuler or nine through Euler's Circlespieker through Spieker Circleapollonius through circle of Apolloniusorthogonal through circle of given centre orthogonal to another circleorthogonal through through circle orthogonal circle passing through 2 pointsK 1 coefficient used for a circle of Apollonius
In the following examples, I draw the circles with a macro not yet presented, but this is not necessary. In somecases you may only need the center or the radius.
tkz-euclide AlterMundus
18 The Circles 86
18.1.1 Example with a random point and option through
𝐴
𝐵𝐶
The radius measurement is:65.11271pt i.e. 2.28845cm
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,4){A}\tkzDefPoint(2,2){B}\tkzDefMidPoint(A,B) \tkzGetPoint{I}\tkzDefRandPointOn[segment = I--B]\tkzGetPoint{C}
\tkzDefCircle[through](A,C)\tkzGetLength{rACpt}\tkzpttocm(\rACpt){rACcm}\tkzDrawCircle(A,C)\tkzDrawPoints(A,B,C)\tkzLabelPoints(A,B,C)\tkzLabelCircle[draw,fill=orange,
text width=3cm,text centered,font=\scriptsize](A,C)(-90)%
{The radius measurement is:\rACpt pt i.e. \rACcm cm}
\end{tikzpicture}
18.1.2 Example with option diameter
It is simpler here to search directly for the middle of [𝐴𝐵].
𝐴
𝐵
𝑂
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){A}\tkzDefPoint(2,2){B}\tkzDefCircle[diameter](A,B)\tkzGetPoint{O}\tkzDrawCircle[blue,fill=blue!20](O,B)\tkzDrawSegment(A,B)\tkzDrawPoints(A,B,O)\tkzLabelPoints(A,B,O)
\end{tikzpicture}
18.1.3 Circles inscribed and circumscribed for a given triangle
Youcanalsoobtain the center of the inscribedcircle and itsprojectiononone sideof the trianglewith\tkzGetFirstPointIand \tkzGetSecondPointIb.
𝐵𝐶
𝐴
𝐼𝐾
\begin{tikzpicture}[scale=1]\tkzDefPoint(2,2){A}\tkzDefPoint(5,-2){B}\tkzDefPoint(1,-2){C}\tkzDefCircle[in](A,B,C)\tkzGetPoint{I} \tkzGetLength{rIN}\tkzDefCircle[circum](A,B,C)\tkzGetPoint{K} \tkzGetLength{rCI}\tkzDrawPoints(A,B,C,I,K)\tkzDrawCircle[R,blue](I,\rIN pt)\tkzDrawCircle[R,red](K,\rCI pt)\tkzLabelPoints[below](B,C)\tkzLabelPoints[above left](A,I,K)\tkzDrawPolygon(A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
18 The Circles 87
18.1.4 Example with option ex
We want to define an excircle of a triangle relatively to point 𝐶
𝐵𝐴
𝐽𝑐
𝐼
𝐷
𝑋𝑐
𝑌𝑐
𝐶
𝐹
\begin{tikzpicture}[scale=.75]\tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C}\tkzDefCircle[ex](B,C,A)
\tkzGetPoint{J_c} \tkzGetLength{rc}\tkzDefPointBy[projection=onto A--C ](J_c)
\tkzGetPoint{X_c}\tkzDefPointBy[projection=onto A--B ](J_c)\tkzGetPoint{Y_c}\tkzGetPoint{I}\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawCircle[R,color=lightgray](J_c,\rc pt)% possible \tkzDrawCircle[ex](A,B,C)\tkzDrawCircle[in,color=red](A,B,C) \tkzGetPoint{I}
\tkzDefPointBy[projection=onto A--C ](I)\tkzGetPoint{F}
\tkzDefPointBy[projection=onto A--B ](I)\tkzGetPoint{D}
\tkzDrawLines[add=0 and 2.2,dashed](C,A C,B)\tkzDrawSegments[dashed](J_c,X_c I,D I,F J_c,Y_c)\tkzMarkRightAngles(A,F,I B,D,I J_c,X_c,A J_c,Y_c,B)\tkzDrawPoints(B,C,A,I,D,F,X_c,J_c,Y_c)
\tkzLabelPoints(B,A,J_c,I,D,X_c,Y_c)\tkzLabelPoints[above left](C)
\tkzLabelPoints[left](F)\end{tikzpicture}
18.1.5 Euler's circle for a given triangle with option euler
We verify that this circle passes through the middle of each side.
𝐵 𝐶
𝐴
𝐸
\begin{tikzpicture}[scale=.75]\tkzDefPoint(5,3.5){A}\tkzDefPoint(0,0){B} \tkzDefPoint(7,0){C}\tkzDefCircle[euler](A,B,C)\tkzGetPoint{E} \tkzGetLength{rEuler}\tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c}\tkzDrawPoints(A,B,C,E,M_a,M_b,M_c)\tkzDrawCircle[R,blue](E,\rEuler pt)\tkzDrawPolygon(A,B,C)\tkzLabelPoints[below](B,C)\tkzLabelPoints[left](A,E)
\end{tikzpicture}
tkz-euclide AlterMundus
18 The Circles 88
18.1.6 Apollonius circles for a given segment option apollonius
𝐴 𝐵 𝐾1𝐾2
\begin{tikzpicture}[scale=0.75]\tkzDefPoint(0,0){A}\tkzDefPoint(4,0){B}\tkzDefCircle[apollonius,K=2](A,B)\tkzGetPoint{K1}\tkzGetLength{rAp}\tkzDrawCircle[R,color = blue!50!black,
fill=blue!20,opacity=.4](K1,\rAp pt)\tkzDefCircle[apollonius,K=3](A,B)\tkzGetPoint{K2} \tkzGetLength{rAp}\tkzDrawCircle[R,color=red!50!black,fill=red!20,opacity=.4](K2,\rAp pt)\tkzLabelPoints[below](A,B,K1,K2)\tkzDrawPoints(A,B,K1,K2)\tkzDrawLine[add=.2 and 1](A,B)
\end{tikzpicture}
18.1.7 Circles exinscribed to a given triangle option ex
You can also get the center and the projection of it on one side of the triangle.
with \tkzGetFirstPoint{Jb} and \tkzGetSecondPoint{Tb}.
𝐴 𝐵
𝐶𝐼𝐽
𝐾
\begin{tikzpicture}[scale=.6]\tkzDefPoint(0,0){A}\tkzDefPoint(3,0){B}\tkzDefPoint(1,2.5){C}\tkzDefCircle[ex](A,B,C) \tkzGetPoint{I}
\tkzGetLength{rI}\tkzDefCircle[ex](C,A,B) \tkzGetPoint{J}
\tkzGetLength{rJ}\tkzDefCircle[ex](B,C,A) \tkzGetPoint{K}
\tkzGetLength{rK}\tkzDefCircle[in](B,C,A) \tkzGetPoint{O}
\tkzGetLength{rO}\tkzDrawLines[add=1.5 and 1.5](A,B A,C B,C)\tkzDrawPoints(I,J,K)\tkzDrawPolygon(A,B,C)\tkzDrawPolygon[dashed](I,J,K)\tkzDrawCircle[R,blue!50!black](O,\rO)\tkzDrawSegments[dashed](A,K B,J C,I)\tkzDrawPoints(A,B,C)\tkzDrawCircles[R](J,{\rJ} I,{\rI} K,{\rK})\tkzLabelPoints(A,B,C,I,J,K)
\end{tikzpicture}
18.1.8 Spieker circle with option spieker
The incircle of the medial triangle𝑀𝑎𝑀𝑏𝑀𝑐 is the Spieker circle:
tkz-euclide AlterMundus
19 Draw, Label the Circles 89
𝑀𝑎𝑀𝑏
𝑀𝑐
𝑆𝑝
𝐴 𝐵
𝐶 \begin{tikzpicture}[scale=1]\tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C}\tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c}\tkzDefTriangleCenter[spieker](A,B,C)\tkzGetPoint{S_p}\tkzDrawPolygon[blue](A,B,C)\tkzDrawPolygon[red](M_a,M_b,M_c)\tkzDrawPoints[blue](B,C,A)\tkzDrawPoints[red](M_a,M_b,M_c,S_p)\tkzDrawCircle[in,red](M_a,M_b,M_c)\tkzAutoLabelPoints[center=S_p,dist=.3](M_a,M_b,M_c)\tkzLabelPoints[blue,right](S_p)\tkzAutoLabelPoints[center=S_p](A,B,C)
\end{tikzpicture}
18.1.9 Orthogonal circle passing through two given points, option orthogonal through
𝑂 𝐴
𝑧1𝑧2
𝑐
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){O}\tkzDefPoint(1,0){A}\tkzDrawCircle(O,A)\tkzDefPoint(-1.5,-1.5){z1}\tkzDefPoint(1.5,-1.25){z2}\tkzDefCircle[orthogonal through=z1 and z2](O,A)\tkzGetPoint{c}\tkzDrawCircle[thick,color=red](tkzPointResult,z1)\tkzDrawPoints[fill=red,color=black,size=4](O,A,z1,z2,c)\tkzLabelPoints(O,A,z1,z2,c)
\end{tikzpicture}
18.1.10 Orthogonal circle of given center
𝑂 𝐴
𝐵
𝐶
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/O,1/0/A}\tkzDefPoints{1.5/1.25/B,-2/-3/C}\tkzDefCircle[orthogonal from=B](O,A)\tkzGetPoints{z1}{z2}\tkzDefCircle[orthogonal from=C](O,A)\tkzGetPoints{t1}{t2}\tkzDrawCircle(O,A)\tkzDrawCircle[thick,color=red](B,z1)\tkzDrawCircle[thick,color=red](C,t1)\tkzDrawPoints(t1,t2,C)\tkzDrawPoints(z1,z2,O,A,B)\tkzLabelPoints(O,A,B,C)
\end{tikzpicture}
19 Draw, Label the Circles
– I created a first macro \tkzDrawCircle,
tkz-euclide AlterMundus
19 Draw, Label the Circles 90
– then a macro that allows you to color a disc, but without drawing the circle. \tkzFillCircle,
– sometimes, it is necessary for a drawing to be contained in a disc,this is the role assigned to\tkzClipCircle,
– It finally remains to be able to give a label to designate a circle and if several possibilities are offered, we willsee here \tkzLabelCircle.
19.1 Draw a circle
\tkzDrawCircle[⟨local options⟩](⟨A,B⟩)
☞ � Attention you need only two points to define a radius or a diameter. An additional option R is available to give ameasure directly.
arguments example explication
(⟨pt1,pt2⟩) (⟨A,B⟩) two points to define a radius or a diameter
options default definition
through through circle with two points defining a radiusdiameter through circle with two points defining a diameterR through circle characterized by a point and the measurement of a radius
Of course, you have to add all the styles of TikZ for the tracings...
19.1.1 Circles and styles, draw a circle and color the disc
We’ll see that it’s possible to colour in a disc while tracing the circle.
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(3,0){A}
% circle with centre O and passing through A\tkzDrawCircle[color=blue](O,A)
% diameter circle $[OA]$\tkzDrawCircle[diameter,color=red,%
line width=2pt,fill=red!40,%opacity=.5](O,A)
% circle with centre O and radius = exp(1) cm\edef\rayon{\fpeval{0.25*exp(1)}}\tkzDrawCircle[R,color=orange](O,\rayon cm)
\end{tikzpicture}
19.2 Drawing circles
\tkzDrawCircles[⟨local options⟩](⟨A,B C,D⟩)
☞ � Attention, the arguments are lists of two points. The circles that can be drawn are the same as in the previousmacro. An additional option R is available to give a measure directly.
tkz-euclide AlterMundus
19 Draw, Label the Circles 91
arguments example explication
(⟨pt1,pt2 pt3,pt4 ...⟩) (⟨A,B C,D⟩) List of two points
options default definition
through through circle with two points defining a radiusdiameter through circle with two points defining a diameterR through circle characterized by a point and the measurement of a radius
Of course, you have to add all the styles of TikZ for the tracings...
19.2.1 Circles defined by a triangle.
𝐴 𝐵
𝐶
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(2,0){B}\tkzDefPoint(3,2){C}\tkzDrawPolygon(A,B,C)\tkzDrawCircles(A,B B,C C,A)\tkzDrawPoints(A,B,C)\tkzLabelPoints(A,B,C)
\end{tikzpicture}
19.2.2 Concentric circles.
𝐴
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDrawCircles[R](A,1cm A,2cm A,3cm)\tkzDrawPoint(A)\tkzLabelPoints(A)
\end{tikzpicture}
tkz-euclide AlterMundus
19 Draw, Label the Circles 92
19.2.3 Exinscribed circles.
\begin{tikzpicture}[scale=1]\tkzDefPoints{0/0/A,4/0/B,1/2.5/C}\tkzDrawPolygon(A,B,C)\tkzDefCircle[ex](B,C,A)\tkzGetPoint{J_c} \tkzGetSecondPoint{T_c}\tkzGetLength{rJc}\tkzDrawCircle[R](J_c,{\rJc pt})\tkzDrawLines[add=0 and 1](C,A C,B)\tkzDrawSegment(J_c,T_c)\tkzMarkRightAngle(J_c,T_c,B)\tkzDrawPoints(A,B,C,J_c,T_c)\end{tikzpicture}
19.2.4 Cardioid
Based on an idea by O. Reboux made with pst-eucl (Pstricks module) by D. Rodriguez.Its name comes from the Greek kardia (heart), in reference to its shape, and was given to it by Johan Castillon(Wikipedia).
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){O}\tkzDefPoint(2,0){A}\foreach \ang in {5,10,...,360}{%
\tkzDefPoint(\ang:2){M}\tkzDrawCircle(M,A)
}\end{tikzpicture}
19.3 Draw a semicircle
\tkzDrawSemiCircle[⟨local options⟩](⟨A,B⟩)
arguments example explication
(⟨pt1,pt2⟩) (⟨O,A⟩) or(⟨A,B⟩) radius or diameter
tkz-euclide AlterMundus
19 Draw, Label the Circles 93
options default definition
through through circle characterized by two points defining a radiusdiameter through circle characterized by two points defining a diameter
19.3.1 Use of \tkzDrawSemiCircle
\begin{tikzpicture}\tkzDefPoint(0,0){A} \tkzDefPoint(6,0){B}\tkzDefSquare(A,B) \tkzGetPoints{C}{D}\tkzDrawPolygon(B,C,D,A)\tkzDefPoint(3,6){F}\tkzDefTriangle[equilateral](C,D) \tkzGetPoint{I}\tkzDefPointBy[projection=onto B--C](I) \tkzGetPoint{J}\tkzInterLL(D,B)(I,J) \tkzGetPoint{K}\tkzDefPointBy[symmetry=center K](B) \tkzGetPoint{M}\tkzDrawCircle(M,I)\tkzCalcLength(M,I) \tkzGetLength{dMI}\tkzFillPolygon[color = red!50](A,B,C,D)\tkzFillCircle[R,color = yellow](M,\dMI pt)\tkzDrawSemiCircle[fill = blue!50!black](F,D)%
\end{tikzpicture}
19.4 Colouring a disc
This was possible with the previous macro, but disk tracing was mandatory, this is no longer the case.
\tkzFillCircle[⟨local options⟩](⟨A,B⟩)
options default definition
radius radius two points define a radiusR radius a point and the measurement of a radius
You don’t need to put radius because that’s the default option. Of course, you have to add all the styles of TikZfor the plots.
tkz-euclide AlterMundus
19 Draw, Label the Circles 94
19.4.1 Example from a sangaku
\begin{tikzpicture}\tkzInit[xmin=0,xmax = 6,ymin=0,ymax=6]\tkzDefPoint(0,0){B} \tkzDefPoint(6,0){C}%\tkzDefSquare(B,C) \tkzGetPoints{D}{A}\tkzClipPolygon(B,C,D,A)\tkzDefMidPoint(A,D) \tkzGetPoint{F}\tkzDefMidPoint(B,C) \tkzGetPoint{E}\tkzDefMidPoint(B,D) \tkzGetPoint{Q}\tkzDefTangent[from = B](F,A) \tkzGetPoints{G}{H}\tkzInterLL(F,G)(C,D) \tkzGetPoint{J}\tkzInterLL(A,J)(F,E) \tkzGetPoint{K}\tkzDefPointBy[projection=onto B--A](K)
\tkzGetPoint{M}\tkzFillPolygon[color = green](A,B,C,D)\tkzFillCircle[color = orange](B,A)\tkzFillCircle[color = blue!50!black](M,A)\tkzFillCircle[color = purple](E,B)\tkzFillCircle[color = yellow](K,Q)
\end{tikzpicture}
19.5 Clipping a disc
\tkzClipCircle[⟨local options⟩](⟨A,B⟩) or (⟨A,r⟩)
arguments example explication
(⟨A,B⟩) or (⟨A,r⟩) (⟨A,B⟩) or (⟨A,2cm⟩) AB radius or diameter
options default definition
radius radius circle characterized by two points defining a radiusR radius circle characterized by a point and the measurement of a radius
It is not necessary to put radius because that is the default option.
19.5.1 Example
𝑂
𝐴
𝐵
𝐶
\begin{tikzpicture}\tkzInit[xmax=5,ymax=5]\tkzGrid \tkzClip\tkzDefPoint(0,0){A}\tkzDefPoint(2,2){O}\tkzDefPoint(4,4){B}\tkzDefPoint(6,6){C}\tkzDrawPoints(O,A,B,C)\tkzLabelPoints(O,A,B,C)\tkzDrawCircle(O,A)\tkzClipCircle(O,A)\tkzDrawLine(A,C)\tkzDrawCircle[fill=red!20,opacity=.5](C,O)
\end{tikzpicture}
tkz-euclide AlterMundus
19 Draw, Label the Circles 95
19.6 Giving a label to a circle
\tkzLabelCircle[⟨local options⟩](⟨A,B⟩)(⟨angle⟩){⟨label⟩}
options default definition
radius radius circle characterized by two points defining a radiusR radius circle characterized by a point and the measurement of a radius
You don’t need to put radius because that’s the default option. We can use the styles from TikZ. The label iscreated and therefore ”passed” between braces.
19.6.1 Example
𝒞
The circle𝒞
𝑀
𝑃
\begin{tikzpicture}\tkzDefPoint(0,0){O} \tkzDefPoint(2,0){N}\tkzDefPointBy[rotation=center O angle 50](N)
\tkzGetPoint{M}\tkzDefPointBy[rotation=center O angle -20](N)
\tkzGetPoint{P}\tkzDefPointBy[rotation=center O angle 125](N)
\tkzGetPoint{P'}\tkzLabelCircle[above=4pt](O,N)(120){$\mathcal{C}$}\tkzDrawCircle(O,M)\tkzFillCircle[color=blue!20,opacity=.4](O,M)\tkzLabelCircle[R,draw,fill=orange,%
text width=2cm,text centered](O,3 cm)(-60)%{The circle\\ $\mathcal{C}$}
\tkzDrawPoints(M,P)\tkzLabelPoints[right](M,P)\end{tikzpicture}
tkz-euclide AlterMundus
20 Intersections 96
20 Intersections
It is possible to determine the coordinates of the points of intersection between two straight lines, a straight lineand a circle, and two circles.
The associated commands have no optional arguments and the user must determine the existence of the intersec-tion points himself.
20.1 Intersection of two straight lines
\tkzInterLL(⟨𝐴,𝐵⟩)(⟨𝐶,𝐷⟩)
Defines the intersection point tkzPointResult of the two lines (𝐴𝐵) and (𝐶𝐷). The known points are given inpairs (two per line) in brackets, and the resulting point can be retrieved with the macro \tkzDefPoint.
20.1.1 Example of intersection between two straight lines
\begin{tikzpicture}[rotate=-45,scale=.75]\tkzDefPoint(2,1){A}
\tkzDefPoint(6,5){B}\tkzDefPoint(3,6){C}
\tkzDefPoint(5,2){D}\tkzDrawLines(A,B C,D)\tkzInterLL(A,B)(C,D)
\tkzGetPoint{I}\tkzDrawPoints[color=blue](A,B,C,D)\tkzDrawPoint[color=red](I)
\end{tikzpicture}
20.2 Intersection of a straight line and a circle
As before, the line is defined by a couple of points. The circle is also defined by a couple:
– (𝑂,𝐶)which is a pair of points, the first is the centre and the second is any point on the circle.
– (𝑂,𝑟)The 𝑟measure is the radius measure. The unit can be the cm or pt.
\tkzInterLC[⟨options⟩](⟨𝐴,𝐵⟩)(⟨𝑂,𝐶⟩) or (⟨𝑂,𝑟⟩) or (⟨𝑂,𝐶,𝐷⟩)
So the arguments are two couples.
options default definition
N N (O,C) determines the circleR N (O, 1 cm) or (O, 120 pt)with nodes N (O,C,D) CD is a radius
The macro defines the intersection points 𝐼 and 𝐽 of the line (𝐴𝐵) and the center circle 𝑂 with radius 𝑟 if theyexist; otherwise, an error will be reported in the .log file.
tkz-euclide AlterMundus
20 Intersections 97
20.2.1 Simple example of a line-circle intersection
In the following example, the drawing of the circle uses two points and the intersection of the straight line and thecircle uses two pairs of points:
𝑂
𝐴
𝐵
𝐶𝐷
𝐸
\begin{tikzpicture}[scale=.75]\tkzInit[xmax=5,ymax=4]\tkzDefPoint(1,1){O}\tkzDefPoint(0,4){A}\tkzDefPoint(5,0){B}\tkzDefPoint(3,3){C}\tkzInterLC(A,B)(O,C) \tkzGetPoints{D}{E}\tkzDrawCircle(O,C)\tkzDrawPoints[color=blue](O,A,B,C)\tkzDrawPoints[color=red](D,E)\tkzDrawLine(A,B)\tkzLabelPoints[above right](O,A,B,C,D,E)
\end{tikzpicture}
20.2.2 More complex example of a line-circle intersection
Figure from http://gogeometry.com/problem/p190_tangent_circle
𝐴 𝐵𝑂 𝑂′
𝐸𝐷
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){A}\tkzDefPoint(8,0){B}\tkzDefMidPoint(A,B)\tkzGetPoint{O}\tkzDrawCircle(O,B)\tkzDefMidPoint(O,B)\tkzGetPoint{O'}\tkzDrawCircle(O',B)\tkzDefTangent[from=A](O',B)\tkzGetSecondPoint{E}\tkzInterLC(A,E)(O,B)\tkzGetSecondPoint{D}\tkzDefPointBy[projection=onto A--B](D)\tkzGetPoint{F}\tkzMarkRightAngle(D,F,B)\tkzDrawSegments(A,D A,B D,F)\tkzDrawSegments[color=red,line width=1pt,
opacity=.4](A,O F,B)\tkzDrawPoints(A,B,O,O',E,D)\tkzLabelPoints(A,B,O,O',E,D)
\end{tikzpicture}
20.2.3 Circle defined by a center and a measure, and special cases
Let’s look at some special cases like straight lines tangent to the circle.
tkz-euclide AlterMundus
20 Intersections 98
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,8){A} \tkzDefPoint(8,0){B}\tkzDefPoint(8,8){C} \tkzDefPoint(4,4){I}\tkzDefPoint(2,7){E} \tkzDefPoint(6,4){F}\tkzDrawCircle[R](I,4 cm)\tkzInterLC[R](A,C)(I,4 cm) \tkzGetPoints{I1}{I2}\tkzInterLC[R](B,C)(I,4 cm) \tkzGetPoints{J1}{J2}\tkzInterLC[R](A,B)(I,4 cm) \tkzGetPoints{K1}{K2}\tkzDrawPoints[color=red](I1,J1,K1,K2)\tkzDrawLines(A,B B,C A,C)\tkzInterLC[R](E,F)(I,4 cm) \tkzGetPoints{I2}{J2}\tkzDrawPoints[color=blue](E,F)\tkzDrawPoints[color=red](I2,J2)\tkzDrawLine(I2,J2)
\end{tikzpicture}
20.2.4 More complex example
☞ � Be careful with the syntax. First of all, calculations for the points can be done during the passage of the arguments,but the syntax of xfp must be respected. You can see that I use the term pi because xfp canwork with radians. Youcan also work with degrees but in this case, you need to use specific commands like sind or cosd. Furthermore,when calculations require the use of parentheses, they must be inserted in a group... TEX{ …}.
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,1){J}\tkzDefPoint(0,0){O}\tkzDrawArc[R,line width=1pt,color=red](J,2.5 cm)(180,0)\foreach \i in {0,-5,-10,...,-85,-90}{\tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P}\tkzDrawSegment[color=orange](J,P)\tkzInterLC[R](P,J)(O,1 cm)\tkzGetPoints{M}{N}\tkzDrawPoints[red](N)}
\foreach \i in {-90,-95,...,-175,-180}{\tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P}\tkzDrawSegment[color=orange](J,P)\tkzInterLC[R](P,J)(O,1 cm)\tkzGetPoints{M}{N}\tkzDrawPoints[red](M)}
\end{tikzpicture}
20.2.5 Calculation of radius example 1
With pgfmath and \pgfmathsetmacro
The radius measurement may be the result of a calculation that is not done within the intersection macro, butbefore. A length can be calculated in several ways. It is possible of course, to use the module pgfmath andthe macro \pgfmathsetmacro. In some cases, the results obtained are not precise enough, so the followingcalculation 0.0002÷0.0001 gives 1.98with pgfmath while xfp will give 2.
20.2.6 Calculation of radius example 2
With xfp and \fpeval:
tkz-euclide AlterMundus
20 Intersections 99
\begin{tikzpicture}\tkzDefPoint(2,2){A}\tkzDefPoint(5,4){B}\tkzDefPoint(4,4){O}\edef\tkzLen{\fpeval{0.0002/0.0001}}\tkzDrawCircle[R](O,\tkzLen cm)\tkzInterLC[R](A,B)(O, \tkzLen cm)\tkzGetPoints{I}{J}\tkzDrawPoints[color=blue](A,B)\tkzDrawPoints[color=red](I,J)\tkzDrawLine(I,J)
\end{tikzpicture}
20.2.7 Calculation of radius example 3
With TEX and \tkzLength.
This dimension was created with \newdimen. 2 cm has been transformed into points. It is of course possible touse TEX to calculate.
\begin{tikzpicture}\tkzDefPoints{2/2/A,5/4/B,4/4/0}
\tkzLength=2cm\tkzDrawCircle[R](O,\tkzLength)\tkzInterLC[R](A,B)(O,\tkzLength)\tkzGetPoints{I}{J}\tkzDrawPoints[color=blue](A,B)\tkzDrawPoints[color=red](I,J)\tkzDrawLine(I,J)
\end{tikzpicture}
20.2.8 Squares in half a disc
A Sangaku look! It is a question of proving that one can inscribe in a half-disc, two squares, and to determine thelength of their respective sides according to the radius.
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/A,8/0/B,4/0/I}\tkzDefSquare(A,B) \tkzGetPoints{C}{D}\tkzInterLC(I,C)(I,B)\tkzGetPoints{E'}{E}\tkzInterLC(I,D)(I,B)\tkzGetPoints{F'}{F}\tkzDefPointsBy[projection = onto A--B](E,F){H,G}\tkzDefPointsBy[symmetry = center H](I){J}\tkzDefSquare(H,J)\tkzGetPoints{K}{L}\tkzDrawSector[fill=brown!30](I,B)(A)\tkzFillPolygon[color=red!40](H,E,F,G)\tkzFillPolygon[color=blue!40](H,J,K,L)\tkzDrawPolySeg[color=red](H,E,F,G)\tkzDrawPolySeg[color=red](J,K,L)\tkzDrawPoints(E,G,H,F,J,K,L)
\end{tikzpicture}
tkz-euclide AlterMundus
20 Intersections 100
20.2.9 Option "with nodes"
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/A,4/0/B,1/1/D,2/0/E}\tkzDefTriangle[equilateral](A,B)\tkzGetPoint{C}\tkzDrawCircle(C,A)\tkzInterLC[with nodes](D,E)(C,A,B)\tkzGetPoints{F}{G}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,...,G)\tkzDrawLine(F,G)\end{tikzpicture}
20.3 Intersection of two circles
The most frequent case is that of two circles defined by their center and a point, but as before the option R allowsto use the radius measurements.
\tkzInterCC[⟨options⟩](⟨𝑂,𝐴⟩)(⟨𝑂′,𝐴′⟩) or (⟨𝑂,𝑟⟩)(⟨𝑂′, 𝑟′⟩) or (⟨𝑂,𝐴,𝐵⟩) (⟨𝑂′,𝐶,𝐷⟩)
options default definition
N N 𝑂𝐴 and 𝑂′𝐴′ are radii, 𝑂 and 𝑂′ are the centresR N 𝑟 and 𝑟′ are dimensions and measure the radiiwith nodes N in (A,A,C)(C,B,F) AC and BF give the radii.
This macro defines the intersection point(s) 𝐼 and 𝐽 of the two center circles 𝑂 and 𝑂′. If the two circles do nothave a common point then the macro ends with an error that is not handled.It is also possible to use directly \tkzInterCCN and \tkzInterCCR.
20.3.1 Construction of an equilateral triangle
𝐴 𝐵
𝐶 \begin{tikzpicture}[trim left=-1cm,scale=.5]\tkzDefPoint(1,1){A}\tkzDefPoint(5,1){B}\tkzInterCC(A,B)(B,A)\tkzGetPoints{C}{D}\tkzDrawPoint[color=black](C)\tkzDrawCircle[dashed](A,B)\tkzDrawCircle[dashed](B,A)\tkzCompass[color=red](A,C)\tkzCompass[color=red](B,C)\tkzDrawPolygon(A,B,C)\tkzMarkSegments[mark=s|](A,C B,C)\tkzLabelPoints[](A,B)\tkzLabelPoint[above](C){$C$}
\end{tikzpicture}
tkz-euclide AlterMundus
20 Intersections 101
20.3.2 Example a mediator
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){A}\tkzDefPoint(2,2){B}\tkzDrawCircle[color=blue](B,A)\tkzDrawCircle[color=blue](A,B)\tkzInterCC(B,A)(A,B)\tkzGetPoints{M}{N}\tkzDrawLine(A,B)\tkzDrawPoints(M,N)\tkzDrawLine[color=red](M,N)
\end{tikzpicture}
20.3.3 An isosceles triangle.
𝐴
𝐵
𝐶
\begin{tikzpicture}[rotate=120,scale=.75]\tkzDefPoint(1,2){A}\tkzDefPoint(4,0){B}\tkzInterCC[R](A,4cm)(B,4cm)\tkzGetPoints{C}{D}\tkzDrawCircle[R,dashed](A,4 cm)\tkzDrawCircle[R,dashed](B,4 cm)\tkzCompass[color=red](A,C)\tkzCompass[color=red](B,C)\tkzDrawPolygon(A,B,C)\tkzDrawPoints[color=blue](A,B,C)\tkzMarkSegments[mark=s|](A,C B,C)\tkzLabelPoints[](A,B)\tkzLabelPoint[above](C){$C$}
\end{tikzpicture}
20.3.4 Segment trisection
The idea here is to divide a segment with a ruler and a compass into three segments of equal length.
tkz-euclide AlterMundus
20 Intersections 102
𝐴
𝐵
𝐷
𝐸
𝐹
𝐺
𝐼𝐽
\begin{tikzpicture}[scale=.8]\tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B}\tkzInterCC(A,B)(B,A)\tkzGetPoints{C}{D}\tkzInterCC(D,B)(B,A)\tkzGetPoints{A}{E}\tkzInterCC(D,B)(A,B)\tkzGetPoints{F}{B}\tkzInterLC(E,F)(F,A)\tkzGetPoints{D}{G}\tkzInterLL(A,G)(B,E)\tkzGetPoint{O}\tkzInterLL(O,D)(A,B)\tkzGetPoint{J}\tkzInterLL(O,F)(A,B)\tkzGetPoint{I}\tkzDrawCircle(D,A)\tkzDrawCircle(A,B)\tkzDrawCircle(B,A)\tkzDrawCircle(F,A)\tkzDrawSegments[color=red](O,GO,B O,D O,F)
\tkzDrawPoints(A,B,D,E,F,G,I,J)\tkzLabelPoints(A,B,D,E,F,G,I,J)\tkzDrawSegments[blue](A,B B,D A,D%A,F F,G E,G B,E)
\tkzMarkSegments[mark=s|](A,I I,J J,B)\end{tikzpicture}
20.3.5 With the option with nodes
𝑎
𝑏
𝑐
𝑑
𝑒
\begin{tikzpicture}[scale=.5]\tkzDefPoints{0/0/a,0/5/B,5/0/C}\tkzDefPoint(54:5){F}\tkzDrawCircle[color=gray](A,C)\tkzInterCC[with nodes](A,A,C)(C,B,F)\tkzGetPoints{a}{e}\tkzInterCC(A,C)(a,e) \tkzGetFirstPoint{b}\tkzInterCC(A,C)(b,a) \tkzGetFirstPoint{c}\tkzInterCC(A,C)(c,b) \tkzGetFirstPoint{d}\tkzDrawPoints(a,b,c,d,e)\tkzDrawPolygon[color=red](a,b,c,d,e)\foreach \vertex/\num in {a/36,b/108,c/180,
d/252,e/324}{%\tkzDrawPoint(\vertex)\tkzLabelPoint[label=\num:$\vertex$](\vertex){}\tkzDrawSegment[color=gray,style=dashed](A,\vertex)}
\end{tikzpicture}
tkz-euclide AlterMundus
21 The angles 103
21 The angles
21.1 Colour an angle: fill
The simplest operation
\tkzFillAngle[⟨local options⟩](⟨A,O,B⟩)
𝑂 is the vertex of the angle. 𝑂𝐴 and 𝑂𝐵 are the sides. Attention the angle is determined by the order of the points.
options default definition
size 1 cm this option determines the radius of the coloured angular sector.
Of course, you have to add all the styles of TikZ, like the use of fill and shade...
21.1.1 Example with size
\begin{tikzpicture}\tkzInit\tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B}\tkzFillAngle[size=2cm, fill=gray!10](A,O,B)\tkzDrawLines(O,A O,B)\tkzDrawPoints(O,A,B)
\end{tikzpicture}
21.1.2 Changing the order of items
\begin{tikzpicture}\tkzInit\tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B}\tkzFillAngle[size=2cm,fill=gray!10](B,O,A)\tkzDrawLines(O,A O,B)\tkzDrawPoints(O,A,B)
\end{tikzpicture}
tkz-euclide AlterMundus
21 The angles 104
\begin{tikzpicture}\tkzInit\tkzDefPoints{0/0/O,5/0/A,3/4/B}% Don't forget {} to get, () to use\tkzFillAngle[size=4cm,left color=white,
right color=red!50](A,O,B)\tkzDrawLines(O,A O,B)\tkzDrawPoints(O,A,B)
\end{tikzpicture}
\tkzFillAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc.
With common options, there is a macro for multiple angles.
21.1.3 Multiples angles
𝑁
𝑃
𝑄
𝑀
𝐴 𝐷
𝐿𝐵 𝐶
\begin{tikzpicture}[scale=0.75]\tkzDefPoint(0,0){B}\tkzDefPoint(8,0){C}\tkzDefPoint(0,8){A}\tkzDefPoint(8,8){D}\tkzDrawPolygon(B,C,D,A)\tkzDefTriangle[equilateral](B,C)\tkzGetPoint{M}\tkzInterLL(D,M)(A,B) \tkzGetPoint{N}\tkzDefPointBy[rotation=center N angle -60](D)\tkzGetPoint{L}\tkzInterLL(N,L)(M,B) \tkzGetPoint{P}\tkzInterLL(M,C)(D,L) \tkzGetPoint{Q}\tkzDrawSegments(D,N N,L L,D B,M M,C)\tkzDrawPoints(L,N,P,Q,M,A,D)\tkzLabelPoints[left](N,P,Q)\tkzLabelPoints[above](M,A,D)\tkzLabelPoints(L,B,C)\tkzMarkAngles(C,B,M B,M,C M,C,B%
D,L,N L,N,D N,D,L)\tkzFillAngles[fill=red!20,opacity=.2](C,B,M%
B,M,C M,C,B D,L,N L,N,D N,D,L)\end{tikzpicture}
21.2 Mark an angle mark
More delicate operation because there are many options. The symbols used for marking in addition to those ofTikZ are defined in the file tkz-lib-marks.tex and designated by the following characters:
|, ||,|||, z, s, x, o, oo
Their definitions are as follows
tkz-euclide AlterMundus
21 The angles 105
\pgfdeclareplotmark{||}%double bar
{%\pgfpathmoveto{\pgfqpoint{2\pgflinewidth}{\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-\pgfplotmarksize}}\pgfpathmoveto{\pgfqpoint{-2\pgflinewidth}{\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{-2\pgflinewidth}{-\pgfplotmarksize}}\pgfusepathqstroke
}
%triple bar\pgfdeclareplotmark{|||}{%
\pgfpathmoveto{\pgfqpoint{0 pt}{\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{0 pt}{-\pgfplotmarksize}}\pgfpathmoveto{\pgfqpoint{-3\pgflinewidth}{\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{-3\pgflinewidth}{-\pgfplotmarksize}}\pgfpathmoveto{\pgfqpoint{3\pgflinewidth}{\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{3\pgflinewidth}{-\pgfplotmarksize}}\pgfusepathqstroke
}
% An bar slant\pgfdeclareplotmark{s|}{%
\pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}%{-.70710678\pgfplotmarksize}}
\pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}%{.70710678\pgfplotmarksize}}
\pgfusepathqstroke}
% An double bar slant\pgfdeclareplotmark{s||}{%\pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}}\pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}}\pgfusepathqstroke
}
% z\pgfdeclareplotmark{z}{%
\pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{0.75\pgfplotmarksize}{\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{\pgfplotmarksize}}\pgfusepathqstroke
}
tkz-euclide AlterMundus
21 The angles 106
% s\pgfdeclareplotmark{s}{%
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}\pgfpathcurveto
{\pgfpoint{0pt}{0pt}}{\pgfpoint{-\pgfplotmarksize}{\pgfplotmarksize}}{\pgfpoint{\pgfplotmarksize}{\pgfplotmarksize}}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}\pgfpathcurveto
{\pgfpoint{0pt}{0pt}}{\pgfpoint{\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}
\pgfusepathqstroke}
% infinity\pgfdeclareplotmark{oo}{%
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}\pgfpathcurveto
{\pgfpoint{0pt}{0pt}}{\pgfpoint{.5\pgfplotmarksize}{1\pgfplotmarksize}}{\pgfpoint{\pgfplotmarksize}{0pt}}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}\pgfpathcurveto
{\pgfpoint{0pt}{0pt}}{\pgfpoint{-.5\pgfplotmarksize}{1\pgfplotmarksize}}{\pgfpoint{-\pgfplotmarksize}{0pt}}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}\pgfpathcurveto{\pgfpoint{0pt}{0pt}}{\pgfpoint{.5\pgfplotmarksize}{-1\pgfplotmarksize}}{\pgfpoint{\pgfplotmarksize}{0pt}}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}\pgfpathcurveto
{\pgfpoint{0pt}{0pt}}{\pgfpoint{-.5\pgfplotmarksize}{-1\pgfplotmarksize}}{\pgfpoint{-\pgfplotmarksize}{0pt}}
\pgfusepathqstroke}
\tkzMarkAngle[⟨local options⟩](⟨A,O,B⟩)
𝑂 is the vertex. Attention the arguments vary according to the options. Several markings are possible. You cansimply draw an arc or add a mark on this arc. The style of the arc is chosen with the option arc, the radius of thearc is given by mksize, the arc can, of course, be colored.
options default definition
arc l choice of l, ll and lll (single, double or triple).size 1 cm arc radius.mark none choice of mark.mksize 4pt symbol size (mark).mkcolor black symbol color (mark).mkpos 0.5 position of the symbol on the arc.
tkz-euclide AlterMundus
21 The angles 107
21.2.1 Example with mark = x
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/O,5/0/A,3/4/B}\tkzMarkAngle[size = 4cm,mark = x,
arc=ll,mkcolor = red](A,O,B)\tkzDrawLines(O,A O,B)\tkzDrawPoints(O,A,B)
\end{tikzpicture}
21.2.2 Example with mark =||
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/O,5/0/A,3/4/B}\tkzMarkAngle[size = 4cm,mark = ||,
arc=ll,mkcolor = red](A,O,B)\tkzDrawLines(O,A O,B)\tkzDrawPoints(O,A,B)
\end{tikzpicture}
\tkzMarkAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc.
With common options, there is a macro for multiple angles.
21.3 Label at an angle
\tkzLabelAngle[⟨local options⟩](⟨A,O,B⟩)
There is only one option, dist (with or without unit), which can be replaced by the TikZ’s pos option (without unitfor the latter). By default, the value is in centimeters.
options default definition
pos 1 or dist, controls the distance from the top to the label.
It is possible to move the label with all TikZ options : rotate, shift, below, etc.
tkz-euclide AlterMundus
21 The angles 108
21.3.1 Example with pos
𝛼
\begin{tikzpicture}[scale=.75]\tkzDefPoints{0/0/O,5/0/A,3/4/B}\tkzMarkAngle[size = 4cm,mark = ||,
arc=ll,color = red](A,O,B)%\tkzDrawLines(O,A O,B)\tkzDrawPoints(O,A,B)\tkzLabelAngle[pos=2,draw,circle,
fill=blue!10](A,O,B){$\alpha$}\end{tikzpicture}
𝑃
𝑆
𝑇
60∘
30∘30∘
\begin{tikzpicture}[rotate=30]\tkzDefPoint(2,1){S}\tkzDefPoint(7,3){T}\tkzDefPointBy[rotation=center S angle 60](T)\tkzGetPoint{P}\tkzDefLine[bisector,normed](T,S,P)\tkzGetPoint{s}\tkzDrawPoints(S,T,P)\tkzDrawPolygon[color=blue](S,T,P)\tkzDrawLine[dashed,color=blue,add=0 and 3](S,s)\tkzLabelPoint[above right](P){$P$}\tkzLabelPoints(S,T)\tkzMarkAngle[size = 1.8cm,mark = |,arc=ll,
color = blue](T,S,P)\tkzMarkAngle[size = 2.1cm,mark = |,arc=l,
color = blue](T,S,s)\tkzMarkAngle[size = 2.3cm,mark = |,arc=l,
color = blue](s,S,P)\tkzLabelAngle[pos = 1.5](T,S,P){$60^{\circ}$}%\tkzLabelAngles[pos = 2.7](T,S,s s,S,P){$30^{\circ}$}%
\end{tikzpicture}
\tkzLabelAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc.
With common options, there is a macro for multiple angles.
21.4 Marking a right angle
\tkzMarkRightAngle[⟨local options⟩](⟨A,O,B⟩)
The german option allows you to change the style of the drawing. The option size allows to change the size ofthe drawing.
options default definition
german normal german arc with inner point.size 0.2 side size.
tkz-euclide AlterMundus
21 The angles 109
21.4.1 Example of marking a right angle
\begin{tikzpicture}\tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P}\tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H}\tkzDrawLines[add=.5 and .5](P,H)\tkzMarkRightAngle[fill=blue!20,size=.5,draw](A,H,P)\tkzDrawLines[add=.5 and .5](A,B)\tkzMarkRightAngle[fill=red!20,size=.8](B,H,P)\tkzDrawPoints[](A,B,P,H)
\end{tikzpicture}
21.4.2 Example of marking a right angle, german style
\begin{tikzpicture}\tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P}\tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H}\tkzDrawLines[add=.5 and .5](P,H)\tkzMarkRightAngle[german,size=.5,draw](A,H,P)\tkzDrawPoints[](A,B,P,H)\tkzDrawLines[add=.5 and .5,fill=blue!20](A,B)\tkzMarkRightAngle[german,size=.8](P,H,B)
\end{tikzpicture}
21.4.3 Mix of styles
𝐴
𝐵
𝐶
𝐻
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){A}\tkzDefPoint(4,1){B}\tkzDefPoint(2,5){C}\tkzDefPointBy[projection=onto B--A](C)
\tkzGetPoint{H}\tkzDrawLine(A,B)\tkzDrawLine[add = .5 and .2,color=red](C,H)\tkzMarkRightAngle[,size=1,color=red](C,H,A)\tkzMarkRightAngle[german,size=.8,color=blue](B,H,C)\tkzFillAngle[opacity=.2,fill=blue!20,size=.8](B,H,C)\tkzLabelPoints(A,B,C,H)\tkzDrawPoints(A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
22 Angles tools 110
21.4.4 Full example
𝐴
𝐵
𝐶𝑃
𝑐
𝑎
𝑏
\begin{tikzpicture}[rotate=-90]\tkzDefPoint(0,1){A}\tkzDefPoint(2,4){C}\tkzDefPointWith[orthogonal normed,K=7](C,A)\tkzGetPoint{B}\tkzDrawSegment[green!60!black](A,C)\tkzDrawSegment[green!60!black](C,B)\tkzDrawSegment[green!60!black](B,A)\tkzDrawLine[altitude,dashed,color=magenta](B,C,A)\tkzGetPoint{P}\tkzLabelPoint[left](A){$A$}\tkzLabelPoint[right](B){$B$}\tkzLabelPoint[above](C){$C$}\tkzLabelPoint[left](P){$P$}\tkzLabelSegment[auto](B,A){$c$}\tkzLabelSegment[auto,swap](B,C){$a$}\tkzLabelSegment[auto,swap](C,A){$b$}\tkzMarkAngle[size=1cm,color=cyan,mark=|](C,B,A)\tkzMarkAngle[size=1cm,color=cyan,mark=|](A,C,P)\tkzMarkAngle[size=0.75cm,color=orange,mark=||](P,C,B)\tkzMarkAngle[size=0.75cm,color=orange,mark=||](B,A,C)\tkzMarkRightAngle[german](A,C,B)\tkzMarkRightAngle[german](B,P,C)\end{tikzpicture}
21.5 \tkzMarkRightAngles
\tkzMarkRightAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc.
With common options, there is a macro for multiple angles.
22 Angles tools
22.1 Recovering an angle \tkzGetAngle
\tkzGetAngle(⟨name of macro⟩)
Assigns the value in degree of an angle to a macro. This macro retrieves \tkzAngleResult and stores the resultin a new macro.
arguments example explication
name of macro \tkzGetAngle{ang} \ang contains the value of the angle.
22.2 Example of the use of \tkzGetAngle
The point here is that (𝐴𝐵) is the bisector of 𝐶𝐴𝐷, such that the 𝐴𝐷 slope is zero. We recover the slope of (𝐴𝐵) andthen rotate twice.
tkz-euclide AlterMundus
22 Angles tools 111
𝐵
𝐶
𝐷𝐴
\begin{tikzpicture}\tkzInit\tkzDefPoint(1,5){A} \tkzDefPoint(5,2){B}\tkzDrawSegment(A,B)\tkzFindSlopeAngle(A,B)\tkzGetAngle{tkzang}\tkzDefPointBy[rotation= center A angle \tkzang ](B)\tkzGetPoint{C}\tkzDefPointBy[rotation= center A angle -\tkzang ](B)\tkzGetPoint{D}\tkzCompass[length=1,dashed,color=red](A,C)\tkzCompass[delta=10,brown](B,C)\tkzDrawPoints(A,B,C,D)\tkzLabelPoints(B,C,D)\tkzLabelPoints[above left](A)\tkzDrawSegments[style=dashed,color=orange!30](A,C A,D)
\end{tikzpicture}
22.3 Angle formed by three points
\tkzFindAngle(⟨pt1,pt2,pt3⟩)
The result is stored in a macro \tkzAngleResult.
arguments example explication
(pt1,pt2,pt3) \tkzFindAngle(A,B,C) \tkzAngleResult gives the angle ( 𝐵𝐴,𝐵𝐶)
The result is between -180 degrees and +180 degrees. pt2 is the vertex and \tkzGetAngle can retrieve the angle.
tkz-euclide AlterMundus
22 Angles tools 112
22.3.1 Verification of angle measurement
𝐴
𝐵
𝐶
60∘
\begin{tikzpicture}[scale=.75]\tkzDefPoint(-1,1){A}\tkzDefPoint(5,2){B}\tkzDefEquilateral(A,B)\tkzGetPoint{C}\tkzDrawPolygon(A,B,C)\tkzFindAngle(B,A,C)\tkzGetAngle{angleBAC}\edef\angleBAC{\fpeval{round(\angleBAC)}}\tkzDrawPoints(A,B,C)\tkzLabelPoints(A,B)\tkzLabelPoint[right](C){$C$}\tkzLabelAngle(B,A,C){\angleBAC$^\circ$}\tkzMarkAngle[size=1.5cm](B,A,C)
\end{tikzpicture}
22.4 Example of the use of \tkzFindAngle
𝑂 𝐴
𝐵
𝑀
𝐶
𝐷
𝐴𝑂𝐶=𝐴𝑂𝑀= 53.13∘
𝐴𝑂𝐷=𝑀𝐵𝐴= 74.74∘
tkz-euclide AlterMundus
22 Angles tools 113
\begin{tikzpicture}\tkzInit[xmin=-1,ymin=-1,xmax=7,ymax=7]\tkzClip\tkzDefPoint (0,0){O} \tkzDefPoint (6,0){A}\tkzDefPoint (5,5){B} \tkzDefPoint (3,4){M}\tkzFindAngle (A,O,M) \tkzGetAngle{an}\tkzDefPointBy[rotation=center O angle \an](A)\tkzGetPoint{C}\tkzDrawSector[fill = blue!50,opacity=.5](O,A)(C)\tkzFindAngle(M,B,A) \tkzGetAngle{am}\tkzDefPointBy[rotation = center O angle \am](A)\tkzGetPoint{D}\tkzDrawSector[fill = red!50,opacity = .5](O,A)(D)\tkzDrawPoints(O,A,B,M,C,D)\tkzLabelPoints(O,A,B,M,C,D)
\edef\an{\fpeval{round(\an,2)}}\edef\am{\fpeval{round(\am,2)}}\tkzDrawSegments(M,B B,A)\tkzText(4,2){$\widehat{AOC}=\widehat{AOM}=\an^{\circ}$}\tkzText(1,4){$\widehat{AOD}=\widehat{MBA}=\am^{\circ}$}
\end{tikzpicture}
22.4.1 Determination of the three angles of a triangle
𝐴
𝐶𝐵
41.27∘
29.5∘
109.23∘
\begin{tikzpicture}[scale=1.25,rotate=30]\tkzDefPoints{0.5/1.5/A, 3.5/4/B, 6/2.5/C}\tkzDrawPolygon(A,B,C)\tkzDrawPoints(A,B,C)\tkzLabelPoints[below](A,C)\tkzLabelPoints[above](B)\tkzMarkAngle[size=1cm](B,C,A)\tkzFindAngle(B,C,A)\tkzGetAngle{angleBCA}\edef\angleBCA{\fpeval{round(\angleBCA,2)}}\tkzLabelAngle[pos = 1](B,C,A){$\angleBCA^{\circ}$}\tkzMarkAngle[size=1cm](C,A,B)\tkzFindAngle(C,A,B)\tkzGetAngle{angleBAC}\edef\angleBAC{\fpeval{round(\angleBAC,2)}}\tkzLabelAngle[pos = 1.8](C,A,B){%
$\angleBAC^{\circ}$}\tkzMarkAngle[size=1cm](A,B,C)\tkzFindAngle(A,B,C)\tkzGetAngle{angleABC}\edef\angleABC{\fpeval{round(\angleABC,2)}}\tkzLabelAngle[pos = 1](A,B,C){$\angleABC^{\circ}$}\end{tikzpicture}
22.5 Determining a slope
It is a question of determining whether it exists, the slope of a straight line defined by two points. No verificationof the existence is made.
\tkzFindSlope(⟨pt1,pt2⟩){⟨name of macro⟩}
The result is stored in a macro.
arguments example explication
(pt1,pt2)pt3 \tkzFindSlope(A,B){slope} \slope will give the result of 𝑦𝐵−𝑦𝐴𝑥𝐵−𝑥𝐴
tkz-euclide AlterMundus
22 Angles tools 114
☞ � Careful not to have 𝑥𝐵 = 𝑥𝐴.
𝐴
𝐵
𝐶
𝐷
The slope of (AB) is : 1
The slope of (AC) is : 0
The slope of (AD) is : −0.5
\begin{tikzpicture}[scale=1.5]\tkzInit[xmax=4,ymax=5]\tkzGrid[sub]\tkzDefPoint(1,2){A} \tkzDefPoint(3,4){B}\tkzDefPoint(3,2){C} \tkzDefPoint(3,1){D}\tkzDrawSegments(A,B A,C A,D)\tkzDrawPoints[color=red](A,B,C,D)\tkzLabelPoints(A,B,C,D)\tkzFindSlope(A,B){SAB} \tkzFindSlope(A,C){SAC}\tkzFindSlope(A,D){SAD}\pgfkeys{/pgf/number format/.cd,fixed,precision=2}\tkzText[fill=Gold!50,draw=brown](1,4)%{The slope of (AB) is : $\pgfmathprintnumber{\SAB}$}\tkzText[fill=Gold!50,draw=brown](1,3.5)%{The slope of (AC) is : $\pgfmathprintnumber{\SAC}$}\tkzText[fill=Gold!50,draw=brown](1,3)%{The slope of (AD) is : $\pgfmathprintnumber{\SAD}$}
\end{tikzpicture}
22.6 Angle formed by a straight line with the horizontal axis \tkzFindSlopeAngle
Much more interesting than the last one. The result is between -180 degrees and +180 degrees.
\tkzFindSlopeAngle(⟨A,B⟩)
Determines the slope of the straight line (AB). The result is stored in a macro \tkzAngleResult.
arguments example explication
(pt1,pt2) \tkzFindSlopeAngle(A,B)
\tkzGetAngle can retrieve the result. If retrieval is not necessary, you can use \tkzAngleResult.
tkz-euclide AlterMundus
22 Angles tools 115
22.6.1 Folding
𝐵
𝐶
𝐷𝐴 \begin{tikzpicture}
\tkzDefPoint(1,5){A}\tkzDefPoint(5,2){B}\tkzDrawSegment(A,B)\tkzFindSlopeAngle(A,B)\tkzGetAngle{tkzang}\tkzDefPointBy[rotation= center A angle \tkzang ](B)\tkzGetPoint{C}\tkzDefPointBy[rotation= center A angle -\tkzang ](B)\tkzGetPoint{D}\tkzCompass[orange,length=1](A,C)\tkzCompass[orange,delta=10](B,C)\tkzDrawPoints(A,B,C,D)\tkzLabelPoints(B,C,D)\tkzLabelPoints[above left](A)\tkzDrawSegments[style=dashed,color=orange](A,C A,D)
\end{tikzpicture}
22.6.2 Example of the use of \tkzFindSlopeAngle
Here is another version of the construction of a mediator
𝐴
𝐵
𝐼
𝐽
\begin{tikzpicture}\tkzInit\tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B}\tkzDefLine[mediator](A,B)\tkzGetPoints{I}{J}\tkzCalcLength[cm](A,B)\tkzGetLength{dAB}\tkzFindSlopeAngle(A,B)\tkzGetAngle{tkzangle}\begin{scope}[rotate=\tkzangle]\tikzset{arc/.style={color=gray,delta=10}}\tkzDrawArc[orange,R,arc](B,3/4*\dAB)(120,240)\tkzDrawArc[orange,R,arc](A,3/4*\dAB)(-45,60)\tkzDrawLine(I,J)\tkzDrawSegment(A,B)\end{scope}\tkzDrawPoints(A,B,I,J)\tkzLabelPoints(A,B)\tkzLabelPoints[right](I,J)
\end{tikzpicture}
tkz-euclide AlterMundus
23 Sectors 116
23 Sectors
23.1 \tkzDrawSector
☞ � Attention the arguments vary according to the options.
\tkzDrawSector[⟨local options⟩](⟨O,…⟩)(⟨…⟩)
options default definition
towards towards 𝑂 is the center and the arc from 𝐴 to (𝑂𝐵)rotate towards the arc starts from 𝐴 and the angle determines its lengthR towards We give the radius and two anglesR with nodes towards We give the radius and two points
You have to add, of course, all the styles of TikZ for tracings...
options arguments example
towards (⟨pt,pt⟩)(⟨pt⟩) \tkzDrawSector(O,A)(B)rotate (⟨pt,pt⟩)(⟨an⟩) \tkzDrawSector[rotate,color=red](O,A)(90)R (⟨pt,𝑟⟩)(⟨an,an⟩) \tkzDrawSector[R,color=blue](O,2 cm)(30,90)R with nodes (⟨pt,𝑟⟩)(⟨pt,pt⟩) \tkzDrawSector[R with nodes](O,2 cm)(A,B)
Here are a few examples:
23.1.1 \tkzDrawSector and towards
There’s no need to put towards. You can use fill as an option.
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){O}\tkzDefPoint(-30:3){A}\tkzDefPointBy[rotation = center O angle -60](A)\tkzDrawSector[fill=red!50](O,A)(tkzPointResult)
\begin{scope}[shift={(-60:1cm)}]\tkzDefPoint(0,0){O}\tkzDefPoint(-30:3){A}\tkzDefPointBy[rotation = center O angle -60](A)\tkzDrawSector[fill=blue!50](O,tkzPointResult)(A)\end{scope}
\end{tikzpicture}
tkz-euclide AlterMundus
23 Sectors 117
23.1.2 \tkzDrawSector and rotate
\begin{tikzpicture}[scale=2]\tkzDefPoint(0,0){O}\tkzDefPoint(2,2){A}\tkzDrawSector[rotate,draw=red!50!black,%fill=red!20](O,A)(30)\tkzDrawSector[rotate,draw=blue!50!black,%fill=blue!20](O,A)(-30)
\end{tikzpicture}
23.1.3 \tkzDrawSector and R
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){O}\tkzDefPoint(2,-1){A}\tkzDrawSector[R,draw=white,%fill=red!50](O,2cm)(30,90)\tkzDrawSector[R,draw=white,%fill=red!60](O,2cm)(90,180)\tkzDrawSector[R,draw=white,%fill=red!70](O,2cm)(180,270)\tkzDrawSector[R,draw=white,%fill=red!90](O,2cm)(270,360)
\end{tikzpicture}
23.1.4 \tkzDrawSector and R
𝐴
𝐵
𝐶
𝑂
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){O}\tkzDefPoint(4,-2){A}\tkzDefPoint(4,1){B}\tkzDefPoint(3,3){C}\tkzDrawSector[R with nodes,%
fill=blue!20](O,1 cm)(B,C)\tkzDrawSector[R with nodes,%
fill=red!20](O,1.25 cm)(A,B)\tkzDrawSegments(O,A O,B O,C)\tkzDrawPoints(O,A,B,C)\tkzLabelPoints(A,B,C)\tkzLabelPoints[left](O)\end{tikzpicture}
tkz-euclide AlterMundus
23 Sectors 118
23.1.5 \tkzDrawSector and R with nodes
𝐴
𝐵
𝐶𝐷
𝐸
𝐹
𝐴𝐵=16𝑚
1
2
3
4
5
6
𝑆𝛼
\begin{tikzpicture} [scale=.5]\tkzDefPoint(-1,-2){A}\tkzDefPoint(1,3){B}\tkzDefRegPolygon[side,sides=6](A,B)\tkzGetPoint{O}\tkzDrawPolygon[fill=black!10,
draw=blue](P1,P...,P6)\tkzLabelRegPolygon[sep=1.05](O){A,...,F}\tkzDrawCircle[dashed](O,A)\tkzLabelSegment[above,sloped,
midway](A,B){\(A B = 16m\)}\foreach \i [count=\xi from 1] in {2,...,6,1}
{%\tkzDefMidPoint(P\xi,P\i)\path (O) to [pos=1.1] node {\xi} (tkzPointResult) ;}
\tkzDefRandPointOn[segment = P3--P5]\tkzGetPoint{S}\tkzDrawSegments[thick,dashed,red](A,S S,B)\tkzDrawPoints(P1,P...,P6,S)\tkzLabelPoint[left,above](S){$S$}\tkzDrawSector[R with nodes,fill=red!20](S,2 cm)(A,B)\tkzLabelAngle[pos=1.5](A,S,B){$\alpha$}
\end{tikzpicture}
23.2 \tkzFillSector
☞ � Attention the arguments vary according to the options.
\tkzFillSector[⟨local options⟩](⟨O,…⟩)(⟨…⟩)
options default definition
towards towards 𝑂 is the center and the arc from 𝐴 to (𝑂𝐵)rotate towards the arc starts from A and the angle determines its lengthR towards We give the radius and two anglesR with nodes towards We give the radius and two points
Of course, you have to add all the styles of TikZ for the tracings...
options arguments example
towards (⟨pt,pt⟩)(⟨pt⟩) \tkzFillSector(O,A)(B)rotate (⟨pt,pt⟩)(⟨an⟩) \tkzFillSector[rotate,color=red](O,A)(90)R (⟨pt,𝑟⟩)(⟨an,an⟩) \tkzFillSector[R,color=blue](O,2 cm)(30,90)R with nodes (⟨pt,𝑟⟩)(⟨pt,pt⟩) \tkzFillSector[R with nodes](O,2 cm)(A,B)
23.2.1 \tkzFillSector and towards
It is useless to put towards and you will notice that the contours are not drawn, only the surface is colored.
tkz-euclide AlterMundus
23 Sectors 119
\begin{tikzpicture}[scale=.6]\tkzDefPoint(0,0){O}\tkzDefPoint(-30:3){A}\tkzDefPointBy[rotation = center O angle -60](A)\tkzFillSector[fill=red!50](O,A)(tkzPointResult)\begin{scope}[shift={(-60:1cm)}]\tkzDefPoint(0,0){O}\tkzDefPoint(-30:3){A}\tkzDefPointBy[rotation = center O angle -60](A)\tkzFillSector[color=blue!50](O,tkzPointResult)(A)\end{scope}
\end{tikzpicture}
23.2.2 \tkzFillSector and rotate
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){O} \tkzDefPoint(2,2){A}\tkzFillSector[rotate,color=red!20](O,A)(30)\tkzFillSector[rotate,color=blue!20](O,A)(-30)
\end{tikzpicture}
23.3 \tkzClipSector
☞ � Attention the arguments vary according to the options.
\tkzClipSector[⟨local options⟩](⟨O,…⟩)(⟨…⟩)
options default definition
towards towards 𝑂 is the centre and the sector starts from 𝐴 to (𝑂𝐵)rotate towards The sector starts from 𝐴 and the angle determines its amplitude.R towards We give the radius and two angles
You have to add, of course, all the styles of TikZ for tracings...
options arguments example
towards (⟨pt,pt⟩)(⟨pt⟩) \tkzClipSector(O,A)(B)rotate (⟨pt,pt⟩)(⟨angle⟩) \tkzClipSector[rotate](O,A)(90)R (⟨pt,𝑟⟩)(⟨angle 1,angle 2⟩) \tkzClipSector[R](O,2 cm)(30,90)
tkz-euclide AlterMundus
23 Sectors 120
23.3.1 \tkzClipSector
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){O}\tkzDefPoint(2,-1){A}\tkzDefPoint(1,1){B}\tkzDrawSector[color=blue,dashed](O,A)(B)\tkzDrawSector[color=blue](O,B)(A)\tkzClipBB\begin{scope}\tkzClipSector(O,B)(A)\draw[fill=gray!20] (-1,0) rectangle (3,3);
\end{scope}\tkzDrawPoints(A,B,O)
\end{tikzpicture}
tkz-euclide AlterMundus
24 The arcs 121
24 The arcs
\tkzDrawArc[⟨local options⟩](⟨O,…⟩)(⟨…⟩)
This macro traces the arc of center 𝑂. Depending on the options, the arguments differ. It is a question ofdetermining a starting point and an end point. Either the starting point is given, which is the simplest, or theradius of the arc is given. In the latter case, it is necessary to have two angles. Either the angles can be givendirectly, or nodes associated with the center can be given to determine them. The angles are in degrees.
options default definition
towards towards 𝑂 is the center and the arc from 𝐴 to (𝑂𝐵)rotate towards the arc starts from 𝐴 and the angle determines its lengthR towards We give the radius and two anglesR with nodes towards We give the radius and two pointsangles towards We give the radius and two pointsdelta 0 angle added on each side
Of course, you have to add all the styles of TikZ for the tracings...
options arguments example
towards (⟨pt,pt⟩)(⟨pt⟩) \tkzDrawArc[delta=10](O,A)(B)rotate (⟨pt,pt⟩)(⟨an⟩) \tkzDrawArc[rotate,color=red](O,A)(90)R (⟨pt,𝑟⟩)(⟨an,an⟩) \tkzDrawArc[R](O,2 cm)(30,90)R with nodes (⟨pt,𝑟⟩)(⟨pt,pt⟩) \tkzDrawArc[R with nodes](O,2 cm)(A,B)angles (⟨pt,pt⟩)(⟨an,an⟩) \tkzDrawArc[angles](O,A)(0,90)
Here are a few examples:
24.1 Option towards
It’s useless to put towards. In this first example the arc starts from 𝐴 and goes to 𝐵. The arc going from 𝐵 to 𝐴 isdifferent. The salient is obtained by going in the direct direction of the trigonometric circle.
𝑂
𝐴
𝐵
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(2,-1){A}\tkzDefPointBy[rotation= center O angle 90](A)\tkzGetPoint{B}\tkzDrawArc[color=blue,<->](O,A)(B)\tkzDrawArc(O,B)(A)\tkzDrawLines[add = 0 and .5](O,A O,B)\tkzDrawPoints(O,A,B)\tkzLabelPoints[below](O,A,B)
\end{tikzpicture}
24.2 Option towards
In this one, the arc starts from A but stops on the right (OB).
tkz-euclide AlterMundus
24 The arcs 122
𝑂
𝐴
𝐵
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){O}\tkzDefPoint(2,-1){A}\tkzDefPoint(1,1){B}\tkzDrawArc[color=blue,->](O,A)(B)\tkzDrawArc[color=gray](O,B)(A)\tkzDrawArc(O,B)(A)\tkzDrawLines[add = 0 and .5](O,A O,B)\tkzDrawPoints(O,A,B)\tkzLabelPoints[below](O,A,B)
\end{tikzpicture}
24.3 Option rotate
𝑂
𝐴
𝐵
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(2,-2){A}\tkzDefPoint(60:2){B}\tkzDrawLines[add = 0 and .5](O,A O,B)\tkzDrawArc[rotate,color=red](O,A)(180)\tkzDrawPoints(O,A,B)\tkzLabelPoints[below](O,A,B)
\end{tikzpicture}
24.4 Option R
𝑂
\begin{tikzpicture}\tkzDefPoints{0/0/O}\tikzset{compass style/.append style={<->}}\tkzDrawArc[R,color=orange,double](O,3cm)(270,360)\tkzDrawArc[R,color=blue,double](O,2cm)(0,270)\tkzDrawPoint(O)\tkzLabelPoint[below](O){$O$}
\end{tikzpicture}
tkz-euclide AlterMundus
24 The arcs 123
24.5 Option R with nodes
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(2,-1){A}\tkzDefPoint(1,1){B}\tkzCalcLength(B,A)\tkzGetLength{radius}\tkzDrawArc[R with nodes](B,\radius pt)(A,O)
\end{tikzpicture}
24.6 Option delta
This option allows a bit like \tkzCompass to place an arc and overflow on either side. delta is a measure in degrees.
𝐴 𝐵
𝐶
𝐷
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(5,0){B}\tkzDefPointBy[rotation= center A angle 60](B)\tkzGetPoint{C}\tkzSetUpLine[color=gray]\tkzDefPointBy[symmetry= center C](A)\tkzGetPoint{D}\tkzDrawSegments(A,B A,D)\tkzDrawLine(B,D)\tkzSetUpCompass[color=orange]\tkzDrawArc[orange,delta=10](A,B)(C)\tkzDrawArc[orange,delta=10](B,C)(A)\tkzDrawArc[orange,delta=10](C,D)(D)\tkzDrawPoints(A,B,C,D)\tkzLabelPoints(A,B,C,D)\tkzMarkRightAngle(D,B,A)
\end{tikzpicture}
tkz-euclide AlterMundus
24 The arcs 124
24.7 Option angles: example 1
𝐴 𝐵𝑂
𝐷
𝐸
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){A}\tkzDefPoint(5,0){B}\tkzDefPoint(2.5,0){O}\tkzDefPointBy[rotation=center O angle 60](B)\tkzGetPoint{D}\tkzDefPointBy[symmetry=center D](O)\tkzGetPoint{E}\tkzSetUpLine[color=Maroon]\tkzDrawArc[angles](O,B)(0,180)\tkzDrawArc[angles,](B,O)(100,180)\tkzCompass[delta=20](D,E)\tkzDrawLines(A,B O,E B,E)\tkzDrawPoints(A,B,O,D,E)\tkzLabelPoints(A,B,O,D,E)\tkzMarkRightAngle(O,B,E)
\end{tikzpicture}
24.8 Option angles: example 2
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(5,0){I}\tkzDefPoint(0,5){J}\tkzInterCC(O,I)(I,O)\tkzGetPoints{B}{C}\tkzInterCC(O,I)(J,O)\tkzGetPoints{D}{A}\tkzInterCC(I,O)(J,O)\tkzGetPoints{L}{K}\tkzDrawArc[angles](O,I)(0,90)\tkzDrawArc[angles,color=gray,style=dashed](I,O)(90,180)\tkzDrawArc[angles,color=gray,style=dashed](J,O)(-
90,0)\tkzDrawPoints(A,B,K)\foreach \point in {I,A,B,J,K}{\tkzDrawSegment(O,\point)}\end{tikzpicture}
tkz-euclide AlterMundus
25 Miscellaneous tools 125
25 Miscellaneous tools
25.1 Duplicate a segment
This involves constructing a segment on a given half-line of the same length as a given segment.
\tkzDuplicateSegment(⟨pt1,pt2⟩)(⟨pt3,pt4⟩){⟨pt5⟩}
This involves creating a segment on a given half-line of the same length as a given segment . It is in fact the defini-
tionof apoint. \tkzDuplicateSegment is thenewnameof\tkzDuplicateLen.arguments example explication
(pt1,pt2)(pt3,pt4){pt5} \tkzDuplicateSegment(A,B)(E,F){C} AC=EF and 𝐶 ∈ [𝐴𝐵)
The macro \tkzDuplicateLength is identical to this one.
𝐴
𝐵
𝐶
𝐷
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(2,-3){B}\tkzDefPoint(2,5){C}\tkzDrawSegments[red](A,B A,C)\tkzDuplicateSegment(A,B)(A,C)\tkzGetPoint{D}\tkzDrawSegment[green](A,D)\tkzDrawPoints[color=red](A,B,C,D)\tkzLabelPoints[above right=3pt](A,B,C,D)
\end{tikzpicture}
tkz-euclide AlterMundus
25 Miscellaneous tools 126
25.1.1 Proportion of gold with \tkzDuplicateSegment
𝐴
𝐵 𝐷 𝐶
𝑀
𝐼
𝑁\begin{tikzpicture}[rotate=-90,scale=.75]\tkzDefPoint(0,0){A}\tkzDefPoint(10,0){B}\tkzDefMidPoint(A,B)\tkzGetPoint{I}\tkzDefPointWith[orthogonal,K=-.75](B,A)\tkzGetPoint{C}\tkzInterLC(B,C)(B,I) \tkzGetSecondPoint{D}\tkzDuplicateSegment(B,D)(D,A) \tkzGetPoint{E}\tkzInterLC(A,B)(A,E) \tkzGetPoints{N}{M}\tkzDrawArc[orange,delta=10](D,E)(B)\tkzDrawArc[orange,delta=10](A,M)(E)\tkzDrawLines(A,B B,C A,D)\tkzDrawArc[orange,delta=10](B,D)(I)\tkzDrawPoints(A,B,D,C,M,I,N)\tkzLabelPoints(A,B,D,C,M,I,N)
\end{tikzpicture}
25.2 Segment length \tkzCalcLength
There’s an option in TikZ named veclen. This option is used to calculate AB if A and B are two points.The only problem for me is that the version of TikZ is not accurate enough in some cases. My version uses the xfppackage and is slower, but more accurate.
\tkzCalcLength[⟨local options⟩](⟨pt1,pt2⟩){⟨name of macro⟩}
The result is stored in a macro.
arguments example explication
(pt1,pt2){name of macro} \tkzCalcLength(A,B){dAB} \dAB gives 𝐴𝐵 in pt
Only one option
options default example
cm false \tkzCalcLength[cm](A,B){dAB} \dAB gives 𝐴𝐵 in cm
tkz-euclide AlterMundus
25 Miscellaneous tools 127
25.2.1 Compass square construction
𝐴 𝐵
𝐶
𝐷
\begin{tikzpicture}[scale=1]\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}\tkzDrawLine[add= .6 and .2](A,B)\tkzCalcLength[cm](A,B)\tkzGetLength{dAB}\tkzDefLine[perpendicular=through A](A,B)\tkzDrawLine(A,tkzPointResult) \tkzGetPoint{D}\tkzShowLine[orthogonal=through A,gap=2](A,B)\tkzMarkRightAngle(B,A,D)\tkzVecKOrth[-1](B,A)\tkzGetPoint{C}\tkzCompasss(A,D D,C)\tkzDrawArc[R](B,\dAB)(80,110)\tkzDrawPoints(A,B,C,D)\tkzDrawSegments[color=gray,style=dashed](B,C C,D)\tkzLabelPoints(A,B,C,D)
\end{tikzpicture}
25.3 Transformation from pt to cm
Not sure if this is necessary and it is only a division by 28.45274 and a multiplication by the same number. Themacros are:
\tkzpttocm(⟨nombre⟩){⟨name of macro⟩}
arguments example explication
(number)name of macro \tkzpttocm(120){len} \len gives a number of cm
You’ll have to use \len along with cm. The result is stored in a macro.
25.4 Transformation from cm to pt
\tkzcmtopt(⟨nombre⟩){⟨name of macro⟩}
arguments example explication
(nombre){name of macro} \tkzcmtopt(5){len} \len length in pt
The result is stored in a macro. The result can be used with \len pt.
tkz-euclide AlterMundus
25 Miscellaneous tools 128
25.4.1 Example
The macro \tkzDefCircle[radius](A,B) defines the radius that we retrieve with \tkzGetLength, but thisresult is in pt.
𝐴
𝐵
5
\begin{tikzpicture}[scale=.5]\tkzDefPoint(0,0){A}\tkzDefPoint(3,-4){B}\tkzDefCircle[through](A,B)\tkzGetLength{rABpt}\tkzpttocm(\rABpt){rABcm}\tkzDrawCircle(A,B)\tkzDrawPoints(A,B)\tkzLabelPoints(A,B)\tkzDrawSegment[dashed](A,B)\tkzLabelSegment(A,B){$\pgfmathprintnumber{\rABcm}$}
\end{tikzpicture}
25.5 Get point coordinates
\tkzGetPointCoord(⟨𝐴⟩){⟨name of macro⟩}
arguments example explication
(point){name of macro} \tkzGetPointCoord(A){A} \Ax and \Ay give coordinates for 𝐴
Stores in two macros the coordinates of a point. If the name of the macro is p, then \px and \py give thecoordinates of the chosen point with the cm as unit.
25.5.1 Coordinate transfer with \tkzGetPointCoord
𝑥
𝑦
0 1 2 3 4 50
1
2
3
\begin{tikzpicture}\tkzInit[xmax=5,ymax=3]\tkzGrid[sub,orange]\tkzAxeXY\tkzDefPoint(1,0){A}\tkzDefPoint(4,2){B}\tkzGetPointCoord(A){a}\tkzGetPointCoord(B){b}\tkzDefPoint(\ax,\ay){C}\tkzDefPoint(\bx,\by){D}\tkzDrawPoints[color=red](C,D)
\end{tikzpicture}
tkz-euclide AlterMundus
25 Miscellaneous tools 129
25.5.2 Sum of vectors with \tkzGetPointCoord
\begin{tikzpicture}[>=latex]\tkzDefPoint(1,4){a}\tkzDefPoint(3,2){b}\tkzDefPoint(1,1){c}\tkzDrawSegment[->,red](a,b)\tkzGetPointCoord(c){c}\draw[color=blue,->](a) -- ([shift=(b)]\cx,\cy) ;\draw[color=purple,->](b) -- ([shift=(b)]\cx,\cy) ;\tkzDrawSegment[->,blue](a,c)\tkzDrawSegment[->,purple](b,c)
\end{tikzpicture}
tkz-euclide AlterMundus
26 Using the compass 130
26 Using the compass
26.1 Main macro \tkzCompass
\tkzCompass[⟨local options⟩](⟨A,B⟩)
This macro allows you to leave a compass trace, i.e. an arc at a designated point. The center must be indicated.Several specific options will modify the appearance of the arc as well as TikZ options such as style, color, linethickness etc.
You can define the length of the arc with the option length or the option delta.
options default definition
delta 0 (deg) Modifies the angle of the arc by increasing it symmetrically (in degrees)length 1 (cm) Changes the length (in cm)
26.1.1 Option length
\begin{tikzpicture}\tkzDefPoint(1,1){A}\tkzDefPoint(6,1){B}\tkzInterCC[R](A,4cm)(B,3cm)\tkzGetPoints{C}{D}\tkzDrawPoint(C)\tkzCompass[color=red,length=1.5](A,C)\tkzCompass[color=red](B,C)\tkzDrawSegments(A,B A,C B,C)
\end{tikzpicture}
26.1.2 Option delta
\begin{tikzpicture}\tkzDefPoint(0,0){A}\tkzDefPoint(5,0){B}\tkzInterCC[R](A,4cm)(B,3cm)\tkzGetPoints{C}{D}\tkzDrawPoints(A,B,C)\tkzCompass[color=red,delta=20](A,C)\tkzCompass[color=red,delta=20](B,C)\tkzDrawPolygon(A,B,C)\tkzMarkAngle(A,C,B)
\end{tikzpicture}
26.2 Multiple constructions \tkzCompasss
\tkzCompasss[⟨local options⟩](⟨pt1,pt2 pt3,pt4,…⟩)
☞ � Attention the arguments are lists of two points. This saves a few lines of code.
options default definition
delta 0 Modifies the angle of the arc by increasing it symmetricallylength 1 Changes the length
tkz-euclide AlterMundus
26 Using the compass 131
𝐴
𝐵
𝐶
𝑖
𝑗
𝐷
\begin{tikzpicture}[scale=.75]\tkzDefPoint(2,2){A} \tkzDefPoint(5,-2){B}\tkzDefPoint(3,4){C} \tkzDrawPoints(A,B)\tkzDrawPoint[color=red,shape=cross out](C)\tkzCompasss[color=orange](A,B A,C B,C C,B)\tkzShowLine[mediator,color=red,
dashed,length = 2](A,B)\tkzShowLine[parallel = through C,
color=blue,length=2](A,B)\tkzDefLine[mediator](A,B) \tkzGetPoints{i}{j}\tkzDefLine[parallel=through C](A,B) \tkzGetPoint{D}\tkzDrawLines[add=.6 and .6](C,D A,C B,D)\tkzDrawLines(i,j) \tkzDrawPoints(A,B,C,i,j,D)\tkzLabelPoints(A,B,C,i,j,D)
\end{tikzpicture}
26.3 Configuration macro \tkzSetUpCompass
\tkzSetUpCompass[⟨local options⟩]
options default definition
line width 0.4pt line thicknesscolor black!50 line colourstyle solid solid line style, dashed,dotted,...
26.3.1 Use of \tkzSetUpCompass
\begin{tikzpicture}[scale=.75,showbi/.style={bisector,size=2,gap=3}]
\tkzSetUpCompass[color=blue,line width=.3 pt]\tkzDefPoints{0/1/A, 8/3/B, 3/6/C}\tkzDrawPolygon(A,B,C)\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a}\tkzDefLine[bisector](C,B,A) \tkzGetPoint{b}\tkzShowLine[showbi](B,A,C)\tkzShowLine[showbi](C,B,A)\tkzInterLL(A,a)(B,b) \tkzGetPoint{I}\tkzDefPointBy[projection= onto A--B](I)
\tkzGetPoint{H}\tkzDrawCircle[radius,color=gray](I,H)\tkzDrawSegments[color=gray!50](I,H)\tkzDrawLines[add=0 and -.2,color=blue!50 ](A,a B,b)
\tkzShowBB\end{tikzpicture}
tkz-euclide AlterMundus
27 The Show 132
27 The Show
27.1 Show the constructions of some lines \tkzShowLine
\tkzShowLine[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩)
These constructions concern mediatrices, perpendicular or parallel lines passing through a given point andbisectors. The arguments are therefore lists of two or three points. Several options allow the adjustment of theconstructions. The idea of this macro comes from Yves Combe.
options default definition
mediator mediator displays the constructions of a mediatorperpendicular mediator constructions for a perpendicularorthogonal mediator idembisector mediator constructions for a bisectorK 1 circle within a trianglelength 1 in cm, length of a arcratio .5 arc length ratiogap 2 placing the point of constructionsize 1 radius of an arc (see bisector)
You have to add, of course, all the styles of TikZ for tracings…
27.1.1 Example of \tkzShowLine and parallel
\begin{tikzpicture}\tkzDefPoints{-1.5/-0.25/A,1/-0.75/B,-1.5/2/C}\tkzDrawLine(A,B)\tkzDefLine[parallel=through C](A,B) \tkzGetPoint{c}\tkzShowLine[parallel=through C](A,B)\tkzDrawLine(C,c) \tkzDrawPoints(A,B,C,c)
\end{tikzpicture}
27.1.2 Example of \tkzShowLine and perpendicular
\begin{tikzpicture}\tkzDefPoints{0/0/A, 3/2/B, 2/2/C}\tkzDefLine[perpendicular=through C,K=-.5](A,B) \tkzGetPoint{c}\tkzShowLine[perpendicular=through C,K=-.5,gap=3](A,B)\tkzDefPointBy[projection=onto A--B](c)\tkzGetPoint{h}\tkzMarkRightAngle[fill=lightgray](A,h,C)\tkzDrawLines[add=.5 and .5](A,B C,c)\tkzDrawPoints(A,B,C,h,c)\end{tikzpicture}
tkz-euclide AlterMundus
27 The Show 133
27.1.3 Example of \tkzShowLine and bisector
\begin{tikzpicture}[scale=1.25]\tkzDefPoints{0/0/A, 4/2/B, 1/4/C}\tkzDrawPolygon(A,B,C)\tkzSetUpCompass[color=brown,line width=.1 pt]\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a}\tkzDefLine[bisector](C,B,A) \tkzGetPoint{b}\tkzInterLL(A,a)(B,b) \tkzGetPoint{I}\tkzDefPointBy[projection = onto A--B](I)
\tkzGetPoint{H}\tkzShowLine[bisector,size=2,gap=3,blue](B,A,C)\tkzShowLine[bisector,size=2,gap=3,blue](C,B,A)\tkzDrawCircle[radius,color=blue,%line width=.2pt](I,H)\tkzDrawSegments[color=red!50](I,tkzPointResult)\tkzDrawLines[add=0 and -0.3,color=red!50](A,a B,b)
\end{tikzpicture}
27.1.4 Example of \tkzShowLine and mediator
𝐴
𝐵
\begin{tikzpicture}\tkzDefPoint(2,2){A}\tkzDefPoint(5,4){B}\tkzDrawPoints(A,B)\tkzShowLine[mediator,color=orange,length=1](A,B)\tkzGetPoints{i}{j}\tkzDrawLines[add=-0.1 and -0.1](i,j)\tkzDrawLines(A,B)\tkzLabelPoints[below =3pt](A,B)\end{tikzpicture}
27.2 Constructions of certain transformations \tkzShowTransformation
\tkzShowTransformation[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩)
These constructions concern orthogonal symmetries, central symmetries, orthogonal projections and trans-lations. Several options allow the adjustment of the constructions. The idea of this macro comes from YvesCombe.
options default definition
reflection= over pt1--pt2 reflection constructions of orthogonal symmetrysymmetry=center pt reflection constructions of central symmetryprojection=onto pt1--pt2 reflection constructions of a projectiontranslation=from pt1 to pt2 reflection constructions of a translationK 1 circle within a trianglelength 1 arc lengthratio .5 arc length ratiogap 2 placing the point of constructionsize 1 radius of an arc (see bisector)
tkz-euclide AlterMundus
27 The Show 134
27.2.1 Example of the use of \tkzShowTransformation
𝐴
𝑂
𝐵
𝐶
𝐸
𝐹
𝐻
\begin{tikzpicture}[scale=.6]\tkzDefPoint(0,0){O} \tkzDefPoint(2,-2){A}\tkzDefPoint(70:4){B} \tkzDrawPoints(A,O,B)\tkzLabelPoints(A,O,B)\tkzDrawLine[add= 2 and 2](O,A)\tkzDefPointBy[translation=from O to A](B)\tkzGetPoint{C}\tkzDrawPoint[color=orange](C) \tkzLabelPoints(C)\tkzShowTransformation[translation=from O to A,%
length=2](B)\tkzDrawSegments[->,color=orange](O,A B,C)\tkzDefPointBy[reflection=over O--A](B) \tkzGetPoint{E}\tkzDrawSegment[blue](B,E)\tkzDrawPoint[color=blue](E)\tkzLabelPoints(E)\tkzShowTransformation[reflection=over O--A,size=2](B)\tkzDefPointBy[symmetry=center O](B) \tkzGetPoint{F}\tkzDrawSegment[color=green](B,F)\tkzDrawPoint[color=green](F)\tkzLabelPoints(F)\tkzShowTransformation[symmetry=center O,%
length=2](B)\tkzDefPointBy[projection=onto O--A](C)\tkzGetPoint{H}\tkzDrawSegments[color=magenta](C,H)\tkzDrawPoint[color=magenta](H)\tkzLabelPoints(H)\tkzShowTransformation[projection=onto O--A,%
color=red,size=3,gap=-2](C)\end{tikzpicture}
27.2.2 Another example of the use of \tkzShowTransformation
You’ll find this figure again, but without the construction features.
𝑂
𝑁
𝐼
𝑀
𝐴
\begin{tikzpicture}[scale=.6]\tkzDefPoints{0/0/A,8/0/B,3.5/10/I}\tkzDefMidPoint(A,B) \tkzGetPoint{O}\tkzDefPointBy[projection=onto A--B](I)
\tkzGetPoint{J}\tkzInterLC(I,A)(O,A) \tkzGetPoints{M'}{M}\tkzInterLC(I,B)(O,A) \tkzGetPoints{N}{N'}\tkzDrawSemiCircle[diameter](A,B)\tkzDrawSegments(I,A I,B A,B B,M A,N)\tkzMarkRightAngles(A,M,B A,N,B)\tkzDrawSegment[style=dashed,color=blue](I,J)\tkzShowTransformation[projection=onto A--B,
color=red,size=3,gap=-3](I)\tkzDrawPoints[color=red](M,N)\tkzDrawPoints[color=blue](O,A,B,I)\tkzLabelPoints(O)\tkzLabelPoints[above right](N,I)\tkzLabelPoints[below left](M,A)
\end{tikzpicture}
tkz-euclide AlterMundus
28 Different points 135
28 Different points
28.1 \tkzDefEquiPoints
This macro makes it possible to obtain two points on a straight line equidistant from a given point.
\tkzDefEquiPoints[⟨local options⟩](⟨pt1,pt2⟩)
arguments default definition
(pt1,pt2) no default unordered list of two items
options default definition
dist 2 cm half the distance between the two pointsfrom=pt no default reference pointshow false if true displays compass traces/compass/delta 0 compass trace size
28.1.1 Using \tkzDefEquiPoints with options
𝐸𝐻
𝐴
𝐵
𝐶
\begin{tikzpicture}\tkzSetUpCompass[color=purple,line width=1pt]\tkzDefPoint(0,1){A}\tkzDefPoint(5,2){B}\tkzDefPoint(3,4){C}\tkzDefEquiPoints[from=C,dist=1,show,
/tkzcompass/delta=20](A,B)\tkzGetPoints{E}{H}\tkzDrawLines[color=blue](C,E C,H A,B)\tkzDrawPoints[color=blue](A,B,C)\tkzDrawPoints[color=red](E,H)\tkzLabelPoints(E,H)\tkzLabelPoints[color=blue](A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
29 Protractor 136
29 Protractor
Based on an idea byYves Combe, the following macro allows you to draw a protractor. The operating principleis even simpler. Just name a half-line (a ray). The protractor will be placed on the origin 𝑂, the direction of thehalf-line is given by 𝐴. The angle is measured in the direct direction of the trigonometric circle.
\tkzProtractor[⟨local options⟩](⟨𝑂,𝐴⟩)
options default definition
lw 0.4 pt line thicknessscale 1 ratio: adjusts the size of the protractorreturn false trigonometric circle indirect
29.1 The circular protractor
Measuring in the forward direction
010
2030
405060708090
100
110
120
130
140
150
160
170
180
190
200210 220 230 240 250
260270
280290
300310
320330
340350
\begin{tikzpicture}[scale=.5]\tkzDefPoint(2,0){A}\tkzDefPoint(0,0){O}\tkzDefShiftPoint[A](31:5){B}\tkzDefShiftPoint[A](158:5){C}\tkzDrawPoints(A,B,C)\tkzDrawSegments[color = red,
line width = 1pt](A,B A,C)\tkzProtractor[scale = 1](A,B)
\end{tikzpicture}
29.2 The circular protractor, transparent and returned
010
20
3040
50 60 70 80 90 100 110 120 130140
150160
170180
190200210220230240250260270280
2903
0031
032
033
034
035
0
\begin{tikzpicture}[scale=.5]\tkzDefPoint(2,3){A}\tkzDefShiftPoint[A](31:5){B}\tkzDefShiftPoint[A](158:5){C}\tkzDrawSegments[color=red,line width=1pt](A,B A,C)\tkzProtractor[return](A,C)
\end{tikzpicture}
tkz-euclide AlterMundus
30 Some examples 137
30 Some examples
30.1 Some interesting examples
30.1.1 Similar isosceles triangles
The following is from the excellent siteDescartes et les Mathématiques. I did not modify the text and I am onlythe author of the programming of the figures.
http://debart.pagesperso-orange.fr/seconde/triangle.html
Bibliography:
– Géométrie au Bac - Tangente, special issue no. 8 - Exercise 11, page 11
– Elisabeth Busser and Gilles Cohen: 200 nouveaux problèmes du ”Monde” - POLE 2007 (200 new problemsof ”Le Monde”)
– Affaire de logique n° 364 - Le Monde February 17, 2004
Two statements were proposed, one by the magazine Tangente and the other by Le Monde.
Editor of the magazine ”Tangente” : Two similar isosceles triangles 𝐴𝑋𝐵 and 𝐵𝑌𝐶 are constructed with mainvertices 𝑋 and 𝑌, such that 𝐴, 𝐵 and 𝐶 are aligned and that these triangles are ”indirect”. Let 𝛼 be the angle atvertex 𝐴𝑋𝐵 = 𝐵𝑌𝐶. We then construct a third isosceles triangle𝑋𝑍𝑌 similar to the first two, with main vertex 𝑍and ”indirect”. We ask to demonstrate that point 𝑍 belongs to the straight line (𝐴𝐶).
Editor of ”Le Monde” : We construct two similar isosceles triangles 𝐴𝑋𝐵 and 𝐵𝑌𝐶with principal vertices𝑋 and 𝑌,such that 𝐴, 𝐵 and 𝐶 are aligned and that these triangles are ”indirect”. Let 𝛼 be the angle at vertex 𝐴𝑋𝐵 = 𝐵𝑌𝐶.The point Z of the line segment [𝐴𝐶] is equidistant from the two vertices𝑋 and 𝑌.At what angle does he see these two vertices?
The constructions and their associated codes are on the next two pages, but you can search before looking. Theprogramming respects (it seems to me ...) my reasoning in both cases.
tkz-euclide AlterMundus
30 Some examples 138
30.1.2 Revised version of "Tangente"
𝐴
𝐵
𝐶
𝑍
𝑋
𝑌
𝑂
\begin{tikzpicture}[scale=.8,rotate=60]\tkzDefPoint(6,0){X} \tkzDefPoint(3,3){Y}\tkzDefShiftPoint[X](-110:6){A} \tkzDefShiftPoint[X](-70:6){B}\tkzDefShiftPoint[Y](-110:4.2){A'} \tkzDefShiftPoint[Y](-70:4.2){B'}\tkzDefPointBy[translation= from A' to B ](Y) \tkzGetPoint{Y}\tkzDefPointBy[translation= from A' to B ](B') \tkzGetPoint{C}\tkzInterLL(A,B)(X,Y) \tkzGetPoint{O}\tkzDefMidPoint(X,Y) \tkzGetPoint{I}\tkzDefPointWith[orthogonal](I,Y)\tkzInterLL(I,tkzPointResult)(A,B) \tkzGetPoint{Z}\tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O}\tkzDrawCircle(O,X)\tkzDrawLines[add = 0 and 1.5](A,C) \tkzDrawLines[add = 0 and 3](X,Y)\tkzDrawSegments(A,X B,X B,Y C,Y) \tkzDrawSegments[color=red](X,Z Y,Z)\tkzDrawPoints(A,B,C,X,Y,O,Z)\tkzLabelPoints(A,B,C,Z) \tkzLabelPoints[above right](X,Y,O)
\end{tikzpicture}
tkz-euclide AlterMundus
30 Some examples 139
30.1.3 "Le Monde" version
𝐴 𝐵 𝐶𝑍
𝑋
𝑌
𝑀
𝐼
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){A}\tkzDefPoint(3,0){B}\tkzDefPoint(9,0){C}\tkzDefPoint(1.5,2){X}\tkzDefPoint(6,4){Y}\tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O}\tkzDefMidPoint(X,Y) \tkzGetPoint{I}\tkzDefPointWith[orthogonal](I,Y) \tkzGetPoint{i}\tkzDrawLines[add = 2 and 1,color=orange](I,i)\tkzInterLL(I,i)(A,B) \tkzGetPoint{Z}\tkzInterLC(I,i)(O,B) \tkzGetSecondPoint{M}\tkzDefPointWith[orthogonal](B,Z) \tkzGetPoint{b}\tkzDrawCircle(O,B)\tkzDrawLines[add = 0 and 2,color=orange](B,b)\tkzDrawSegments(A,X B,X B,Y C,Y A,C X,Y)\tkzDrawSegments[color=red](X,Z Y,Z)\tkzDrawPoints(A,B,C,X,Y,Z,M,I)\tkzLabelPoints(A,B,C,Z)\tkzLabelPoints[above right](X,Y,M,I)
\end{tikzpicture}
30.1.4 Triangle altitudes
The following is again from the excellent siteDescartes et les Mathématiques (Descartes and the Mathematics).http://debart.pagesperso-orange.fr/geoplan/geometrie_triangle.html
tkz-euclide AlterMundus
30 Some examples 140
The three altitudes of a triangle intersect at the same H-point.
𝐴
𝐵𝐶 𝐴′
𝐵′
𝐶′𝐻
\begin{tikzpicture}[scale=.8]\tkzDefPoint(0,0){C}\tkzDefPoint(7,0){B}\tkzDefPoint(5,6){A}\tkzDrawPolygon(A,B,C)\tkzDefMidPoint(C,B)\tkzGetPoint{I}\tkzDrawArc(I,B)(C)\tkzInterLC(A,C)(I,B)\tkzGetSecondPoint{B'}\tkzInterLC(A,B)(I,B)\tkzGetFirstPoint{C'}\tkzInterLL(B,B')(C,C')\tkzGetPoint{H}\tkzInterLL(A,H)(C,B)\tkzGetPoint{A'}\tkzDefCircle[circum](A,B',C')
\tkzGetPoint{O}\tkzDrawCircle[color=red](O,A)\tkzDrawSegments[color=orange](B,B' C,C' A,A')\tkzMarkRightAngles(C,B',B B,C',C C,A',A)\tkzDrawPoints(A,B,C,A',B',C',H)\tkzLabelPoints(A,B,C,A',B',C',H)
\end{tikzpicture}
30.1.5 Altitudes - other construction
𝑂𝐴 𝐵𝑃
𝑀𝑁
𝐶
𝐼
\begin{tikzpicture}[scale=.75]\tkzDefPoint(0,0){A}\tkzDefPoint(8,0){B}\tkzDefPoint(3.5,10){C}\tkzDefMidPoint(A,B)\tkzGetPoint{O}\tkzDefPointBy[projection=onto A--B](C)\tkzGetPoint{P}\tkzInterLC(C,A)(O,A)\tkzGetSecondPoint{M}\tkzInterLC(C,B)(O,A)\tkzGetFirstPoint{N}\tkzInterLL(B,M)(A,N)\tkzGetPoint{I}\tkzDrawCircle[diameter](A,B)\tkzDrawSegments(C,A C,B A,B B,M A,N)\tkzMarkRightAngles[fill=brown!20](A,M,B A,N,B A,P,C)\tkzDrawSegment[style=dashed,color=orange](C,P)\tkzLabelPoints(O,A,B,P)\tkzLabelPoint[left](M){$M$}\tkzLabelPoint[right](N){$N$}\tkzLabelPoint[above](C){$C$}\tkzLabelPoint[above right](I){$I$}\tkzDrawPoints[color=red](M,N,P,I)\tkzDrawPoints[color=brown](O,A,B,C)
\end{tikzpicture}
tkz-euclide AlterMundus
30 Some examples 141
30.2 Different authors
30.2.1 Square root of the integers
How to get 1,√2,√3with a rule and a compass.
\begin{tikzpicture}[scale=1.5]\tkzDefPoint(0,0){O}\tkzDefPoint(1,0){a0}\tkzDrawSegment[blue](O,a0)\foreach \i [count=\j] in {0,...,10}{%\tkzDefPointWith[orthogonal normed](a\i,O)\tkzGetPoint{a\j}\tkzDrawPolySeg[color=blue](a\i,a\j,O)}
\end{tikzpicture}
30.2.2 About right triangle
We have a segment [𝐴𝐵] and we want to determine a point 𝐶 such that 𝐴𝐶 = 8 cm and 𝐴𝐵𝐶 is a right triangle in 𝐵.
𝐴
\begin{tikzpicture}[scale=.5]\tkzDefPoint["$A$" left](2,1){A}\tkzDefPoint(6,4){B}\tkzDrawSegment(A,B)\tkzDrawPoint[color=red](A)\tkzDrawPoint[color=red](B)\tkzDefPointWith[orthogonal,K=-1](B,A)\tkzDrawLine[add = .5 and .5](B,tkzPointResult)\tkzInterLC[R](B,tkzPointResult)(A,8 cm)\tkzGetPoints{C}{J}\tkzDrawPoint[color=red](C)\tkzCompass(A,C)\tkzMarkRightAngle(A,B,C)\tkzDrawLine[color=gray,style=dashed](A,C)
\end{tikzpicture}
30.2.3 Archimedes
This is an ancient problem proved by the great Greek mathematician Archimedes . The figure below shows asemicircle, with diameter 𝐴𝐵. A tangent line is drawn and touches the semicircle at 𝐵. An other tangent line ata point, 𝐶, on the semicircle is drawn. We project the point 𝐶 on the line segment [𝐴𝐵] on a point 𝐷. The twotangent lines intersect at the point 𝑇.
Prove that the line (𝐴𝑇) bisects (𝐶𝐷)
tkz-euclide AlterMundus
30 Some examples 142
𝐴 𝐵𝐼 𝐷
𝐶
𝑇
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){A}\tkzDefPoint(6,0){D}\tkzDefPoint(8,0){B}\tkzDefPoint(4,0){I}\tkzDefLine[orthogonal=through D](A,D)\tkzInterLC[R](D,tkzPointResult)(I,4 cm) \tkzGetFirstPoint{C}\tkzDefLine[orthogonal=through C](I,C) \tkzGetPoint{c}\tkzDefLine[orthogonal=through B](A,B) \tkzGetPoint{b}\tkzInterLL(C,c)(B,b) \tkzGetPoint{T}\tkzInterLL(A,T)(C,D) \tkzGetPoint{P}\tkzDrawArc(I,B)(A)\tkzDrawSegments(A,B A,T C,D I,C) \tkzDrawSegment[color=orange](I,C)\tkzDrawLine[add = 1 and 0](C,T) \tkzDrawLine[add = 0 and 1](B,T)\tkzMarkRightAngle(I,C,T)\tkzDrawPoints(A,B,I,D,C,T)\tkzLabelPoints(A,B,I,D) \tkzLabelPoints[above right](C,T)\tkzMarkSegment[pos=.25,mark=s|](C,D) \tkzMarkSegment[pos=.75,mark=s|](C,D)
\end{tikzpicture}
30.2.4 Example: Dimitris Kapeta
Youneed in this example to use mkpos=.2with \tkzMarkAnglebecause themeasure of𝐶𝐴𝑀 is too small. Anotherpossiblity is to use \tkzFillAngle.
𝒞
𝑂
𝐴
𝐵
𝑀𝐶
𝐴′
tkz-euclide AlterMundus
30 Some examples 143
\begin{tikzpicture}[scale=1.25]\tkzDefPoint(0,0){O}\tkzDefPoint(2.5,0){N}\tkzDefPoint(-4.2,0.5){M}\tkzDefPointBy[rotation=center O angle 30](N)\tkzGetPoint{B}\tkzDefPointBy[rotation=center O angle -50](N)\tkzGetPoint{A}\tkzInterLC(M,B)(O,N) \tkzGetFirstPoint{C}\tkzInterLC(M,A)(O,N) \tkzGetSecondPoint{A'}\tkzMarkAngle[mkpos=.2, size=0.5](A,C,B)\tkzMarkAngle[mkpos=.2, size=0.5](A,M,C)\tkzDrawSegments(A,C M,A M,B)\tkzDrawCircle(O,N)\tkzLabelCircle[above left](O,N)(120){$\mathcal{C}$}\tkzMarkAngle[mkpos=.2, size=1.2](C,A,M)\tkzDrawPoints(O, A, B, M, B, C)\tkzLabelPoints[right](O,A,B)\tkzLabelPoints[above left](M,C)\tkzLabelPoint[below left](A'){$A'$}
\end{tikzpicture}
30.2.5 Example 1: John Kitzmiller
Prove that△𝐿𝐾𝐽 is equilateral.
A B
C
J
K
L
tkz-euclide AlterMundus
30 Some examples 144
\begin{tikzpicture}[scale=2]\tkzDefPoint[label=below left:A](0,0){A}\tkzDefPoint[label=below right:B](6,0){B}\tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C}\tkzMarkSegments[mark=|](A,B A,C B,C)\tkzDefBarycentricPoint(A=1,B=2) \tkzGetPoint{C'}\tkzDefBarycentricPoint(A=2,C=1) \tkzGetPoint{B'}\tkzDefBarycentricPoint(C=2,B=1) \tkzGetPoint{A'}\tkzInterLL(A,A')(C,C') \tkzGetPoint{J}\tkzInterLL(C,C')(B,B') \tkzGetPoint{K}\tkzInterLL(B,B')(A,A') \tkzGetPoint{L}\tkzLabelPoint[above](C){C}\tkzDrawPolygon(A,B,C) \tkzDrawSegments(A,J B,L C,K)\tkzMarkAngles[size=1 cm](J,A,C K,C,B L,B,A)\tkzMarkAngles[thick,size=1 cm](A,C,J C,B,K B,A,L)\tkzMarkAngles[opacity=.5](A,C,J C,B,K B,A,L)\tkzFillAngles[fill= orange,size=1 cm,opacity=.3](J,A,C K,C,B L,B,A)\tkzFillAngles[fill=orange, opacity=.3,thick,size=1,](A,C,J C,B,K B,A,L)\tkzFillAngles[fill=green, size=1, opacity=.5](A,C,J C,B,K B,A,L)\tkzFillPolygon[color=yellow, opacity=.2](J,A,C)\tkzFillPolygon[color=yellow, opacity=.2](K,B,C)\tkzFillPolygon[color=yellow, opacity=.2](L,A,B)\tkzDrawSegments[line width=3pt,color=cyan,opacity=0.4](A,J C,K B,L)\tkzDrawSegments[line width=3pt,color=red,opacity=0.4](A,L B,K C,J)\tkzMarkSegments[mark=o](J,K K,L L,J)\tkzLabelPoint[right](J){J}\tkzLabelPoint[below](K){K}\tkzLabelPoint[above left](L){L}
\end{tikzpicture}
30.2.6 Example 2: John Kitzmiller
Prove that𝐴𝐶𝐶𝐸
=𝐵𝐷𝐷𝐹
.
Another interestingexample fromJohn, youcan seehow touse someextraoptions likedecorationandpostactionfromTikZ with tkz-euclide.
𝐴 𝐵
𝐸 𝐹
𝐶 𝐷𝐺
tkz-euclide AlterMundus
30 Some examples 145
\begin{tikzpicture}[scale=2,decoration={markings,mark=at position 3cm with {\arrow[scale=2]{>}}}]\tkzDefPoints{0/0/E, 6/0/F, 0/1.8/P, 6/1.8/Q, 0/3/R, 6/3/S}\tkzDrawLines[postaction={decorate}](E,F P,Q R,S)\tkzDefPoints{3.5/3/A, 5/3/B}\tkzDrawSegments(E,A F,B)\tkzInterLL(E,A)(P,Q) \tkzGetPoint{C}\tkzInterLL(B,F)(P,Q) \tkzGetPoint{D}\tkzLabelPoints[above right](A,B)\tkzLabelPoints[below](E,F)\tkzLabelPoints[above left](C)\tkzDrawSegments[style=dashed](A,F)\tkzInterLL(A,F)(P,Q) \tkzGetPoint{G}\tkzLabelPoints[above right](D,G)\tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](A,C A,G)\tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](C,E G,F)\tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](B,D)\tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](D,F)
\end{tikzpicture}
30.2.7 Example 3: John Kitzmiller
Prove that𝐵𝐶𝐶𝐷
=𝐴𝐵𝐴𝐷
(Angle Bisector).
𝐵 𝐶 𝐷
𝐴
𝑃
12
3
4
tkz-euclide AlterMundus
30 Some examples 146
\begin{tikzpicture}[scale=2]\tkzDefPoints{0/0/B, 5/0/D} \tkzDefPoint(70:3){A}\tkzDrawPolygon(B,D,A)\tkzDefLine[bisector](B,A,D) \tkzGetPoint{a}\tkzInterLL(A,a)(B,D) \tkzGetPoint{C}\tkzDefLine[parallel=through B](A,C) \tkzGetPoint{b}\tkzInterLL(A,D)(B,b) \tkzGetPoint{P}\begin{scope}[decoration={markings,mark=at position .5 with {\arrow[scale=2]{>}}}]\tkzDrawSegments[postaction={decorate},dashed](C,A P,B)\end{scope}\tkzDrawSegment(A,C) \tkzDrawSegment[style=dashed](A,P)\tkzLabelPoints[below](B,C,D) \tkzLabelPoints[above](A,P)\tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](B,C P,A)\tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](C,D A,D)\tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](A,B)\tkzMarkAngles[size=3mm](B,A,C C,A,D)\tkzMarkAngles[size=3mm](B,A,C A,B,P)\tkzMarkAngles[size=3mm](B,P,A C,A,D)\tkzMarkAngles[size=3mm](B,A,C A,B,P B,P,A C,A,D)\tkzFillAngles[fill=green, opacity=0.5](B,A,C A,B,P)\tkzFillAngles[fill=yellow, opacity=0.3](B,P,A C,A,D)\tkzFillAngles[fill=green, opacity=0.6](B,A,C A,B,P B,P,A C,A,D)\tkzLabelAngle[pos=1](B,A,C){1} \tkzLabelAngle[pos=1](C,A,D){2}\tkzLabelAngle[pos=1](A,B,P){3} \tkzLabelAngle[pos=1](B,P,A){4}\tkzMarkSegments[mark=|](A,B A,P)
\end{tikzpicture}
30.2.8 Example 4: author John Kitzmiller
Prove that 𝐴𝐺≅ 𝐸𝐹 (Detour).
𝐶 𝐷 𝐸
𝐺
𝐴 𝐵
𝐹
tkz-euclide AlterMundus
30 Some examples 147
\begin{tikzpicture}[scale=2]\tkzDefPoint(0,3){A} \tkzDefPoint(6,3){E} \tkzDefPoint(1.35,3){B}\tkzDefPoint(4.65,3){D} \tkzDefPoint(1,1){G} \tkzDefPoint(5,5){F}\tkzDefMidPoint(A,E) \tkzGetPoint{C}\tkzFillPolygon[yellow, opacity=0.4](B,G,C)\tkzFillPolygon[yellow, opacity=0.4](D,F,C)\tkzFillPolygon[blue, opacity=0.3](A,B,G)\tkzFillPolygon[blue, opacity=0.3](E,D,F)\tkzMarkAngles[size=0.5 cm](B,G,A D,F,E)\tkzMarkAngles[size=0.5 cm](B,C,G D,C,F)\tkzMarkAngles[size=0.5 cm](G,B,C F,D,C)\tkzMarkAngles[size=0.5 cm](A,B,G E,D,F)\tkzFillAngles[size=0.5 cm,fill=green](B,G,A D,F,E)\tkzFillAngles[size=0.5 cm,fill=orange](B,C,G D,C,F)\tkzFillAngles[size=0.5 cm,fill=yellow](G,B,C F,D,C)\tkzFillAngles[size=0.5 cm,fill=red](A,B,G E,D,F)\tkzMarkSegments[mark=|](B,C D,C) \tkzMarkSegments[mark=s||](G,C F,C)\tkzMarkSegments[mark=o](A,G E,F) \tkzMarkSegments[mark=s](B,G D,F)\tkzDrawSegment[color=red](A,E)\tkzDrawSegment[color=blue](F,G)\tkzDrawSegments(A,G G,B E,F F,D)\tkzLabelPoints[below](C,D,E,G) \tkzLabelPoints[above](A,B,F)
\end{tikzpicture}
30.2.9 Example 1: from Indonesia
𝐴
𝐷
𝐵
𝐶 𝐹
𝐻
𝐺
𝐸
tkz-euclide AlterMundus
30 Some examples 148
\begin{tikzpicture}[scale=3]\tkzDefPoints{0/0/A,2/0/B}\tkzDefSquare(A,B) \tkzGetPoints{C}{D}\tkzDefPointBy[rotation=center D angle 45](C)\tkzGetPoint{G}\tkzDefSquare(G,D)\tkzGetPoints{E}{F}\tkzInterLL(B,C)(E,F)\tkzGetPoint{H}\tkzFillPolygon[gray!10](D,E,H,C,D)\tkzDrawPolygon(A,...,D)\tkzDrawPolygon(D,...,G)\tkzDrawSegment(B,E)\tkzMarkSegments[mark=|,size=3pt,color=gray](A,B B,C C,D D,A E,F F,G G,D D,E)\tkzMarkSegments[mark=||,size=3pt,color=gray](B,E E,H)\tkzLabelPoints[left](A,D)\tkzLabelPoints[right](B,C,F,H)\tkzLabelPoints[above](G)\tkzLabelPoints[below](E)\tkzMarkRightAngles(D,A,B D,G,F)
\end{tikzpicture}
30.2.10 Example 2: from Indonesia
𝛼𝑂
𝐴 𝑆 𝐵
𝐻 𝑃 𝐺
𝑇
𝐸
𝐶
𝑄
𝑈
𝐷
𝑀𝐿
𝑁
𝐹
𝑅
𝐾
tkz-euclide AlterMundus
30 Some examples 149
\begin{tikzpicture}[pol/.style={fill=brown!40,opacity=.5},seg/.style={tkzdotted,color=gray},hidden pt/.style={fill=gray!40},mra/.style={color=gray!70,tkzdotted,/tkzrightangle/size=.2},scale=3]
\tkzSetUpPoint[size=2]\tkzDefPoints{0/0/A,2.5/0/B,1.33/0.75/D,0/2.5/E,2.5/2.5/F}\tkzDefLine[parallel=through D](A,B) \tkzGetPoint{I1}\tkzDefLine[parallel=through B](A,D) \tkzGetPoint{I2}\tkzInterLL(D,I1)(B,I2) \tkzGetPoint{C}\tkzDefLine[parallel=through E](A,D) \tkzGetPoint{I3}\tkzDefLine[parallel=through D](A,E) \tkzGetPoint{I4}\tkzInterLL(E,I3)(D,I4) \tkzGetPoint{H}\tkzDefLine[parallel=through F](E,H) \tkzGetPoint{I5}\tkzDefLine[parallel=through H](E,F) \tkzGetPoint{I6}\tkzInterLL(F,I5)(H,I6) \tkzGetPoint{G}\tkzDefMidPoint(G,H) \tkzGetPoint{P}\tkzDefMidPoint(G,C) \tkzGetPoint{Q}\tkzDefMidPoint(B,C) \tkzGetPoint{R}\tkzDefMidPoint(A,B) \tkzGetPoint{S}\tkzDefMidPoint(A,E) \tkzGetPoint{T}\tkzDefMidPoint(E,H) \tkzGetPoint{U}\tkzDefMidPoint(A,D) \tkzGetPoint{M}\tkzDefMidPoint(D,C) \tkzGetPoint{N}\tkzInterLL(B,D)(S,R) \tkzGetPoint{L}\tkzInterLL(H,F)(U,P) \tkzGetPoint{K}\tkzDefLine[parallel=through K](D,H) \tkzGetPoint{I7}\tkzInterLL(K,I7)(B,D) \tkzGetPoint{O}
\tkzFillPolygon[pol](P,Q,R,S,T,U)\tkzDrawSegments[seg](K,O K,L P,Q R,S T,U
C,D H,D A,D M,N B,D)\tkzDrawSegments(E,H B,C G,F G,H G,C Q,R S,T U,P H,F)\tkzDrawPolygon(A,B,F,E)\tkzDrawPoints(A,B,C,E,F,G,H,P,Q,R,S,T,U,K)\tkzDrawPoints[hidden pt](M,N,O,D)\tkzMarkRightAngle[mra](L,O,K)\tkzMarkSegments[mark=|,size=1pt,thick,color=gray](A,S B,S B,R C,R
Q,C Q,G G,P H,PE,U H,U E,T A,T)
\tkzLabelAngle[pos=.3](K,L,O){$\alpha$}\tkzLabelPoints[below](O,A,S,B)\tkzLabelPoints[above](H,P,G)\tkzLabelPoints[left](T,E)\tkzLabelPoints[right](C,Q)\tkzLabelPoints[above left](U,D,M)\tkzLabelPoints[above right](L,N)\tkzLabelPoints[below right](F,R)\tkzLabelPoints[below left](K)\end{tikzpicture}
tkz-euclide AlterMundus
30 Some examples 150
30.2.11 Three circles
tkz-euclide AlterMundus
30 Some examples 151
\begin{tikzpicture}[scale=1.5]\tkzDefPoints{0/0/A,8/0/B,0/4/a,8/4/b,8/8/c}\tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C}\tkzDrawPolygon(A,B,C)\tkzDefSquare(A,B) \tkzGetPoints{D}{E}\tkzClipBB\tkzDefMidPoint(A,B) \tkzGetPoint{M}\tkzDefMidPoint(B,C) \tkzGetPoint{N}\tkzDefMidPoint(A,C) \tkzGetPoint{P}\tkzDrawSemiCircle[gray,dashed](M,B)\tkzDrawSemiCircle[gray,dashed](A,M)\tkzDrawSemiCircle[gray,dashed](A,B)\tkzDrawCircle[gray,dashed](B,A)\tkzInterLL(A,N)(M,a) \tkzGetPoint{Ia}\tkzDefPointBy[projection = onto A--B](Ia)\tkzGetPoint{ha}\tkzDrawCircle[gray](Ia,ha)\tkzInterLL(B,P)(M,b) \tkzGetPoint{Ib}\tkzDefPointBy[projection = onto A--B](Ib)\tkzGetPoint{hb}\tkzDrawCircle[gray](Ib,hb)\tkzInterLL(A,c)(M,C) \tkzGetPoint{Ic}\tkzDefPointBy[projection = onto A--C](Ic)\tkzGetPoint{hc}\tkzDrawCircle[gray](Ic,hc)\tkzInterLL(A,Ia)(B,Ib) \tkzGetPoint{G}\tkzDrawCircle[gray,dashed](G,Ia)\tkzDrawPolySeg(A,E,D,B)\tkzDrawPoints(A,B,C)\tkzDrawPoints(G,Ia,Ib,Ic)\tkzDrawSegments[gray,dashed](C,M A,N B,P M,a M,b A,a a,b b,B A,D Ia,ha)
\end{tikzpicture}
tkz-euclide AlterMundus
30 Some examples 152
30.2.12 "The" Circle of APOLLONIUS
𝐴 𝐵
𝐶
𝑁
𝐽𝑎
𝐽𝑏
𝐽𝑐
𝑋𝑏
𝑋𝑐𝐵′
𝐶′
𝑍𝑎𝑍𝑏𝐵𝑎
𝐶𝑎
𝐵𝑐
𝐴𝑐
𝑄𝑆𝑝
𝐾 𝑂
tkz-euclide AlterMundus
30 Some examples 153
\begin{tikzpicture}[scale=.5]\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}\tkzDefTriangleCenter[euler](A,B,C) \tkzGetPoint{N}\tkzDefTriangleCenter[circum](A,B,C) \tkzGetPoint{O}\tkzDefTriangleCenter[lemoine](A,B,C) \tkzGetPoint{K}\tkzDefTriangleCenter[spieker](A,B,C) \tkzGetPoint{Sp}\tkzDefExCircle(A,B,C) \tkzGetPoint{Jb}\tkzDefExCircle(C,A,B) \tkzGetPoint{Ja}\tkzDefExCircle(B,C,A) \tkzGetPoint{Jc}\tkzDefPointBy[projection=onto B--C ](Jc) \tkzGetPoint{Xc}\tkzDefPointBy[projection=onto B--C ](Jb) \tkzGetPoint{Xb}\tkzDefPointBy[projection=onto A--B ](Ja) \tkzGetPoint{Za}\tkzDefPointBy[projection=onto A--B ](Jb) \tkzGetPoint{Zb}\tkzDefLine[parallel=through Xc](A,C) \tkzGetPoint{X'c}\tkzDefLine[parallel=through Xb](A,B) \tkzGetPoint{X'b}\tkzDefLine[parallel=through Za](C,A) \tkzGetPoint{Z'a}\tkzDefLine[parallel=through Zb](C,B) \tkzGetPoint{Z'b}\tkzInterLL(Xc,X'c)(A,B) \tkzGetPoint{B'}\tkzInterLL(Xb,X'b)(A,C) \tkzGetPoint{C'}\tkzInterLL(Za,Z'a)(C,B) \tkzGetPoint{A''}\tkzInterLL(Zb,Z'b)(C,A) \tkzGetPoint{B''}\tkzDefPointBy[reflection= over Jc--Jb](B') \tkzGetPoint{Ca}\tkzDefPointBy[reflection= over Jc--Jb](C') \tkzGetPoint{Ba}\tkzDefPointBy[reflection= over Ja--Jb](A'')\tkzGetPoint{Bc}\tkzDefPointBy[reflection= over Ja--Jb](B'')\tkzGetPoint{Ac}\tkzDefCircle[circum](Ac,Ca,Ba) \tkzGetPoint{Q}\tkzDrawCircle[circum](Ac,Ca,Ba)\tkzDefPointWith[linear,K=1.1](Q,Ac) \tkzGetPoint{nAc}\tkzClipCircle[through](Q,nAc)\tkzDrawLines[add=1.5 and 1.5,dashed](A,B B,C A,C)\tkzDrawPolygon[color=blue](A,B,C)\tkzDrawPolygon[dashed,color=blue](Ja,Jb,Jc)\tkzDrawCircles[ex](A,B,C B,C,A C,A,B)\tkzDrawLines[add=0 and 0,dashed](Ca,Bc B,Za A,Ba B',C')\tkzDrawLine[add=1 and 1,dashed](Xb,Xc)\tkzDrawLine[add=7 and 3,blue](O,K)\tkzDrawLine[add=8 and 15,red](N,Sp)\tkzDrawLines[add=10 and 10](K,O N,Sp)\tkzDrawSegments(Ba,Ca Bc,Ac)\tkzDrawPoints(A,B,C,N,Ja,Jb,Jc,Xb,Xc,B',C',Za,Zb,Ba,Ca,Bc,Ac,Q,Sp,K,O)\tkzLabelPoints(A,B,C,N,Ja,Jb,Jc,Xb,Xc,B',C',Za,Zb,Ba,Ca,Bc,Ac,Q,Sp)\tkzLabelPoints[above](K,O)\end{tikzpicture}
tkz-euclide AlterMundus
31 Customization 154
31 Customization
31.1 Use of \tkzSetUpLine
It is a macro that allows you to define the style of all the lines.
\tkzSetUpLine[⟨local options⟩]
options default definition
color black colour of the construction linesline width 0.4pt thickness of the construction linesstyle solid style of construction linesadd .2 and .2 changing the length of a line segment
31.1.1 Example 1: change line width
𝑎
𝑏𝑐
ℎ
𝐻
𝐵 𝐶
𝐴 \begin{tikzpicture}\tkzSetUpLine[color=blue,line width=1pt]
\begin{scope}[rotate=-90]\tkzDefPoint(10,6){C}\tkzDefPoint( 0,6){A}\tkzDefPoint(10,0){B}\tkzDefPointBy[projection = onto B--A](C)\tkzGetPoint{H}\tkzDrawPolygon(A,B,C)\tkzMarkRightAngle[size=.4,fill=blue!20](B,C,A)\tkzMarkRightAngle[size=.4,fill=red!20](B,H,C)\tkzDrawSegment[color=red](C,H)
\end{scope}\tkzLabelSegment[below](C,B){$a$}\tkzLabelSegment[right](A,C){$b$}\tkzLabelSegment[left](A,B){$c$}\tkzLabelSegment[color=red](C,H){$h$}\tkzDrawPoints(A,B,C)\tkzLabelPoints[above left](H)\tkzLabelPoints(B,C)\tkzLabelPoints[above](A)
\end{tikzpicture}
tkz-euclide AlterMundus
31 Customization 155
31.1.2 Example 2: change style of line
𝐴 𝐵
𝐶 𝐷
𝐸 𝐹
𝐴′ 𝐵′
𝐼
𝐽
\begin{tikzpicture}[scale=.6]\tkzDefPoint(1,0){A} \tkzDefPoint(4,0){B}\tkzDefPoint(1,1){C} \tkzDefPoint(5,1){D}\tkzDefPoint(1,2){E} \tkzDefPoint(6,2){F}\tkzDefPoint(0,4){A'}\tkzDefPoint(3,4){B'}\tkzCalcLength[cm](C,D) \tkzGetLength{rCD}\tkzCalcLength[cm](E,F) \tkzGetLength{rEF}\tkzInterCC[R](A',\rCD cm)(B',\rEF cm)\tkzGetPoints{I}{J}\tkzSetUpLine[style=dashed,color=gray]\tkzDrawLine(A',B')\tkzCompass(A',B')\tkzDrawSegments(A,B C,D E,F)\tkzDrawCircle[R](A',\rCD cm)\tkzDrawCircle[R](B',\rEF cm)\tkzSetUpLine[color=red]\tkzDrawSegments(A',I B',I)\tkzDrawPoints(A,B,C,D,E,F,A',B',I,J)\tkzLabelPoints(A,B,C,D,E,F,A',B',I,J)
\end{tikzpicture}
31.1.3 Example 3: extend lines
\begin{tikzpicture}\tkzSetUpLine[add=.5 and .5]\tkzDefPoints{0/0/A,4/0/B,1/3/C}\tkzDrawLines(A,B B,C A,C)\end{tikzpicture}
31.2 Points style
\tkzSetUpPoint[⟨local options⟩]
options default definition
color black point colorsize 3pt point sizefill black!50 inside point colorshape circle point shape circle or cross
tkz-euclide AlterMundus
31 Customization 156
31.2.1 Use of \tkzSetUpPoint
\begin{tikzpicture}\tkzSetUpPoint[shape = cross out,color=blue]\tkzInit[xmax=100,xstep=20,ymax=.5]\tkzDefPoint(20,1){A}\tkzDefPoint(80,0){B}\tkzDrawLine(A,B)\tkzDrawPoints(A,B)
\end{tikzpicture}
31.2.2 Use of \tkzSetUpPoint inside a group
𝐴
𝐵
𝐶
𝐷
\begin{tikzpicture}\tkzInit[ymin=-0.5,ymax=3,xmin=-0.5,xmax=7]\tkzDefPoint(0,0){A}\tkzDefPoint(02.25,04.25){B}\tkzDefPoint(4,0){C}\tkzDefPoint(3,2){D}\tkzDrawSegments(A,B A,C A,D)
{\tkzSetUpPoint[shape=cross out,fill= teal!50,size=4,color=teal]
\tkzDrawPoints(A,B)}\tkzSetUpPoint[fill= teal!50,size=4,
color=teal]\tkzDrawPoints(C,D)\tkzLabelPoints(A,B,C,D)
\end{tikzpicture}
31.3 Use of \tkzSetUpCompass
\tkzSetUpCompass[⟨local options⟩]
options default definition
color black color of construction arcsline width 0.4pt thickness of construction arcsstyle solid style of the building arcs
tkz-euclide AlterMundus
31 Customization 157
31.3.1 Use of \tkzSetUpCompass with bisector
𝐴
𝐵
𝐶 \begin{tikzpicture}[scale=0.75]\tkzDefPoints{0/1/A, 8/3/B, 3/6/C}\tkzDrawPolygon(A,B,C)\tkzSetUpCompass[color=red,line width=.2 pt]\tkzDefLine[bisector](A,C,B) \tkzGetPoint{c}\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a}\tkzDefLine[bisector](C,B,A) \tkzGetPoint{b}\tkzShowLine[bisector,size=2,gap=3](A,C,B)\tkzShowLine[bisector,size=2,gap=3](B,A,C)\tkzShowLine[bisector,size=1,gap=2](C,B,A)\tkzDrawLines[add=0 and 0 ](B,b)\tkzDrawLines[add=0 and -.4 ](A,a C,c)\tkzLabelPoints(A,B) \tkzLabelPoints[above](C)
\end{tikzpicture}
31.3.2 Another example of of\tkzSetUpCompass
𝐴
𝐵
𝐶
\begin{tikzpicture}[scale=1,rotate=90]\tkzDefPoints{0/1/A, 8/3/B, 3/6/C}\tkzDrawPolygon(A,B,C)\tkzSetUpCompass[color=brown,
line width=.3 pt,style=tkzdotted]\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a}\tkzDefLine[bisector](C,B,A) \tkzGetPoint{b}\tkzInterLL(A,a)(B,b) \tkzGetPoint{I}\tkzDefPointBy[projection= onto A--B](I)\tkzGetPoint{H}\tkzMarkRightAngle(I,H,A)\tkzDrawCircle[radius,color=red](I,H)\tkzDrawSegments[color=red](I,H)\tkzDrawLines[add=0 and -.5,,color=red](A,a)\tkzDrawLines[add=0 and 0,color=red](B,b)\tkzShowLine[bisector,size=2,gap=3](B,A,C)\tkzShowLine[bisector,size=1,gap=3](C,B,A)\tkzLabelPoints(A,B)\tkzLabelPoints[left](C)
\end{tikzpicture}
31.4 Own style
You can set the normal style with tkzSetUpPoint and your own style
𝑂
𝐴\tkzSetUpPoint[color=blue!50!white, fill=gray!20!red!50!white]\tikzset{/tikz/mystyle/.style={color=blue!20!black,fill=blue!20}}
\begin{tikzpicture}\tkzDefPoint(0,0){O}\tkzDefPoint(0,1){A}\tkzDrawPoints(O) % general style\tkzDrawPoints[mystyle,size=4](A) % my style\tkzLabelPoints(O,A)
\end{tikzpicture}
tkz-euclide AlterMundus
32 Summary of tkz-base 158
32 Summary of tkz-base
32.1 Utility of tkz-base
First of all, you don’t have to deal with TikZ the size of the bounding box. Early versions of tkz-euclide did notcontrol the size of the bounding box, now the size of the bounding box is limited.
However, it is sometimes necessary to control the size of what will be displayed. To do this, you need to haveprepared the bounding box you are going to work in, this is the role of tkz-base and its main macro \tkzInit. Itis recommended to leave the graphic unit equal to 1 cm. For some drawings, it is interesting to fix the extremevalues (xmin,xmax,ymin and ymax) and to ”clip” the definition rectangle in order to control the size of the figureas well as possible.
The two macros in tkz-base that are useful for tkz-euclide are:
– \tkzInit
– \tkzClip
To this, I added macros directly linked to the bounding box. You can now view it, backup it, restore it (see thedocumentation of tkz-base section Bounding Box).
32.2 \tkzInit and \tkzShowBB
The rectangle around the figure shows you the bounding box.
\begin{tikzpicture}\tkzInit[xmin=-1,xmax=3,ymin=-1, ymax=3]\tkzGrid\tkzShowBB[red,line width=2pt]
\end{tikzpicture}
32.3 \tkzClip
The role of this macro is to ”clip” the initial rectangle so that only the paths contained in this rectangle are drawn.
𝑥
𝑦
0 1 2 3 40
1
2
3
\begin{tikzpicture}\tkzInit[xmax=4, ymax=3]\tkzAxeXY\tkzGrid\tkzClip\draw[red] (-1,-1)--(5,2);
\end{tikzpicture}
It is possible to add a bit of space
tkz-euclide AlterMundus
32 Summary of tkz-base 159
\tkzClip[space=1]
32.4 \tkzClip and the option space
This option allows you to add some space around the ”clipped” rectangle.
𝑥
𝑦
0 1 2 3 40
1
2
3
\begin{tikzpicture}\tkzInit[xmax=4, ymax=3]\tkzAxeXY\tkzGrid\tkzClip[space=1]\draw[red] (-1,-1)--(5,2);
\end{tikzpicture}
The dimensions of the ”clipped” rectangle are xmin-1, ymin-1, xmax+1 and ymax+1.
tkz-euclide AlterMundus
33 FAQ 160
33 FAQ
33.1 Most common errors
For the moment, I’m basing myself on my own, because having changed syntax several times, I’ve made a numberof mistakes. This section is going to be expanded.
– \tkzDrawPoint(A,B) when you need \tkzDrawPoints.
– \tkzGetPoint(A)When defining an object, use braces and not brackets, so write: \tkzGetPoint{A}.
– \tkzGetPoint{A} in place of \tkzGetFirstPoint{A}. When a macro gives two points as results, ei-ther we retrieve these points using \tkzGetPoints{A}{B}, or we retrieve only one of the two points,using \tkzGetFirstPoint{A} or \tkzGetSecondPoint{A}. These two points can be used with the ref-erence tkzFirstPointResult or tkzSecondPointResult. It is possible that a third point is given astkzPointResult.
– \tkzDrawSegment(A,B A,C) when you need \tkzDrawSegments. It is possible to use only the versionswith an ”s” but it is less efficient!
– Mixing options and arguments; all macros that use a circle need to know the radius of the circle. If the radiusis given by a measure then the option includes a R.
– \tkzDrawSegments[color = gray,style=dashed]{B,B' C,C'} is a mistake. Only macros that definean object use braces.
– The angles are given in degrees, more rarely in radians.
– If an error occurs in a calculation when passing parameters, then it is better to make these calculationsbefore calling the macro.
– Do not mix the syntax of pgfmath and xfp. I’ve often chosen xfp but if you prefer pgfmath then do yourcalculations before passing parameters.
– Use of \tkzClip: In order to get accurate results, I avoided using normalized vectors. The advantage ofnormalization is to control the dimension of the manipulated objects, the disadvantage is that with TeX,this implies inaccuracies. These inaccuracies are often small, in the order of a thousandth, but they lead todisasters if the drawing is enlarged. Not normalizing implies that some points are far away from the workingarea and \tkzClip allows you to reduce the size of the drawing.
– An error occurs if you use the macro \tkzDrawAngle with too small an angle. The error is produced by thedecoration library when you want to place a mark on an arc. Even if the mark is absent, the error is stillpresent. It is possible to get around this difficulty with the option mkpos=.2 for example, which will placethe mark before the arc. Another possibility is to use the macro \tkzFillAngle.
tkz-euclide AlterMundus
Index
\add, 57\ang, 104\Ax, 122\Ay, 122
\coordinate, 18
\dAB, 120\Delta, 56\draw (A)--(B);, 57
Environmentscope, 20
\fpeval, 92
\len, 121
\newdimen, 93
Operating SystemWindows, 14
Packagefp, 14, 16numprint, 14pgfmath, 19, 154tikz 3.00, 14tkz-base, 14, 17, 22, 152tkz-euclide, 14, 152xfp, 14, 16, 18, 19, 92, 120, 154
\pgflinewidth, 29, 30\pgfmathsetmacro, 92\px, 122\py, 122
\slope, 107standalone, 12
TeX DistributionsMiKTeX, 14TeXLive, 14
TikZ Libraryangles, 16babel, 8decoration, 154quotes, 16
\tkzAngleResult, 104, 105, 108\tkzCalcLength, 120\tkzCalcLength: arguments
(pt1,pt2){name of macro}, 120\tkzCalcLength: options
cm, 120\tkzCalcLength[⟨local options⟩](⟨pt1,pt2⟩){⟨name of macro⟩}, 120\tkzCentroid, 23\tkzClip, 8, 16, 152–154\tkzClipBB, 16\tkzClipCircle, 79, 84, 88\tkzClipCircle: arguments
(⟨A,B⟩) or (⟨A,r⟩), 88
Index 162
\tkzClipCircle: optionsR, 88radius, 88
\tkzClipCircle[⟨local options⟩](⟨A,B⟩) or (⟨A,r⟩), 88\tkzClipPolygon, 76\tkzClipPolygon: arguments
(⟨pt1,pt2⟩), 76\tkzClipPolygon[⟨local options⟩](⟨points list⟩), 76\tkzClipSector(O,A)(B), 113\tkzClipSector[R](O,2 cm)(30,90), 113\tkzClipSector[rotate](O,A)(90), 113\tkzClipSector, 113, 114\tkzClipSector: options
R, 113rotate, 113towards, 113
\tkzClipSector[⟨local options⟩](⟨O,…⟩)(⟨…⟩), 113\tkzcmtopt, 121\tkzcmtopt: arguments
(nombre){name of macro}, 121\tkzcmtopt(⟨nombre⟩){⟨name of macro⟩}, 121\tkzCompass, 117, 124\tkzCompass: options
delta, 124length, 124
\tkzCompasss, 124\tkzCompasss: options
delta, 124length, 124
\tkzCompasss[⟨local options⟩](⟨pt1,pt2 pt3,pt4,…⟩), 124\tkzCompass[⟨local options⟩](⟨A,B⟩), 124\tkzDefBarycentricPoint, 23\tkzDefBarycentricPoint: arguments
(pt1=𝛼1,pt2=𝛼2,…), 23\tkzDefBarycentricPoint(⟨pt1=𝛼1,pt2=𝛼2,…⟩), 23\tkzDefCircle[radius](A,B), 122\tkzDefCircle, 79\tkzDefCircle: arguments
(⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩), 79\tkzDefCircle: options
K, 79apollonius, 79circum, 79diameter, 79euler or nine, 79ex, 79in, 79orthogonal through, 79orthogonal, 79spieker, 79through, 79
\tkzDefCircle[⟨local options⟩](⟨A,B⟩) or (⟨A,B,C⟩), 79\tkzDefEquiPoints, 129\tkzDefEquiPoints: arguments
(pt1,pt2), 129\tkzDefEquiPoints: options
/compass/delta, 129dist, 129from=pt, 129show, 129
\tkzDefEquiPoints[⟨local options⟩](⟨pt1,pt2⟩), 129
tkz-euclide AlterMundus
Index 163
\tkzDefGoldRectangle, 74\tkzDefGoldRectangle: arguments
(⟨pt1,pt2⟩), 74\tkzDefGoldRectangle(⟨point,point⟩), 74\tkzDefLine, 49\tkzDefLine: arguments
(⟨pt1,pt2,pt3⟩), 49(⟨pt1,pt2⟩), 49
\tkzDefLine: optionsK, 49bisector out, 49bisector, 49mediator, 49normed, 49orthogonal=through…, 49parallel=through…, 49perpendicular=through…, 49
\tkzDefLine[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩), 49\tkzDefMidPoint, 22\tkzDefMidPoint: arguments
(pt1,pt2), 22\tkzDefMidPoint(⟨pt1,pt2⟩), 22\tkzDefParallelogram, 72\tkzDefParallelogram: arguments
(⟨pt1,pt2,pt3⟩), 72\tkzDefParallelogram(⟨pt1,pt2,pt3⟩), 72\tkzDefPoint, 18, 19, 22, 90\tkzDefPoint: arguments
(𝛼:𝑑), 18(𝑥,𝑦), 18{name}, 18
\tkzDefPoint: optionslabel, 19shift, 19
\tkzDefPointBy, 33\tkzDefPointBy: arguments
pt, 33\tkzDefPointBy: options
homothety, 33inversion, 33projection , 33reflection, 33rotation in rad, 33rotation , 33symmetry , 33translation, 33
\tkzDefPointBy[⟨local options⟩](⟨pt⟩), 33\tkzDefPointOnCircle, 31\tkzDefPointOnCircle: options
angle, 31center, 31radius, 31
\tkzDefPointOnCircle[⟨local options⟩], 31\tkzDefPointOnLine, 31\tkzDefPointOnLine: arguments
pt1,pt2, 31\tkzDefPointOnLine: options
pos=nb, 31\tkzDefPointOnLine[⟨local options⟩](⟨A,B⟩), 31\tkzDefPoints{0/0/O,2/2/A}, 21\tkzDefPoints, 21
tkz-euclide AlterMundus
Index 164
\tkzDefPoints: arguments𝑥𝑖/𝑦𝑖/𝑛𝑖, 21
\tkzDefPoints: optionsshift, 21
\tkzDefPointsBy, 33, 38, 39\tkzDefPointsBy: arguments
(⟨list of points⟩){⟨list of pts⟩}, 39\tkzDefPointsBy: options
homothety = center #1 ratio #2, 39projection = onto #1--#2, 39reflection = over #1--#2, 39rotation = center #1 angle #2, 39rotation in rad = center #1 angle #2, 39symmetry = center #1, 39translation = from #1 to #2, 39
\tkzDefPointsBy[⟨local options⟩](⟨list of points⟩){⟨list of points⟩}, 39\tkzDefPoints[⟨local options⟩]{⟨𝑥1/𝑦1/𝑛1,𝑥2/𝑦2/𝑛2, ...⟩}, 21\tkzDefPointWith, 40\tkzDefPointWith: arguments
(pt1,pt2), 40\tkzDefPointWith: options
K, 40colinear normed= at #1, 40colinear= at #1, 40linear normed, 40linear, 40orthogonal normed, 40orthogonal, 40
\tkzDefPointWith(⟨pt1,pt2⟩), 40\tkzDefPoint[⟨local options⟩](⟨𝑥,𝑦⟩){⟨name⟩} or (⟨𝛼:𝑑⟩){⟨name⟩}, 18\tkzDefRandPointOn, 16, 45\tkzDefRandPointOn: options
circle =center pt1 radius dim, 45circle through=center pt1 through pt2, 45disk through=center pt1 through pt2, 45line=pt1--pt2, 45rectangle=pt1 and pt2, 45segment= pt1--pt2, 45
\tkzDefRandPointOn[⟨local options⟩], 45\tkzDefRegPolygon, 78\tkzDefRegPolygon: arguments
(⟨pt1,pt2⟩), 78\tkzDefRegPolygon: options
Options TikZ, 78center, 78name, 78sides, 78side, 78
\tkzDefRegPolygon[⟨local options⟩](⟨pt1,pt2⟩), 78\tkzDefShiftPoint, 20\tkzDefShiftPoint: arguments
(𝛼:𝑑), 20(𝑥,𝑦), 20
\tkzDefShiftPoint: options[pt], 20
\tkzDefShiftPoint[⟨Point⟩](⟨𝑥,𝑦⟩){⟨name⟩} or (⟨𝛼:𝑑⟩){⟨name⟩}, 20\tkzDefSpcTriangle, 66\tkzDefSpcTriangle: options
centroid or medial, 66euler, 66ex or excentral, 66
tkz-euclide AlterMundus
Index 165
extouch, 66feuerbach, 66in or incentral, 66intouch or contact, 66name, 66orthic, 66tangential, 66
\tkzDefSpcTriangle[⟨local options⟩](⟨A,B,C⟩), 66\tkzDefSquare, 71, 72\tkzDefSquare: arguments
(⟨pt1,pt2⟩), 71\tkzDefSquare(⟨pt1,pt2⟩), 71\tkzDefTangent, 52\tkzDefTangent: arguments
(⟨pt1,pt2 or (⟨pt1,dim⟩)⟩) , 52\tkzDefTangent: options
at=pt, 52from with R=pt, 52from=pt, 52
\tkzDefTangent[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,dim⟩), 52\tkzDefTriangle, 63\tkzDefTriangle: options
cheops, 63equilateral, 63euclide, 63golden, 63gold, 63pythagore, 63school, 63two angles= #1 and #2, 63
\tkzDefTriangleCenter, 25\tkzDefTriangleCenter: arguments
(pt1,pt2,pt3), 25\tkzDefTriangleCenter: options
centroid, 25circum, 25euler, 25ex, 25feuerbach, 25in, 25mittenpunkt, 25nagel, 25ortho, 25spieker, 25symmedian, 25
\tkzDefTriangleCenter[⟨local options⟩](⟨A,B,C⟩), 25\tkzDefTriangle[⟨local options⟩](⟨A,B⟩), 63\tkzDrawAngle, 154\tkzDrawArc[angles](O,A)(0,90), 115\tkzDrawArc[delta=10](O,A)(B), 115\tkzDrawArc[R with nodes](O,2 cm)(A,B), 115\tkzDrawArc[R](O,2 cm)(30,90), 115\tkzDrawArc[rotate,color=red](O,A)(90), 115\tkzDrawArc, 115\tkzDrawArc: options
R with nodes, 115R, 115angles, 115delta, 115rotate, 115towards, 115
tkz-euclide AlterMundus
Index 166
\tkzDrawArc[⟨local options⟩](⟨O,…⟩)(⟨…⟩), 115\tkzDrawCircle, 79, 83, 84\tkzDrawCircle: arguments
(⟨pt1,pt2⟩), 84\tkzDrawCircle: options
R, 84diameter, 84through, 84
\tkzDrawCircles, 84\tkzDrawCircles: arguments
(⟨pt1,pt2 pt3,pt4 ...⟩), 85\tkzDrawCircles: options
R, 85diameter, 85through, 85
\tkzDrawCircles[⟨local options⟩](⟨A,B C,D⟩), 84\tkzDrawCircle[⟨local options⟩](⟨A,B⟩), 84\tkzDrawGoldRectangle, 74\tkzDrawGoldRectangle: arguments
(⟨pt1,pt2⟩), 74\tkzDrawGoldRectangle: options
Options TikZ, 74\tkzDrawGoldRectangle[⟨local options⟩](⟨point,point⟩), 74\tkzDrawLine, 54\tkzDrawLine: options
add= nb1 and nb2, 54altitude, 54bisector, 54median, 54none, 54
\tkzDrawLines, 55\tkzDrawLines[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩), 55\tkzDrawLine[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩), 54\tkzDrawMedian, 54\tkzDrawPoint(A,B), 154\tkzDrawPoint, 29\tkzDrawPoint: arguments
name of point, 29\tkzDrawPoint: options
color, 29shape, 29size, 29
\tkzDrawPoints(A,B,C), 30\tkzDrawPoints, 30, 154\tkzDrawPoints: arguments
points list, 30\tkzDrawPoints: options
color, 30shape, 30size, 30
\tkzDrawPoints[⟨local options⟩](⟨liste⟩), 30\tkzDrawPoint[⟨local options⟩](⟨name⟩), 29\tkzDrawPolygon, 75\tkzDrawPolygon: arguments
(⟨pt1,pt2,pt3,...⟩), 75\tkzDrawPolygon: options
Options TikZ, 75\tkzDrawPolygon[⟨local options⟩](⟨points list⟩), 75\tkzDrawPolySeg, 75\tkzDrawPolySeg: arguments
(⟨pt1,pt2,pt3,...⟩), 75
tkz-euclide AlterMundus
Index 167
\tkzDrawPolySeg: optionsOptions TikZ, 75
\tkzDrawPolySeg[⟨local options⟩](⟨points list⟩), 75\tkzDrawSector(O,A)(B), 110\tkzDrawSector[R with nodes](O,2 cm)(A,B), 110\tkzDrawSector[R,color=blue](O,2 cm)(30,90), 110\tkzDrawSector[rotate,color=red](O,A)(90), 110\tkzDrawSector, 110–112\tkzDrawSector: options
R with nodes, 110R, 110rotate, 110towards, 110
\tkzDrawSector[⟨local options⟩](⟨O,…⟩)(⟨…⟩), 110\tkzDrawSegment(A,B A,C), 154\tkzDrawSegment, 16, 57\tkzDrawSegment: arguments
(pt1,pt2), 57\tkzDrawSegment: options
TikZ options, 57…, 57add, 57dim, 57
\tkzDrawSegments[color = gray,style=dashed]{B,B' C,C'}, 154\tkzDrawSegments, 59, 154\tkzDrawSegments[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩), 59\tkzDrawSegment[⟨local options⟩](⟨pt1,pt2⟩), 57\tkzDrawSemiCircle, 86, 87\tkzDrawSemiCircle: arguments
(⟨pt1,pt2⟩), 86\tkzDrawSemiCircle: options
diameter, 87through, 87
\tkzDrawSemiCircle[⟨local options⟩](⟨A,B⟩), 86\tkzDrawSquare, 73\tkzDrawSquare: arguments
(⟨pt1,pt2⟩), 73\tkzDrawSquare: options
Options TikZ, 73\tkzDrawSquare[⟨local options⟩](⟨pt1,pt2⟩), 73\tkzDrawTriangle, 65\tkzDrawTriangle: options
cheops, 65equilateral, 65euclide, 65golden, 65gold, 65pythagore, 65school, 65two angles= #1 and #2, 65
\tkzDrawTriangle[⟨local options⟩](⟨A,B⟩), 65\tkzDuplicateLen, 119\tkzDuplicateLength, 119\tkzDuplicateSegment, 119, 120\tkzDuplicateSegment: arguments
(pt1,pt2)(pt3,pt4){pt5}, 119\tkzDuplicateSegment(⟨pt1,pt2⟩)(⟨pt3,pt4⟩){⟨pt5⟩}, 119\tkzFillAngle, 97, 136, 154\tkzFillAngle: options
size, 97\tkzFillAngles, 98
tkz-euclide AlterMundus
Index 168
\tkzFillAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc., 98\tkzFillAngle[⟨local options⟩](⟨A,O,B⟩), 97\tkzFillCircle, 79, 84, 87\tkzFillCircle: options
R, 87radius, 87
\tkzFillCircle[⟨local options⟩](⟨A,B⟩), 87\tkzFillPolygon, 77\tkzFillPolygon: arguments
(⟨pt1,pt2,…⟩), 77\tkzFillPolygon[⟨local options⟩](⟨points list⟩), 77\tkzFillSector(O,A)(B), 112\tkzFillSector[R with nodes](O,2 cm)(A,B), 112\tkzFillSector[R,color=blue](O,2 cm)(30,90), 112\tkzFillSector[rotate,color=red](O,A)(90), 112\tkzFillSector, 112, 113\tkzFillSector: options
R with nodes, 112R, 112rotate, 112towards, 112
\tkzFillSector[⟨local options⟩](⟨O,…⟩)(⟨…⟩), 112\tkzFindAngle, 105, 106\tkzFindAngle: arguments
(pt1,pt2,pt3), 105\tkzFindAngle(⟨pt1,pt2,pt3⟩), 105\tkzFindSlope, 107\tkzFindSlope: arguments
(pt1,pt2)pt3, 107\tkzFindSlopeAngle, 108, 109\tkzFindSlopeAngle: arguments
(pt1,pt2), 108\tkzFindSlopeAngle(⟨A,B⟩), 108\tkzFindSlope(⟨pt1,pt2⟩){⟨name of macro⟩}, 107\tkzGetAngle, 104, 105, 108\tkzGetAngle: arguments
name of macro, 104\tkzGetAngle(⟨name of macro⟩), 104\tkzGetFirstPoint{A}, 154\tkzGetFirstPoint{Jb}, 82\tkzGetFirstPoint, 71\tkzGetFirstPointI, 80\tkzGetLength, 79, 122\tkzGetPoint(A), 154\tkzGetPoint{A}, 154\tkzGetPoint{C}, 40\tkzGetPoint{M}, 33\tkzGetPoint, 16, 22, 25–27, 40, 45, 49, 63, 66, 72, 79\tkzGetPointCoord, 122, 123\tkzGetPointCoord: arguments
(point){name of macro}, 122\tkzGetPointCoord(⟨𝐴⟩){⟨name of macro⟩}, 122\tkzGetPoints{A}{B}, 154\tkzGetPoints{C}{D}, 73\tkzGetPoints, 49, 71, 74\tkzGetRandPointOn, 16, 45\tkzGetSecondPoint{A}, 154\tkzGetSecondPoint{Tb}, 82\tkzGetSecondPoint, 71\tkzGetSecondPointIb, 80\tkzGetVectxy, 44
tkz-euclide AlterMundus
Index 169
\tkzGetVectxy: arguments(point){name of macro}, 44
\tkzGetVectxy(⟨𝐴,𝐵⟩){⟨text⟩}, 44\tkzInit, 8, 16, 17, 152\tkzInterCC, 94\tkzInterCC: options
N, 94R, 94with nodes, 94
\tkzInterCCN, 94\tkzInterCCR, 94\tkzInterCC[⟨options⟩](⟨𝑂,𝐴⟩)(⟨𝑂′,𝐴′⟩) or (⟨𝑂,𝑟⟩)(⟨𝑂′, 𝑟′⟩) or (⟨𝑂,𝐴,𝐵⟩) (⟨𝑂′,𝐶,𝐷⟩), 94\tkzInterLC, 90\tkzInterLC: options
N, 90R, 90with nodes, 90
\tkzInterLC[⟨options⟩](⟨𝐴,𝐵⟩)(⟨𝑂,𝐶⟩) or (⟨𝑂,𝑟⟩) or (⟨𝑂,𝐶,𝐷⟩), 90\tkzInterLL, 90\tkzInterLL(⟨𝐴,𝐵⟩)(⟨𝐶,𝐷⟩), 90\tkzLabelAngle, 101\tkzLabelAngle: options
pos, 101\tkzLabelAngles, 102\tkzLabelAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc., 102\tkzLabelAngle[⟨local options⟩](⟨A,O,B⟩), 101\tkzLabelCircle, 79, 84, 89\tkzLabelCircle: options
R, 89radius, 89
\tkzLabelCircle[⟨local options⟩](⟨A,B⟩)(⟨angle⟩){⟨label⟩}, 89\tkzLabelLine(A,B), 56\tkzLabelLine, 16, 56, 57\tkzLabelLine: arguments
label, 56\tkzLabelLine: options
pos, 56\tkzLabelLine[⟨local options⟩](⟨pt1,pt2⟩){⟨label⟩}, 56\tkzLabelSegment(A,B){5}, 61\tkzLabelSegment, 61\tkzLabelSegment: arguments
(pt1,pt2), 61label, 61
\tkzLabelSegment: optionspos, 61
\tkzLabelSegments, 62\tkzLabelSegments[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩), 62\tkzLabelSegment[⟨local options⟩](⟨pt1,pt2⟩){⟨label⟩}, 61\tkzLength, 93\tkzMarkAngle, 100, 136\tkzMarkAngle: options
arc, 100mark, 100mkcolor, 100mkpos, 100mksize, 100size, 100
\tkzMarkAngles, 101\tkzMarkAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc., 101\tkzMarkAngle[⟨local options⟩](⟨A,O,B⟩), 100\tkzMarkRightAngle, 102
tkz-euclide AlterMundus
Index 170
\tkzMarkRightAngle: optionsgerman, 102size, 102
\tkzMarkRightAngles, 104\tkzMarkRightAngles[⟨local options⟩](⟨A,O,B⟩)(⟨A',O',B'⟩)etc., 104\tkzMarkRightAngle[⟨local options⟩](⟨A,O,B⟩), 102\tkzMarkSegment, 59\tkzMarkSegment: options
color, 59mark, 59pos, 59size, 59
\tkzMarkSegments, 60\tkzMarkSegments[⟨local options⟩](⟨pt1,pt2 pt3,pt4 ...⟩), 60\tkzMarkSegment[⟨local options⟩](⟨pt1,pt2⟩), 59\tkzProtractor, 130\tkzProtractor: options
lw, 130return, 130scale, 130
\tkzProtractor[⟨local options⟩](⟨𝑂,𝐴⟩), 130\tkzpttocm, 121\tkzpttocm: arguments
(number)name of macro, 121\tkzpttocm(⟨nombre⟩){⟨name of macro⟩}, 121\tkzSaveBB, 16\tkzSetUpCompass, 125, 150, 151\tkzSetUpCompass: options
color, 125, 150line width, 125, 150style, 125, 150
\tkzSetUpCompass[⟨local options⟩], 125, 150\tkzSetUpLine, 148\tkzSetUpLine: options
add, 148color, 148line width, 148style, 148
\tkzSetUpLine[⟨local options⟩], 148\tkzSetUpPoint, 149, 150\tkzSetUpPoint: options
color, 149fill, 149shape, 149size, 149
\tkzSetUpPoint[⟨local options⟩], 149\tkzShowBB, 152\tkzShowLine, 126, 127\tkzShowLine: options
K, 126bisector, 126gap, 126length, 126mediator, 126orthogonal, 126perpendicular, 126ratio, 126size, 126
\tkzShowLine[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩), 126\tkzShowTransformation, 127, 128\tkzShowTransformation: options
tkz-euclide AlterMundus
Index 171
K, 127gap, 127length, 127projection=onto pt1--pt2, 127ratio, 127reflection= over pt1--pt2, 127size, 127symmetry=center pt, 127translation=from pt1 to pt2, 127
\tkzShowTransformation[⟨local options⟩](⟨pt1,pt2⟩) or (⟨pt1,pt2,pt3⟩), 127\tkzTangent, 52
\usetkzobj{all}, 16\usetkztool, 16
\Vx, 44\Vy, 44
tkz-euclide AlterMundus