summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/examples/tkz-elements-demo_1.tex
blob: faa0ef52bbe4aaba46e05d07f7419333ed7613e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% !TEX TS-program = lualatex
% Author Alain Matthes 2023
\documentclass{article}
\usepackage{tkz-euclide}
\usepackage{tkz-elements}
\begin{document}

\begin{tkzelements}
   z.A      = point: new (0 , 0)
   z.B      = point: new (10 , 0)
   L.AB     = line:  new ( z.A, z.B)
   z.C      = L.AB:  gold_ratio () 
   L.AC     = line:  new ( z.A, z.C)
   L.CB     = line:  new ( z.C, z.B)
   L.AB     = line:  new ( z.A, z.B)
   z.O_0    = L.AB.mid
   z.O_1    = L.AC.mid
   z.O_2    = L.CB.mid
   C.AB     = circle: new ( z.O_0, z.B) 
   C.AC     = circle: new ( z.O_1, z.C) 
   C.CB     = circle: new ( z.O_2, z.B)
   z.P      = C.CB.north  
   z.Q      = C.AC.north
   z.O      = C.AB.south
   z.c      = z.C : north (2)
   C.PC     = circle: new ( z.P, z.C) 
   C.QA     = circle: new ( z.Q, z.A)  
   z.P_0    = intersection (C.PC,C.AB)
   z.P_1    = intersection (C.PC,C.AC)
   _,z.P_2  = intersection (C.QA,C.CB)
   T        = triangle: new ( z.P_0, z.P_1, z.P_2)
   z.O_3    = T.circumcenter
\end{tkzelements}

\begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawCircle[black,fill=yellow!20,opacity=.4](O_0,B)
  \tkzDrawCircles[teal,fill=teal!40,opacity=.6](O_1,C O_2,B)
  \tkzDrawCircle[purple,fill=purple!20,opacity=.4](O_3,P_0)
  \tkzDrawArc[cyan,delta=10](Q,A)(P_0)
  \tkzDrawArc[cyan,delta=10](P,P_0)(B)
  \tkzDrawArc[cyan,delta=10](O,B)(A)
  \tkzDrawPoints(A,B,C,O_0,O_1,O_2,P,Q,P_0,P_0,P_1,P_2,O)
  \tkzLabelPoints(A,B,C,O_0,O_1,O_2,P,Q,P_0,P_0,P_1,P_2,O)
\end{tikzpicture}
\end{document}