diff options
author | Karl Berry <karl@freefriends.org> | 2024-11-24 20:52:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-11-24 20:52:59 +0000 |
commit | eca48fdbc81c7934d254fa3cb85f4ce843c2de2b (patch) | |
tree | 97c02bb5ec323d36490c196c9ae380e3fbcd57ed /Master/texmf-dist | |
parent | 4f1e514c28c47f85c88e23dc7b2a904f1e275ac2 (diff) |
tkz-elements (24nov24)
git-svn-id: svn://tug.org/texlive/trunk@72955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
52 files changed, 2093 insertions, 1206 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-elements/README.md b/Master/texmf-dist/doc/latex/tkz-elements/README.md index 66c11bf62fe..3c53ea16eb2 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/README.md +++ b/Master/texmf-dist/doc/latex/tkz-elements/README.md @@ -1,10 +1,10 @@ # tkz-elements — for euclidean geometry -Release 2.30c 2024/07/16 +Release 3.00c 2024/11/23 ## Description -`tkz-elements v.2.30c` is the new version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with `LuaLaTeX`. With `tkz-elements`, the definitions and calculations are only done with `Lua`. +`tkz-elements v.3.00c` is the new version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with `LuaLaTeX`. With `tkz-elements`, the definitions and calculations are only done with `Lua`. The main possibility of programmation proposed is oriented "object programming" with object classes like point, line, triangle, circle and ellipse. For the moment, once the calculations are done, it is `tkz-euclide` or `TikZ` which allows the drawings. You can use the option `mini` with `tkz-euclide` to load only the modules required for tracing. @@ -43,9 +43,9 @@ your LaTeX document: \usepackage[mini]{tkz-euclide} \usepackage{tkz-elements} \begin{document} -\begin{tkzelements} +\directlua{ your code -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes your code @@ -62,14 +62,17 @@ An important example `Golden Arbelos` using the package is on the site. All the are on the site. ## History - - - version 2.30c - - new version of the macro `\tkzGetNodes` written by Sanskar Singh. This version now fixes a bug that prevented a figure from being centred with `centering` or the `center` environment. - - adding methods `bevan_circle`, `symmedial_circle`. - - correction of the methods `function triangle: bevan_point ()` and `function triangle: mittenpunkt_point ()`. - - adding `function triangle: similar ()` - - adding `function line : perpendicular_bisector ()` which is similar to `function line : mediator ()` - - correction of documentation. + - version 3.00c + - It is now possible to use the `directlua` primitive to perform `lua` code. In this case, tables and scaling can be reset using the `init_elements` function. You can still use the `tkzelements` environment, but only if you load the `luacode` package. + - Examples have been added to the `transfers` section. + + - version 2.30c + - New version of the macro `\tkzGetNodes` written by Sanskar Singh. This version now fixes a bug that prevented a figure from being centred with `centering` or the `center` environment. + - Adding methods `bevan_circle`, `symmedial_circle`. + - Correction of the methods `function triangle: bevan_point ()` and `function triangle: mittenpunkt_point ()`. + - Adding `function triangle: similar ()` + - Adding `function line : perpendicular_bisector ()` which is similar to `function line : mediator ()` + - Correction of documentation. - version 2.25c - French documentation at my site: [http://altermundus.fr](http://altermundus.fr) @@ -77,7 +80,7 @@ are on the site. - Added `cevian`, `pedal`, `conway_circle`, `conway_points` new methods to the class `triangle`. - version 2.20c - - Package: + - Package: - Added class matrix; methods are mainly of order 2, sometimes of order 3. - Added function solve_quadratic. This function can be used to solve second-degree equations with real or complex numbers. - Added method print for the class point. Example z.A : print () diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-circle.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-circle.tex index 85e73595189..2d5665f879b 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-circle.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-circle.tex @@ -38,7 +38,8 @@ Three attributes are used (south, west, radius). \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.a = point: new (1, 1) z.b = point: new (5, 4) @@ -48,7 +49,7 @@ Three attributes are used (south, west, radius). r = C.ab.radius z.c = C.ab.opp z.r,z.t = get_points (C.ab.ct : ortho_from (z.b)) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(a,b,c,s,w) @@ -60,7 +61,8 @@ Three attributes are used (south, west, radius). \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.a = point: new (1, 1) z.b = point: new (5, 4) @@ -70,16 +72,16 @@ Three attributes are used (south, west, radius). r = C.ab.radius z.c = C.ab.opp z.r,z.t = get_points (C.ab.ct : ortho_from (z.b)) -\end{tkzelements} +} -\emph{\begin{tikzpicture} +\hfill\begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(a,b,c,s,w) \tkzLabelPoints(a,b,c,s,w) \tkzDrawCircle(a,b) \tkzDrawSegments(a,b r,t b,c) \tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}} -\end{tikzpicture}} +\end{tikzpicture} \end{minipage} % subsubsection example_circle_attributes (end) @@ -127,7 +129,7 @@ Three attributes are used (south, west, radius). \midrule \textbf{Miscellaneous} &&\\ \midrule -\Imeth{circle}{power (pt)} &| r = C.OA: power (z.M)| & [\ref{par:power_v1} ; \ref{par:power_v2} ; \ref{sub:apollonius_circle_v1_with_inversion} ] \\ +\Imeth{circle}{power (pt)} &| r = C.OA: power (z.M)| & [\ref{ssub:power_v1} ; \ref{ssub:power_v2} ; \ref{sub:apollonius_circle_v1_with_inversion} ] \\ \Imeth{circle}{in\_out (pt)} & |C.OA : in_out (z.M)| & [\ref{ssub:in_out_for_circle_and_disk}] \\ \Imeth{circle}{in\_out\_disk (pt)} & |C.OA : in_out_disk (z.M)| & [\ref{ssub:in_out_for_circle_and_disk}] \\ \Imeth{circle}{draw ()} & for further use &\\ @@ -145,11 +147,12 @@ A circle is defined by its centre and a point through which it passes. \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (2,1) C = circle: new (z.O , z.A) -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawCircles(O,A) @@ -159,11 +162,12 @@ C = circle: new (z.O , z.A) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (2,1) C = circle: new (z.O , z.A) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -186,12 +190,13 @@ We define a circle with its centre and radius. \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (2,1) C = circle: radius (z.A , math.sqrt(5)) z.T = C.through -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawCircles(A,T) @@ -201,12 +206,13 @@ z.T = C.through \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (2,1) C = circle: radius (z.A , math.sqrt(5)) z.T = C.through - \end{tkzelements} + } \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -226,13 +232,14 @@ A circle is defined by two points at the ends of one of its diameters. \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (2,1) C = circle: diameter (z.A , z.B) z.O = C.center z.T = C.through -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawCircles(O,T) @@ -242,13 +249,14 @@ z.T = C.through \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (2,1) C = circle: diameter (z.A , z.B) z.O = C.center z.T = C.through -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -267,12 +275,13 @@ This method is used to define a point that is diametrically opposed to a point o \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.O = point: new (2,1) C = circle: new (z.O , z.A) z.B = C : antipode (z.A) -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawCircles(O,A) @@ -282,12 +291,13 @@ z.B = C : antipode (z.A) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.O = point: new (2,1) C = circle: new (z.O , z.A) z.B = C : antipode (z.A) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -311,13 +321,14 @@ The definition I use here is more general: the defined point is simply the point \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.O = point: new (2,1) C = circle: new (z.O , z.A) z.B = C : point (0.25) z.M = C : midarc (z.A,z.B) -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawCircles(O,A) @@ -327,13 +338,14 @@ z.M = C : midarc (z.A,z.B) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.O = point: new (2,1) C = circle: new (z.O , z.A) z.B = C : point (0.25) z.M = C : midarc (z.A,z.B) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -358,14 +370,15 @@ If $r=.5$ the defined point is diametrically opposed to $A$, the angle $\widehat \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (1,2) C.OA = circle: new (z.O,z.A) z.B = C.OA: point (1/6) z.C = C.OA: point (0.25) z.D = C.OA: point (0.5) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) @@ -375,14 +388,15 @@ If $r=.5$ the defined point is diametrically opposed to $A$, the angle $\widehat \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (1,2) C.OA = circle: new (z.O,z.A) z.B = C.OA: point (1/6) z.C = C.OA: point (0.25) z.D = C.OA: point (0.5) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -409,14 +423,15 @@ The \code{inversion} method can be used on a point, a group of points, a line or \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.o = point: new (-1,2) z.a = point: new (2,1) C.oa = circle: new (z.o,z.a) z.c = point: new (3,4) z.d = C.oa: inversion (z.c) p = C.oa: power (z.c) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(o,a) @@ -429,7 +444,8 @@ The \code{inversion} method can be used on a point, a group of points, a line or \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale =.75 z.o = point: new (-1,2) z.a = point: new (2,1) @@ -437,7 +453,7 @@ The \code{inversion} method can be used on a point, a group of points, a line or z.c = point: new (3,4) z.d = C.oa: inversion (z.c) p = C.oa: power (z.c) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -460,7 +476,8 @@ The result is either a straight line or a circle. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.o = point: new (-1,1) z.a = point: new (1,3) C.oa = circle: new (z.o,z.a) @@ -469,7 +486,7 @@ The result is either a straight line or a circle. L.cd = line: new (z.c,z.d) C.OH = C.oa: inversion (L.cd) z.O,z.H = get_points(C.OH) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(o,a O,H) @@ -480,7 +497,8 @@ The result is either a straight line or a circle. \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.o = point: new (-1,1) z.a = point: new (1,3) C.oa = circle: new (z.o,z.a) @@ -489,7 +507,7 @@ The result is either a straight line or a circle. L.cd = line: new (z.c,z.d) C.OH = C.oa: inversion (L.cd) z.O,z.H = get_points(C.OH) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -511,7 +529,8 @@ The result is either a straight line or a circle. \begin{minipage}{.55\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .7 z.o,z.a = point: new (-1,3),point: new (2,3) z.c = point: new (-2,1) @@ -528,7 +547,7 @@ if obj.type == "line" then z.p,z.q = get_points(obj) else z.f,z.b = get_points(obj) end color = "orange" -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[black](o,a) @@ -541,7 +560,8 @@ color = "orange" \end{Verbatim} \end{minipage} \begin{minipage}{.45\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = .7 z.o,z.a = point: new (-1,3),point: new (2,3) z.c = point: new (-2,1) @@ -558,7 +578,7 @@ color = "orange" then z.p,z.q = get_points(obj) else z.f,z.b = get_points(obj) end color = "orange" - \end{tkzelements} + } \begin{center} \begin{tikzpicture} @@ -582,8 +602,9 @@ Circles are geometrically similar to one another and mirror symmetric. Hence, a \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} - scale = 0.75 +\directlua{% +init_elements () + scale = 0.7 z.A = point : new ( 0 , 0 ) z.a = point : new ( 2 , 2 ) z.B = point : new ( 5 , 2 ) @@ -594,7 +615,7 @@ z.I = C.Aa : internal_similitude (C.Bb) L.TA1,L.TA2 = C.Aa : tangent_from (z.I) z.A1 = L.TA1.pb z.A2 = L.TA2.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,a B,b) @@ -604,8 +625,9 @@ z.A2 = L.TA2.pb \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} - scale = .75 +\directlua{% +init_elements () + scale = .7 z.A = point : new ( 0 , 0 ) z.a = point : new ( 2 , 2 ) z.B = point : new ( 5 , 2 ) @@ -616,7 +638,7 @@ z.I = C.Aa : internal_similitude (C.Bb) L.TA1,L.TA2 = C.Aa : tangent_from (z.I) z.A1 = L.TA1.pb z.A2 = L.TA2.pb -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -634,46 +656,48 @@ z.A2 = L.TA2.pb \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.a = point : new ( 2 , 2 ) z.B = point : new ( 3 , 2 ) -z.b = point : new ( 4 , 1 ) +z.b = point : new ( 3.5 , 1 ) C.Aa = circle : new (z.A,z.a) C.Bb = circle : new (z.B,z.b) z.I = C.Aa : external_similitude (C.Bb) L.TA1,L.TA2 = C.Aa : tangent_from (z.I) z.A1 = L.TA1.pb z.A2 = L.TA2.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,a B,b) \tkzDrawPoints(A,a,B,b,I,A1,A2) -\tkzDrawLines[add = .5 and .2](A1,I A2,I) +\tkzDrawLines[add = .25 and .1](A1,I A2,I) \end{tikzpicture} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new ( 0 , 0 ) -z.a = point : new ( 2 , 2 ) +z.a = point : new ( 2 , 2 ) z.B = point : new ( 3 , 2 ) -z.b = point : new ( 4 , 1 ) +z.b = point : new ( 3.5, 1 ) C.Aa = circle : new (z.A,z.a) C.Bb = circle : new (z.B,z.b) z.I = C.Aa : external_similitude (C.Bb) L.TA1,L.TA2 = C.Aa : tangent_from (z.I) z.A1 = L.TA1.pb z.A2 = L.TA2.pb -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,a B,b) \tkzDrawPoints(A,a,B,b,I,A1,A2) -\tkzDrawLines[add = .5 and .2](A1,I A2,I) +\tkzDrawLines[add = .25 and .1](A1,I A2,I) \end{tikzpicture} \end{center} \end{minipage} @@ -691,7 +715,9 @@ Here I have also named \code{radical\_center} the point of intersection of the r \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () + scale = .8 z.O = point : new (0,0) z.x = point : new (1,0) z.y = point : new (4,0) @@ -705,12 +731,12 @@ Here I have also named \code{radical\_center} the point of intersection of the r z.bp,z.b = intersection (C.Opy,C.Pz) L.aap = line : new (z.a,z.ap) L.bbp = line : new (z.b,z.bp) - -- z.X = intersection (L.aap,L.bbp) + % z.X = intersection (L.aap,L.bbp) z.X = C.Ox : radical_center(C.Pz,C.Opy) - -- L.OOp = line : new (z.O,z.Op) - -- z.H = L.OOp : projection (z.X) + % L.OOp = line : new (z.O,z.Op) + % z.H = L.OOp : projection (z.X) z.H = C.Ox : radical_center(C.Opy) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O,a O',b P,z) @@ -721,7 +747,9 @@ Here I have also named \code{radical\_center} the point of intersection of the r \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () +scale = .8 z.O = point : new (0,0) z.x = point : new (1,0) z.y = point : new (4,0) @@ -738,7 +766,7 @@ L.bbp = line : new (z.b,z.bp) z.X = intersection (L.aap,L.bbp) L.OOp = line : new (z.O,z.Op) z.H = L.OOp : projection (z.X) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -763,7 +791,8 @@ The radical line, also called the radical axis, is the locus of points of equal \label{par:radical_axis_v1} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.X = point : new (0,0) z.B = point : new (2,2) @@ -782,7 +811,7 @@ L.AB = line : new (z.A,z.B) L.ApBp = line : new (z.Ap,z.Bp) z.M = intersection (L.AB,L.ApBp) z.H = L.XY : projection (z.M) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(X,B Y,A') @@ -793,7 +822,8 @@ z.H = L.XY : projection (z.M) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.X = point : new (0,0) z.B = point : new (2,2) @@ -812,7 +842,7 @@ L.AB = line : new (z.A,z.B) L.ApBp = line : new (z.Ap,z.Bp) z.M = intersection (L.AB,L.ApBp) z.H = L.XY : projection (z.M) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -830,7 +860,8 @@ z.H = L.XY : projection (z.M) \label{par:radical_axis_v2} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.O = point : new (-1,0) z.Op = point : new (4,-1) @@ -847,12 +878,12 @@ _,z.Tp = get_points (L.MTp) L.MK,L.MKp = C.OpD : tangent_from (z.M) _,z.K = get_points (L.MK) _,z.Kp = get_points (L.MKp) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O,B O',D) \tkzDrawLine(E,F) - \tkzDrawLine[add=.5 and .5](O,O') + \tkzDrawLine[add=.25 and .25](O,O') \tkzDrawLines[add = 0 and .5](M,T M,T' M,K M,K') \tkzDrawCircle(M,T) \tkzDrawPoints(O,O',T,M,T',K,K') @@ -860,7 +891,8 @@ _,z.Kp = get_points (L.MKp) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale =1.25 z.O = point : new (-1,0) z.Op = point : new (4,-1) @@ -877,14 +909,14 @@ _,z.Tp = get_points (L.MTp) L.MK,L.MKp = C.OpD : tangent_from (z.M) _,z.K = get_points (L.MK) _,z.Kp = get_points (L.MKp) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O,B O',D) \tkzDrawLine(E,F) - \tkzDrawLine[add=.5 and .5](O,O') + \tkzDrawLine[add=.25 and .25](O,O') \tkzDrawLines[add = 0 and .5](M,T M,T' M,K M,K') \tkzDrawCircle(M,T) \tkzDrawPoints(O,O',T,M,T',K,K') @@ -897,7 +929,8 @@ _,z.Kp = get_points (L.MKp) \label{par:radical_axis_v3} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.O = point : new (0,0) z.B = point : new (4,0) z.Op = point : new (6,0) @@ -910,7 +943,7 @@ _,z.Kp = get_points (L.MKp) _,z.T = get_points (L) L = C.OpB : tangent_from (z.M) _,z.Tp = get_points (L) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O,B O',B) @@ -923,7 +956,8 @@ _,z.Kp = get_points (L.MKp) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new (0,0) z.B = point : new (4,0) z.Op = point : new (6,0) @@ -936,7 +970,7 @@ L = C.OB : tangent_from (z.M) _,z.T = get_points (L) L = C.OpB : tangent_from (z.M) _,z.Tp = get_points (L) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -956,7 +990,8 @@ _,z.Tp = get_points (L) \label{par:radical_axis_v4} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new (0,0) z.B = point : new (5,0) z.Op = point : new (3,0) @@ -970,7 +1005,7 @@ _,z.Tp = get_points (L) _,z.T = get_points (L) _,L = C.OpB : tangent_from (z.M) _,z.Tp = get_points (L) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O,B O',B) @@ -983,7 +1018,8 @@ _,z.Tp = get_points (L) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new (0,0) z.B = point : new (5,0) z.Op = point : new (3,0) @@ -997,7 +1033,7 @@ _,z.Tp = get_points (L) _,z.T = get_points (L) _,L = C.OpB : tangent_from (z.M) _,z.Tp = get_points (L) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1021,7 +1057,8 @@ _,z.Tp = get_points (L) \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (1,2) C.AB = circle: new (z.A,z.B) @@ -1031,7 +1068,7 @@ _,z.Tp = get_points (L) L.T1,L.T2 = C.AB : tangent_from (z.C) z.T1 = L.T1.pb z.T2 = L.T2.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(A,B) @@ -1045,7 +1082,8 @@ _,z.Tp = get_points (L) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (1,2) C.AB = circle: new (z.A,z.B) @@ -1055,7 +1093,7 @@ _,z.Tp = get_points (L) L.T1,L.T2 = C.AB : tangent_from (z.C) z.T1 = L.T1.pb z.T2 = L.T2.pb -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1078,7 +1116,8 @@ _,z.Tp = get_points (L) Let be a tangent common to both circles at $T$ and $T'$ (closest to $C$). Let a secant parallel to this tangent pass through $C$. Then the segment $[TT']$ is seen from the other common point $D$ at an angle equal to half the angle of the two circles. \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 2 ) L.AB = line : new ( z.A , z.B ) @@ -1094,7 +1133,7 @@ Let be a tangent common to both circles at $T$ and $T'$ (closest to $C$). Let a _,z.M = intersection (L.mm, C.AC) z.Mp = intersection (L.mm, C.BC) _,z.D = intersection (C.AC,C.BC) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,C B,C) @@ -1109,7 +1148,8 @@ Let be a tangent common to both circles at $T$ and $T'$ (closest to $C$). Let a \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 2 ) L.AB = line : new ( z.A , z.B ) @@ -1125,7 +1165,7 @@ L.mm = L.TTp : ll_from (z.C) _,z.M = intersection (L.mm, C.AC) z.Mp = intersection (L.mm, C.BC) _,z.D = intersection (C.AC,C.BC) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1150,14 +1190,15 @@ In geometry, two circles are said to be orthogonal if their respective tangent l This method determines a circle with a given centre, orthogonal to a circle that is also given. \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.C_1 = point: new (0,0) z.C_2 = point: new (8,0) z.A = point: new (5,0) C = circle: new (z.C_1,z.A) z.S,z.T = get_points (C: orthogonal_from (z.C_2)) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(C_1,T C_2,T) @@ -1176,14 +1217,15 @@ This method determines a circle with a given centre, orthogonal to a circle that \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.C_1 = point: new (0,0) z.C_2 = point: new (8,0) z.A = point: new (5,0) C = circle: new (z.C_1,z.A) z.S,z.T = get_points (C: orthogonal_from (z.C_2)) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1210,7 +1252,8 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2)) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0,1) z.A = point: new (1,0) z.z1 = point: new (-1.5,-1.5) @@ -1218,7 +1261,7 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2)) C.OA = circle: new (z.O,z.A) C = C.OA: orthogonal_through (z.z1,z.z2) z.c = C.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) @@ -1228,7 +1271,8 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2)) \end{tikzpicture} \end{Verbatim} \end{minipage} -\begin{minipage}{.5\textwidth}\begin{tkzelements} +\begin{minipage}{.5\textwidth}\directlua{% +init_elements () z.O = point: new (0,1) z.A = point: new (1,0) z.z1 = point: new (-1.5,-1.5) @@ -1236,7 +1280,7 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2)) C.OA = circle: new (z.O,z.A) C = C.OA: orthogonal_through (z.z1,z.z2) z.c = C.center -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1274,7 +1318,8 @@ We can obtain the centers of similarity of these two circles by constructing $EH \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .8 z.A = point : new ( 1 , 0 ) z.B = point : new ( 3 , 0 ) @@ -1290,11 +1335,12 @@ C.IT,C.JV = C.AO : midcircle (C.BP) z.I,z.T = get_points (C.IT) z.J,z.V = get_points (C.JV) z.X,z.Y = intersection (C.AO,C.BP) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = .8 z.A = point : new ( 1 , 0 ) z.B = point : new ( 3 , 0 ) @@ -1310,7 +1356,7 @@ z.X,z.Y = intersection (C.AO,C.BP) z.I,z.T = get_points (C.IT) z.J,z.V = get_points (C.JV) z.X,z.Y = intersection (C.AO,C.BP) - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal,thick](A,O B,P) @@ -1337,7 +1383,8 @@ z.X,z.Y = intersection (C.AO,C.BP) \label{midcircle_diameter} \begin{minipage}{.6\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () scale =.75 z.A = point : new ( 3 , 0 ) z.B = point : new ( 5 , 0 ) @@ -1354,11 +1401,12 @@ z.X,z.Y = intersection (C.AO,C.BP) z.y = C.UR.center C.IT = C.AO : midcircle (C.BP) z.I,z.T = get_points (C.IT) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =.75 z.A = point : new ( 3 , 0 ) z.B = point : new ( 5 , 0 ) @@ -1375,7 +1423,7 @@ z.X,z.Y = intersection (C.AO,C.BP) z.y = C.UR.center C.IT = C.AO : midcircle (C.BP) z.I,z.T = get_points (C.IT) - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal,thick](A,O B,P) @@ -1397,7 +1445,8 @@ $I$ is the center of external similarity of the two given circles. To obtain the \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 local a,b,c,d z.A = point : new ( 0 , 0 ) @@ -1416,11 +1465,12 @@ L.TF = C.Bb : tangent_from (z.I) z.H = intersection (L.TF,C.IT) z.E = intersection (L.TF,C.Aa) z.F=L.TF.pb -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 local a,b,c,d z.A = point : new ( 0 , 0 ) @@ -1439,7 +1489,7 @@ L.TF = C.Bb : tangent_from (z.I) z.H = intersection (L.TF,C.IT) z.E = intersection (L.TF,C.Aa) z.F=L.TF.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal,thick](A,a B,b) @@ -1462,7 +1512,8 @@ z.F=L.TF.pb \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 local a,b,c,d z.A = point : new ( 0 , 0 ) @@ -1481,11 +1532,12 @@ L.TF = C.Bb : tangent_from (z.I) z.H = intersection (L.TF,C.IT) z.E = intersection (L.TF,C.Aa) z.F=L.TF.pb -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 local a,b,c,d z.A = point : new ( 0 , 0 ) @@ -1504,7 +1556,7 @@ L.TF = C.Bb : tangent_from (z.I) z.H = intersection (L.TF,C.IT) z.E = intersection (L.TF,C.Aa) z.F=L.TF.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal,thick](A,a B,b) @@ -1524,7 +1576,8 @@ z.F=L.TF.pb \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 2 , 0 ) z.B = point : new ( 4 , 0 ) z.a = point : new ( 1 , 0) @@ -1533,11 +1586,12 @@ C.Aa = circle : new (z.A,z.a) C.Bb = circle : new (z.B,z.b) C.IT = C.Aa : midcircle (C.Bb) z.I,z.T = get_points(C.IT) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 2 , 0 ) z.B = point : new ( 4 , 0 ) z.a = point : new ( 1 , 0) @@ -1546,7 +1600,7 @@ C.Aa = circle : new (z.A,z.a) C.Bb = circle : new (z.B,z.b) C.IT = C.Aa : midcircle (C.Bb) z.I,z.T = get_points (C.IT) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -1569,7 +1623,8 @@ z.I,z.T = get_points (C.IT) \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0,0) z.B = point: new (6,0) @@ -1583,7 +1638,7 @@ z.I,z.T = get_points (C.IT) z.I_c,z.Xc = get_points (C.exc) C.ortho = C.exa : radical_circle (C.exb,C.exc) z.w,z.a = get_points (C.ortho) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1595,7 +1650,8 @@ z.I,z.T = get_points (C.IT) \end{Verbatim} \end{minipage} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0,0) z.B = point: new (6,0) @@ -1609,7 +1665,7 @@ z.I,z.T = get_points (C.IT) z.I_c,z.Xc = get_points (C.exc) C.ortho = C.exa : radical_circle (C.exb,C.exc) z.w,z.a = get_points (C.ortho) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1623,14 +1679,14 @@ z.I,z.T = get_points (C.IT) \end{center} % subsubsection radical_circle (end) -\subsubsection{Method \Imeth{circle}{power(C)}} % (fold) -\label{ssub:method_imeth_circle_power_c} +\subsubsection{Method \Imeth{circle}{power(C)} Power v1} % (fold) +\label{ssub:power_v1} -\paragraph{Power v1} % (fold) -\label{par:power_v1} -\begin{minipage}[t]{.5\textwidth}\vspace{0pt}% + +\begin{minipage}[t]{.45\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new (0,0) z.A = point : new (2,-2) z.M = point : new (-6,0) @@ -1638,7 +1694,7 @@ z.I,z.T = get_points (C.IT) C.OA = circle : new (z.O,z.A) z.Ap = C.OA : antipode (z.A) z.B = intersection (L.AM, C.OA) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) @@ -1650,9 +1706,10 @@ z.I,z.T = get_points (C.IT) \end{tikzpicture} \end{Verbatim} \end{minipage} -\begin{minipage}[t]{.5\textwidth} -\begin{tkzelements} -scale = 1 +\begin{minipage}[t]{.55\textwidth}\vspace{0pt}% +\directlua{% +init_elements () +scale = .75 z.O = point : new (0,0) z.A = point : new (2,-2) z.M = point : new (-6,0) @@ -1660,11 +1717,8 @@ L.AM = line : new (z.A,z.M) C.OA = circle : new (z.O,z.A) z.Ap = C.OA : antipode (z.A) z.B = intersection (L.AM, C.OA) -\end{tkzelements} - - -\begin{center} - \begin{tikzpicture} +} +\begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) \tkzMarkRightAngle[fill=gray!10](A',B,M) @@ -1673,16 +1727,18 @@ z.B = intersection (L.AM, C.OA) \tkzLabelPoints(O,A,A',M,B) \tkzDrawSegments[-Triangle](M,A M,A') \end{tikzpicture} -\end{center} - \end{minipage} -% paragraph power_v1 (end) +% subsubsection power_v1 (end) + +\subsubsection{Method \Imeth{circle}{power(C)} Power v2} % (fold) +\label{ssub:power_v2} +\vspace{6pt} + -\paragraph{Power v2} % (fold) -\label{par:power_v2} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new (0,0) z.A = point : new (2,2) z.M = point : new (-1.5,0) @@ -1693,7 +1749,7 @@ z.B = intersection (L.AM, C.OA) z.m = z.M : north(1) L.mM = line : new (z.m,z.M) z.U,z.V = intersection (L.mM,C.OA) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) @@ -1707,8 +1763,9 @@ z.B = intersection (L.AM, C.OA) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} -scale = 1 +\directlua{% +init_elements () +scale = .8 z.O = point : new (0,0) z.A = point : new (2,2) z.M = point : new (-1.5,0) @@ -1719,7 +1776,7 @@ _,z.B = intersection (L.AM, C.OA) z.m = z.M : north(1) L.mM = line : new (z.m,z.M) z.U,z.V = intersection (L.mM,C.OA) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1735,7 +1792,7 @@ z.U,z.V = intersection (L.mM,C.OA) \end{center} \end{minipage} -% paragraph power_v2 (end) +% subsubsection power_v2 (end) % subsubsection method_imeth_circle_power_c (end) @@ -1744,7 +1801,8 @@ z.U,z.V = intersection (L.mM,C.OA) \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.O = point : new (0,0) z.A = point : new (1,2) C.OA = circle : new (z.O,z.A) @@ -1757,10 +1815,11 @@ z.U,z.V = intersection (L.mM,C.OA) BDn = C.OA : in_out_disk (z.N) BCp = C.OA : in_out (z.P) BDp = C.OA : in_out_disk (z.P) - \end{tkzelements} + } \end{Verbatim} \end{minipage} -\begin{minipage}{.5\textwidth}\begin{tkzelements} +\begin{minipage}{.5\textwidth}\directlua{% +init_elements () z.O = point : new (0,0) z.A = point : new (1,2) C.OA = circle : new (z.O,z.A) @@ -1773,7 +1832,7 @@ BCn = C.OA : in_out (z.N) BDn = C.OA : in_out_disk (z.N) BCp = C.OA : in_out (z.P) BDp = C.OA : in_out_disk (z.P) -\end{tkzelements} +} \def\tkzPosPoint#1#2#3#4{% \tkzLabelPoints(O,M,N,P) \ifthenelse{\equal{\tkzUseLua{#1}}{true}}{ @@ -1835,7 +1894,8 @@ This function returns a string indicating the position of the circle in relation \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.a = point : new ( 3 , 0 ) z.B = point : new ( 2 , 0 ) @@ -1846,7 +1906,7 @@ This function returns a string indicating the position of the circle in relation if position == "inside tangent" then color = "orange" else color = "blue" end -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -1856,7 +1916,8 @@ This function returns a string indicating the position of the circle in relation \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 1 , 0 ) z.a = point : new ( 3 , 0 ) z.B = point : new ( 2 , 0 ) @@ -1865,7 +1926,7 @@ C.Aa = circle: new (z.A,z.a) C.Bb = circle: new (z.B,z.b) position = C.Aa : circles_position (C.Bb) if position == "inside tangent" then color = "orange" else color = "blue" end -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-ellipse.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-ellipse.tex index 016dd8025ca..7b640220e67 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-ellipse.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-ellipse.tex @@ -34,9 +34,10 @@ The first attributes are the three points that define the ellipse: : the \Iattr \subsubsection{Atributes of an ellipse: example} % (fold) \label{ssub:attributes_of_an_ellipse} -\begin{minipage}{.5\textwidth} +\begin{minipage}{.45\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.C = point: new (3 , 2) z.A = point: new (5 , 1) L.CA = line : new (z.C,z.A) @@ -55,11 +56,12 @@ The first attributes are the three points that define the ellipse: : the \Iattr z.S = E.south z.Co = E.covertex z.Ve = E.vertex -\end{tkzelements} +} \end{Verbatim} \end{minipage} -\begin{minipage}{.5\textwidth} - \begin{tkzelements} +\begin{minipage}{.55\textwidth} + \directlua{% +init_elements () z.C = point: new (3 , 2) z.A = point: new (5 , 1) L.CA = line : new (z.C,z.A) @@ -78,7 +80,7 @@ The first attributes are the three points that define the ellipse: : the \Iattr z.S = E.south z.Co = E.covertex z.Ve = E.vertex - \end{tkzelements} + } \begin{tikzpicture} \pgfkeys{/pgf/number format/.cd,fixed,precision=2} \tkzGetNodes @@ -86,7 +88,7 @@ The first attributes are the three points that define the ellipse: : the \Iattr \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope}) \tkzDrawPoints(C,A,B,b,W,S,F1,F2) \tkzLabelPoints(C,A,B) - \tkzDrawLine[add = .5 and .5](A,W) + \tkzDrawLine[add = .25 and .25](A,W) \tkzLabelSegment[pos=1.25,above,sloped](A,W){slope = \pgfmathprintnumber{\tkzUseLua{slope}}} \tkzLabelPoint[below](S){South} \tkzLabelPoint[below left](F1){Focus 1} @@ -105,7 +107,7 @@ The first attributes are the three points that define the ellipse: : the \Iattr \tkzUseLua{slope}) \tkzDrawPoints(C,A,B,b,W,S,F1,F2) \tkzLabelPoints(C,A,B) - \tkzDrawLine[add = .5 and .5](A,W) + \tkzDrawLine[add = .25 and .25](A,W) \tkzLabelSegment[pos=1.5,above,sloped](A,W){% slope = \pgfmathprintnumber{\tkzUseLua{slope}}} \tkzLabelPoint[below](S){South} @@ -157,7 +159,8 @@ For attributes [\ref{sec:class_ellipse}]. \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.C = point: new (3 , 2) z.A = point: new (5 , 1) z.B = z.C : homothety(0.5, @@ -166,7 +169,7 @@ For attributes [\ref{sec:class_ellipse}]. a = E.Rx b = E.Ry slope = math.deg(E.slope) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) @@ -178,7 +181,8 @@ For attributes [\ref{sec:class_ellipse}]. \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.C = point: new (3 , 2) z.A = point: new (5 , 1) z.B = z.C : homothety(0.5, @@ -187,7 +191,7 @@ E = ellipse: new (z.C,z.A,z.B) a = E.Rx b = E.Ry slope = math.deg(E.slope) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) @@ -197,7 +201,7 @@ slope = math.deg(E.slope) \end{tikzpicture} \end{minipage} -The function \Igfct{package}{tkzUseLua (variable)} is used to transfer values to \TIKZ\ or \pkg{tkz-euclide}. +The macro \tkzcname{tkzUseLua (variable)} is used to transfer values to \TIKZ\ or \pkg{tkz-euclide}. % subsubsection method_imeth_ellipse_new (end) @@ -208,7 +212,8 @@ The first two points are the foci of the ellipse, and the third one is the verte \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (5 , 1) L.AB = line : new (z.A,z.B) @@ -230,11 +235,12 @@ The first two points are the foci of the ellipse, and the third one is the verte z.R,z.S = intersection (L.XO,E) a,b = E.Rx,E.Ry ang = math.deg(E.slope) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =1 z.A = point: new (0 , 0) z.B = point: new (5 , 1) @@ -257,7 +263,7 @@ The first two points are the foci of the ellipse, and the third one is the verte z.R,z.S = intersection (L.XO,E) a,b = E.Rx,E.Ry ang = math.deg(E.slope) - \end{tkzelements} + } \begin{center} \begin{tikzpicture} @@ -302,14 +308,16 @@ The first two points are the foci of the ellipse, and the third one is the verte \label{ssub:ellipse_method_point} The method \Imeth{ellipse}{point} defines a point $M$ of the ellipse whose coordinates are $(a\times cos(phi), b\times sin(phi))$. |phi| angle between (center,vertex) and (center,M) - \emph{The environment \tkzNameEnv{tkzelements} uses as \tkzname{lua} the radian as unit for angles. } + \emph{With \code{lua}, the radian is used as unit for angles. } \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () + scale = .6 z.C = point: new (2 , 3) - z.A = point: new (6 , 5) + z.A = point: new (-1 , -2) a = value(4) b = value(3) ang = math.deg(-math.pi/4) @@ -325,14 +333,15 @@ The first two points are the foci of the ellipse, and the third one is the verte z.N = L.tb.pb L.K = E :tangent_at (z.K) z.ka,z.kb = get_points(L.K) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} -scale = .75 +\directlua{% +init_elements () +scale = .6 z.C = point: new (2 , 3) -z.A = point: new (6 , 5) +z.A = point: new (-1 , -2) a = value(4) b = value(3) ang = math.deg(-math.pi/4) @@ -348,7 +357,7 @@ z.M = L.ta.pb z.N = L.tb.pb L.K = E :tangent_at (z.K) z.ka,z.kb = get_points(L.K) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawSegments(C,V C,CoV) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex index f4acdafc8c0..3d46a029b56 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex @@ -8,7 +8,8 @@ Writing |L.AB = line: new (z.A,z.B)| creates an object of the class \tkzname{line} (the notation is arbitrary for the moment). Geometrically, it represents both the line passing through the points $A$ and $B$ as the segment $[AB]$. Thus, we can use the midpoint of |L.AB|, which is, of course, the midpoint of the segment $[AB]$. This medium is obtained with |L.AB.mid|. Note that |L.AB.pa = z.A| and |L.AB.pb = z.B|. Finally, if a line $L$ is the result of a method, you can obtain the points with |z.A,z.B = get_points (L)| or with the previous remark. \begin{mybox} - Creation |L.AB = line : new ( z.A , z.B ) | + Creation \\ + |L.AB = line : new ( z.A , z.B ) | \end{mybox} @@ -43,7 +44,8 @@ The attributes are : \label{ssub:example_class_line} \vspace{5pt} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (1, 1) z.b = point: new (5, 4) L.ab = line : new (z.a,z.b) @@ -54,7 +56,7 @@ z.r = L.ab.north_pa z.s = L.ab.south_pb sl = L.ab.slope len = L.ab.length -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -74,7 +76,8 @@ len = L.ab.length \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.a = point: new (1, 1) z.b = point: new (5, 4) @@ -86,7 +89,7 @@ len = L.ab.length z.s = L.ab.south_pb sl = L.ab.slope len = L.ab.length -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -113,13 +116,14 @@ With | L.AB = line : new (z.A,z.B)|, a line is defined. \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,1) z.B = point : new (3,2) L.AB = line : new (z.A,z.B) z.C = L.AB.north_pa z.D = L.AB.south_pa -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,D) @@ -131,14 +135,15 @@ With | L.AB = line : new (z.A,z.B)|, a line is defined. \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1 z.A = point : new (1,1) z.B = point : new (3,2) L.AB = line : new (z.A,z.B) z.C = L.AB.north_pa z.D = L.AB.south_pa -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,D) @@ -262,14 +267,15 @@ Here's the list of methods for the \tkzNameObj{line} object. The results can be \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point : new (1,-1) z.B = point : new (5,0) L.AB = line : new ( z.A , z.B ) z.M = point : new (2,3) z.N = L.AB : report (3,z.M) z.O = L.AB : report (3) - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawSegments(A,B M,N) @@ -279,14 +285,15 @@ Here's the list of methods for the \tkzNameObj{line} object. The results can be \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point : new (1,-1) z.B = point : new (5,0) L.AB = line : new ( z.A , z.B ) z.M = point : new (2,3) z.N = L.AB : report (3,z.M) z.O = L.AB : report (3) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawSegments(A,B M,N) @@ -303,13 +310,14 @@ The angles are on either side of the given segment \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) L.AB = line : new ( z.A , z.B ) T.ABC = L.AB : two_angles (math.pi/6,math.pi/2) z.C = T.ABC.pc -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -324,13 +332,14 @@ The angles are on either side of the given segment \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) L.AB = line : new ( z.A , z.B ) T.ABC= L.AB : two_angles (math.pi/6,math.pi/2) z.C = T.ABC.pc - \end{tkzelements} + } \begin{center} \begin{tikzpicture} @@ -353,7 +362,8 @@ The angles are on either side of the given segment \label{ssub:method_imeth_line_isosceles} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.a = point : new (1,2) z.b = point : new (5,1) @@ -365,7 +375,7 @@ The angles are on either side of the given segment z.Ka,z.Kb,z.Kc = get_points (T.SY) L.Kb = T.abc : symmedian_line (1) _,z.Kb = get_points(L.Kb) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(a,b,c Ka,Kb,Kc) @@ -377,7 +387,8 @@ The angles are on either side of the given segment \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.a = point : new (1,2) z.b = point : new (5,1) @@ -390,7 +401,7 @@ The angles are on either side of the given segment z.Kc = get_points (T.SY) L.Kb = T.abc : symmedian_line (1) _,z.Kb = get_points(L.Kb) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(a,b,c Ka,Kb,Kc) @@ -411,7 +422,8 @@ In the following example, a small difficulty arises. The given lengths are not a \vspace{6pt} \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) L.AB = line : new ( z.A , z.B ) @@ -421,7 +433,7 @@ In the following example, a small difficulty arises. The given lengths are not a z.C = T.ABC.pc z.D = T.ABD.pc z.E = T.ABE.pc -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -433,7 +445,8 @@ In the following example, a small difficulty arises. The given lengths are not a \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) L.AB = line : new ( z.A , z.B ) @@ -443,7 +456,7 @@ In the following example, a small difficulty arises. The given lengths are not a z.C = T.ABC.pc z.D = T.ABD.pc z.E = T.ABE.pc -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] @@ -465,15 +478,16 @@ In some cases, two solutions are possible. \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} - scale =1 - z.A = point : new ( 0 , 0 ) - z.B = point : new ( 5 , 0 ) - L.AB = line : new ( z.A , z.B ) +\directlua{% +init_elements () + scale = 1 + z.A = point : new ( 0 , 0 ) + z.B = point : new ( 5 , 0 ) + L.AB = line : new ( z.A , z.B ) T.ABC,T.ABD = L.AB : ssa (value(3),math.pi/6) - z.C = T.ABC.pc - z.D = T.ABD.pc -\end{tkzelements} + z.C = T.ABC.pc + z.D = T.ABD.pc +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawPolygons(A,B,C A,B,D) @@ -487,7 +501,8 @@ In some cases, two solutions are possible. \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =1 z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) @@ -495,7 +510,7 @@ In some cases, two solutions are possible. T.ABC,T.ABD = L.AB : ssa (value(3),math.pi/6) z.C = T.ABC.pc z.D = T.ABD.pc - \end{tkzelements} + } \begin{center} \begin{tikzpicture}[gridded] @@ -524,7 +539,7 @@ The side lengths are proportional to the lengths given in the table. They depend \textbf{Name} & \textbf{definition} \\ \midrule \Imeth{line}{gold (<swap>)} & Right triangle with $a=\varphi$, $b=1$ and $c=\sqrt{\varphi}$\\ -\Imeth{line}{golden (<swap>)} &Right triangle $b=\varphi$ $c=1$ ; half of gold rectangle \\ +\Imeth{line}{golden (<swap>)} & Right triangle $b=\varphi$, $c=1$ ; half of gold rectangle \\ \Imeth{line}{divine ()} & Isosceles $a=\varphi$, $b=c=1$ and $\beta = \gamma=\pi/5$ \\ \Imeth{line}{pythagoras ()} & $a=5$, $b=4$, $c=3$ and other names: isis or egyptian\\ \Imeth{line}{sublime ()} & Isosceles $a=1$, $b=c=\varphi$ and $\beta =\gamma=2\pi/5$ ; other name: euclid\\ @@ -534,7 +549,8 @@ The side lengths are proportional to the lengths given in the table. They depend \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) L.AB = line : new ( z.A , z.B ) @@ -550,7 +566,7 @@ The side lengths are proportional to the lengths given in the table. They depend z.G = T.ABG.pc T.ABH = L.AB : pythagoras () z.H = T.ABH.pc -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C A,B,D A,B,E A,B,F A,B,G A,B,H) @@ -560,7 +576,8 @@ The side lengths are proportional to the lengths given in the table. They depend \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) L.AB = line : new ( z.A , z.B ) @@ -576,7 +593,7 @@ The side lengths are proportional to the lengths given in the table. They depend z.G = T.ABG.pc T.ABH = L.AB : pythagoras () z.H = T.ABH.pc -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C A,B,D A,B,E A,B,F A,B,G A,B,H) @@ -598,14 +615,15 @@ This method exists for all objects except quadrilaterals. \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} - z.A = point : new (-1,-1) - z.B = point : new (1,1) +\directlua{% +init_elements () + z.A = point : new (-1,-1) + z.B = point : new (1,1) L.AB = line : new (z.A,z.B) - z.I = L.AB : point (0.5) - z.J = L.AB : point (-0.5) - z.K = L.AB : point (2) -\end{tkzelements} + z.I = L.AB : point (0.5) + z.J = L.AB : point (-0.5) + z.K = L.AB : point (2) +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawLine(J,K) @@ -615,14 +633,15 @@ This method exists for all objects except quadrilaterals. \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point : new (-1,-1) z.B = point : new (1,1) L.AB = line : new (z.A,z.B) z.I = L.AB : point (0.5) z.J = L.AB : point (-0.5) z.K = L.AB : point (2) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -641,14 +660,15 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (4 , 0) z.C = point: new (1 , 3) L.AB = line : new (z.A,z.B) z.D = L.AB : colinear_at (z.C,.5) z.E = L.AB : colinear_at (z.C) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawSegments(A,B C,E) @@ -658,14 +678,15 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (4 , 0) z.C = point: new (1 , 3) L.AB = line : new (z.A,z.B) z.D = L.AB : colinear_at (z.C,.5) z.E = L.AB : colinear_at (z.C) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -685,12 +706,13 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} - z.a = point: new (1, 1) - z.b = point: new (5, 4) +\directlua{% +init_elements () + z.a = point: new (1, 1) + z.b = point: new (5, 4) L.ab = line : new (z.a,z.b) - z.c = L.ab : normalize () -\end{tkzelements} + z.c = L.ab : normalize () +} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -702,12 +724,13 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (1, 1) z.b = point: new (5, 4) L.ab = line : new (z.a,z.b) z.c = L.ab : normalize () -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] @@ -728,12 +751,13 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} - z.A = point : new ( 0 , -1 ) - z.B = point : new ( 4 , 2 ) +\directlua{% +init_elements () + z.A = point : new ( 0 , -1 ) + z.B = point : new ( 4 , 2 ) L.AB = line : new ( z.A , z.B ) - z.G = L.AB : barycenter (1,2) -\end{tkzelements} + z.G = L.AB : barycenter (1,2) +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine(A,B) @@ -743,12 +767,13 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , -1 ) z.B = point : new ( 4 , 2 ) L.AB = line : new ( z.A , z.B ) z.G = L.AB : barycenter (1,2) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -765,7 +790,8 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \label{ssub:new_line_from_a_defined_line} \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.A = point : new (1,1) z.B = point : new (3,2) @@ -773,9 +799,9 @@ If the coefficient is missing then it defaults to $1$ and in the following examp z.C = L.AB.north_pa z.D = L.AB.south_pa L.CD = line : new (z.C,z.D) - _,z.E = get_points ( L.CD: ll_from (z.B)) - -- z.E = L2.pb -\end{tkzelements} + _,z.E = get_points ( L.CD: ll_from (z.B)) + % z.E = L2.pb +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,D B,E) @@ -787,7 +813,8 @@ If the coefficient is missing then it defaults to $1$ and in the following examp \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.A = point : new (1,1) z.B = point : new (3,2) @@ -796,8 +823,8 @@ z.C = L.AB.north_pa z.D = L.AB.south_pa L.CD = line : new (z.C,z.D) _,z.E = get_points ( L.CD: ll_from (z.B)) --- or z.E = L2.pb with |L2 = L.CD: ll_from (z.B)| -\end{tkzelements} +% or z.E = L2.pb with |L2 = L.CD: ll_from (z.B)| +} \begin{center} \begin{tikzpicture} @@ -819,14 +846,15 @@ _,z.E = get_points ( L.CD: ll_from (z.B)) \label{ssub:newline_ortho_from} \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,1) z.B = point : new (3,2) L.AB = line : new (z.A,z.B) z.C = point : new (1,3) L.CD = L.AB : ortho_from(z.C) z.D = L.CD.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,D) @@ -836,14 +864,15 @@ _,z.E = get_points ( L.CD: ll_from (z.B)) \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,1) z.B = point : new (3,2) L.AB = line : new (z.A,z.B) z.C = point : new (1,3) L.CD = L.AB : ortho_from(z.C) z.D = L.CD.pb -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -866,14 +895,15 @@ In Mathworld, the mediator is the plane through the midpoint of a line segment a the perpendicular bisector of a line segment, is a line segment perpendicular to the segment and passing through the midpoint of this segment. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) L.AB = line: new (z.A,z.B) L.med = L.AB : mediator () z.M = L.AB.mid z.x,z.y= get_points(L.med) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine(A,B) @@ -886,14 +916,15 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) L.AB = line: new (z.A,z.B) L.med = L.AB : mediator () z.M = L.AB.mid z.x,z.y= get_points(L.med) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -905,7 +936,6 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t \tkzMarkSegments(A,M M,B) \end{tikzpicture} \end{center} - \end{minipage} % subsubsection method_imeth_line_mediator (end) @@ -915,13 +945,14 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) L.AB = line: new (z.A,z.B) T.ABC = L.AB : equilateral () z.C = T.ABC.pc -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine(A,B) @@ -933,13 +964,14 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) L.AB = line: new (z.A,z.B) T.ABC = L.AB : equilateral () z.C = T.ABC.pc -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -959,7 +991,8 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t \label{ssub:example_projection_of_several_points} \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .8 z.a = point: new (0, 0) z.b = point: new (4, 1) @@ -967,7 +1000,7 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t z.d = point: new (5, 2) L.ab = line: new (z.a,z.b) z.cp,z.dp = L.ab: projection(z.c,z.d) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(a,b c,c' d,d') @@ -977,7 +1010,8 @@ the perpendicular bisector of a line segment, is a line segment perpendicular t \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .8 z.a = point: new (0, 0) z.b = point: new (4, 1) @@ -985,7 +1019,7 @@ z.c = point: new (2, 5) z.d = point: new (5, 2) L.ab = line: new (z.a,z.b) z.cp,z.dp = L.ab : projection(z.c,z.d) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1006,7 +1040,8 @@ z.cp,z.dp = L.ab : projection(z.c,z.d) \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1 , 5) @@ -1017,8 +1052,8 @@ z.cp,z.dp = L.ab : projection(z.c,z.d) z.H = L.AB: projection (z.O) L.ab = C.OA: tangent_at (z.A) z.a,z.b = L.ab.pa,L.ab.pb - -- or z.a,z.b = get_points (L.ab) -\end{tkzelements} + % or z.a,z.b = get_points (L.ab) +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1037,7 +1072,8 @@ z.cp,z.dp = L.ab : projection(z.c,z.d) \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -1049,8 +1085,8 @@ C.OA = circle: new (z.O,z.A) z.H = L.AB : projection (z.O) L.ab = C.OA : tangent_at (z.A) z.a,z.b = L.ab.pa,L.ab.pb - -- or z.a,z.b = get_points (L.ab) -\end{tkzelements} + % or z.a,z.b = get_points (L.ab) +} \begin{center} \begin{tikzpicture} @@ -1080,14 +1116,15 @@ z.a,z.b = L.ab.pa,L.ab.pb \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (1,2) z.C = point: new (-3,2) z.D = point: new (0,2) L.AB = line : new (z.A,z.B) z.E,z.F = L.AB : translation (z.C,z.D) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(A,...,F) @@ -1097,14 +1134,15 @@ z.a,z.b = L.ab.pa,L.ab.pb \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (1,2) z.C = point: new (-3,2) z.D = point: new (0,2) L.AB = line : new (z.A,z.B) z.E,z.F = L.AB : translation (z.C,z.D) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1126,7 +1164,8 @@ z.a,z.b = L.ab.pa,L.ab.pb \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 1 ) z.E = point : new ( 0 , 2 ) @@ -1136,7 +1175,7 @@ z.a,z.b = L.ab.pa,L.ab.pb T.EFG = triangle : new (z.E,z.F,z.G) T.new = L.AB : reflection (T.EFG) z.Ep,z.Fp,z.Gp = get_points(T.new) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine(A,B) @@ -1147,7 +1186,8 @@ z.a,z.b = L.ab.pa,L.ab.pb \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 1 ) z.E = point : new ( 0 , 2 ) @@ -1157,7 +1197,7 @@ z.a,z.b = L.ab.pa,L.ab.pb T.EFG = triangle : new (z.E,z.F,z.G) T.new = L.AB : reflection (T.EFG) z.Ep,z.Fp,z.Gp = get_points(T.new) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1177,14 +1217,15 @@ z.a,z.b = L.ab.pa,L.ab.pb \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) - z.B = point : new (5 , -2) + z.B = point : new (4 , -2) z.C = point : new (3 , 3) L.AB = line : new (z.A,z.B) d = L.AB : distance (z.C) z.H = L.AB : projection (z.C) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,H) @@ -1196,14 +1237,15 @@ z.a,z.b = L.ab.pa,L.ab.pb \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) - z.B = point : new (5 , -2) + z.B = point : new (4 , -2) z.C = point : new (3 , 3) L.AB = line : new (z.A,z.B) d = L.AB : distance (z.C) z.H = L.AB : projection (z.C) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1226,7 +1268,8 @@ z.a,z.b = L.ab.pa,L.ab.pb \label{ssub:apollonius_circle_ma_mb_k} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 6 , 0 ) L.AB =line: new (z.A,z.B) @@ -1234,7 +1277,7 @@ z.a,z.b = L.ab.pa,L.ab.pb z.O,z.C = get_points ( C.apo ) z.D = C.apo : antipode (z.C) z.P = C.apo : point (0.30) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzFillCircle[blue!20,opacity=.2](O,C) @@ -1253,7 +1296,8 @@ z.a,z.b = L.ab.pa,L.ab.pb \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 6 , 0 ) L.AB =line: new (z.A,z.B) @@ -1261,7 +1305,7 @@ C.apo = L.AB : apollonius (2) z.O,z.C = get_points ( C.apo ) z.D = C.apo : antipode (z.C) z.P = C.apo : point (0.30) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-matrices.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-matrices.tex index d533511fbe2..dfb17d2cc26 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-matrices.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-matrices.tex @@ -25,10 +25,11 @@ This \code{matrix} class has been created to avoid the need for an external libr \end{mybox} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix: new {{a,b},{c,d}} tex.print('M = ') M : print () - \end{tkzelements} + } \end{minipage} @@ -47,9 +48,10 @@ This \code{matrix} class has been created to avoid the need for an external libr \end{mybox} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () V = matrix : vector (1,2,3) tex.print('V = ') V : print () - \end{tkzelements} + } \end{minipage} \item Homogeneous transformation matrix [\ref{ssub:method_htm}] @@ -62,10 +64,11 @@ This \code{matrix} class has been created to avoid the need for an external libr \end{mybox} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () H = matrix : htm (math.pi/3,1,2,2,1) tex.print('H = ') H: print () - \end{tkzelements} + } \end{minipage} \end{itemize} @@ -79,17 +82,19 @@ This method (Refer to \ref{ssub:method_print}) is necessary to control the resul \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : new {{1,-1},{2,0}} M : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : new {{1,-1},{2,0}} M : print () - \end{tkzelements} + } \end{minipage} @@ -132,21 +137,23 @@ The number of rows is accessed with |M.rows| and the number of columns with |M.c \vspace{.5em} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new ({{1,2,3},{4,5,6}}) M : print () tex.print("Rows: "..M.rows) tex.print("Cols: "..M.cols) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new ({{1,2,3},{4,5,6}}) M : print () tex.print("Rows: "..M.rows) tex.print("Cols: "..M.cols) -\end{tkzelements} +} \end{minipage} % subsubsection attribute_set (end) @@ -157,21 +164,23 @@ The matrix must be square. This library was created for matrices of dimension 2 \vspace{.5em} \begin{minipage}{.6\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : square (3,1,1,0,2,-1,-2,1,-1,2) M : print () tex.print ('\\\\') tex.print ("Its determinant is: " .. M.det) - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : square (3,1,1,0,2,-1,-2,1,-1,2) M : print () tex.print ('\\\\') tex.print ("Its determinant is: "..M.det) -\end{tkzelements} +} \end{minipage} % subsubsection determinant (end) @@ -180,25 +189,27 @@ tex.print ("Its determinant is: "..M.det) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () a = point :new (1,-2) b = point :new (0,1) c = point :new (1,1) d = point :new (1,-1) A = matrix : new ({{a, b}, {c,d}}) tex.print(tostring(A.det)) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () a = point :new (1,-2) b = point :new (0,1) c = point :new (1,1) d = point :new (1,-1) A = matrix : new ({{a, b}, {c,d}}) tex.print(tostring(A.det)) -\end{tkzelements} +} \end{minipage} % subsubsection determinant_with_complex_numbers (end) % subsection attibutes_of_a_matrix (end) @@ -238,7 +249,8 @@ To simplify the entries, I've used a few functions to simplify the displays. \vspace{.5em} \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () A = matrix : new ({{1,2},{2,-1}}) B = matrix : new ({{-1,0},{1,3}}) S = A + B @@ -250,11 +262,12 @@ To simplify the entries, I've used a few functions to simplify the displays. dsp(S,'S') sym(" = ") dsp(A) sym(' + ') dsp(B) nl() nl() dsp(D,'D') sym(" = ") dsp(A) sym(' - ') dsp(B) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () local function dsp (M,name) if name then tex.print(name..' = ')print_matrix(M) @@ -279,7 +292,7 @@ nl() nl() dsp(S,'S') sym(" = ") dsp(A) sym(' + ') dsp(B) nl() nl() dsp(D,'D') sym(" = ") dsp(A) sym(' - ') dsp(B) -\end{tkzelements} +} \end{minipage} % subsubsection addition_of_matrices (end) @@ -290,7 +303,8 @@ To simplify the entries, I've used a few functions. You can find their definitio \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () A = matrix : new ({{1,2},{2,-1}}) B = matrix : new ({{-1,0},{1,3}}) P = A * B @@ -298,11 +312,12 @@ To simplify the entries, I've used a few functions. You can find their definitio C = A^3 K = 2 * A T = A^'T' - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () local function dsp (M,name) if name then tex.print(name..' = ')print_matrix(M) @@ -328,7 +343,7 @@ To simplify the entries, I've used a few functions. You can find their definitio nl() nl() dsp(A^('T'),"$A^{T}$") nl() nl() -\end{tkzelements} +} \end{minipage} \subsubsection{Metamethod \code{eq}} % (fold) @@ -378,7 +393,8 @@ This is the main method for creating a matrix. Here's an example of a 2x3 matrix \vspace{.5em} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () a = point : new (1,0) b = point : new (1,1) c = point : new (-1,1) @@ -387,11 +403,12 @@ This is the main method for creating a matrix. Here's an example of a 2x3 matrix f = point : new (0,-1) M = matrix : new ({{a,b,c},{d,e,f}}) M : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () a = point : new (1,0) b = point : new (1,1) c = point : new (-1,1) @@ -400,7 +417,7 @@ e = point : new (1,-1) f = point : new (0,-1) M = matrix : new ({{a,b,c},{d,e,f}}) M : print () -\end{tkzelements} +} \end{minipage} % subsubsection method_new (end) @@ -413,17 +430,19 @@ The special case of a column matrix, frequently used to represent a vector, can \vspace{.5em} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : vector (1,2,3) M : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : vector (1,2,3) M : print () - \end{tkzelements} + } \end{minipage} % subsubsection method_vector (end) @@ -442,7 +461,8 @@ which gives: \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () pi = math.pi M = matrix : htm (pi/4 , 3 , 1) z.A = point : new (2,-1) @@ -450,11 +470,12 @@ which gives: z.A.mtx : print () tex.print ('then after homogenization: ') V : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () pi = math.pi M = matrix : htm (pi/4 , 3 , 1) z.A = point : new (2,-1) @@ -462,7 +483,7 @@ which gives: z.A.mtx : print () tex.print ('then after homogenization: ') V : print () -\end{tkzelements} +} \end{minipage} % subsubsection method_homogenization (end) @@ -481,11 +502,12 @@ The main method is to create the matrix: A 3x3 matrix is created which combines a $\pi/4$ rotation and a $\overrightarrow{t}=(3,1)$ translation. -\begin{tkzelements} +\directlua{% +init_elements () pi = math.pi M = matrix : htm (pi/4 , 3 , 1) M : print () -\end{tkzelements} +} Now we can apply the matrix M. Let $A$ be the point defined here: \ref{ssub:method_homogenization}. By homogenization, we obtain the column matrix $V$. @@ -495,7 +517,8 @@ Now we can apply the matrix M. Let $A$ be the point defined here: \ref{ssub:meth W = A * V \end{mybox} -\begin{tkzelements} +\directlua{% +init_elements () pi = math.pi M = matrix : htm (pi/4 , 3 , 1) M :print () @@ -504,7 +527,7 @@ V = z.A.mtx : homogenization () V : print () tex.print('=') W = M * V W : print () -\end{tkzelements} +} All that remains is to extract the coordinates of the new point. % subsubsection method_htm (end) @@ -518,21 +541,23 @@ The method \code{get\_htm\_point} extracts a point from a vector obtained afte \begin{minipage}{.5\textwidth} \begin{verbatim} -\begin{tkzelements} +\directlua{% +init_elements () W : print () z.P = get_htm_point(W) tex.print("The affix of $P$ is: ") tex.print(display(z.P)) -\end{tkzelements} +} \end{verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () W : print () z.P = get_htm_point(W) tex.print("The affix of $P$ is: ") tex.print(display(z.P)) -\end{tkzelements} +} \end{minipage} % subsubsection method_code_get__htm__point (end) @@ -548,7 +573,8 @@ The above operations can be simplified by using the \code{htm\_apply} method dir Then the method \code{htm\_apply} transforms a point, a list of points or an object. - \begin{tkzelements} + \directlua{% +init_elements () pi = math.pi M = matrix : htm (pi/4 , 3 , 1 ) z.O = point : new (0,0) @@ -566,11 +592,12 @@ z.K = point : new (2,2) T = triangle : new ( z.I , z.J , z.K ) Tp = M : htm_apply (T) z.Kp = Tp.pc -\end{tkzelements} +} \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () pi = math.pi M = matrix : htm (pi/4 , 3 , 1 ) z.O = point : new (0,0) @@ -588,7 +615,7 @@ z.Kp = Tp.pc T = triangle : new ( z.I , z.J , z.K ) Tp = M : htm_apply (T) z.Kp = Tp.pc -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} @@ -609,7 +636,8 @@ New cartesian coordinates system: \vspace{.5 em} \begin{minipage}{.5\textwidth} \begin{verbatim} -\begin{tkzelements} +\directlua{% +init_elements () pi = math.pi tp = tex.print nl = '\\\\' @@ -625,11 +653,12 @@ New cartesian coordinates system: V : print () z.N = get_htm_point(V) tex.print(display(z.N)) -\end{tkzelements} +} \end{verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () pi = math.pi tp = tex.print nl = '\\\\' @@ -645,7 +674,7 @@ New cartesian coordinates system: V : print () z.N = get_htm_point(V) tex.print(display(z.N)) - \end{tkzelements} + } \end{minipage} % subsubsection method_code_htm__apply (end) @@ -659,18 +688,20 @@ We have already seen this method in the presentation of matrices. We first need \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : square (2,2,3,-5,4) M : print () -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : square (2,2,3,-5,4) M : print () tex.print(S) -\end{tkzelements} +} \end{minipage} % subsubsection method_square (end) @@ -682,17 +713,19 @@ With the \pkg{amsmath} package loaded, this method can be used. By default, the \vspace{.5em} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new ({{math.sqrt(2),math.sqrt(3)},{math.sqrt(4),math.sqrt(5)}}) M : print ('pmatrix') -\end{tkzelements} +} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new ({{math.sqrt(2),math.sqrt(3)},{math.sqrt(4),math.sqrt(5)}}) tkz_dc = 3 M : print ('pmatrix') -\end{tkzelements} +} \vspace{.5em} @@ -703,17 +736,19 @@ In the case of a square matrix, it is possible to transmit a list of values whos \vspace{.5em} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : square (2,1,0,0,2) M : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : square (2,1,0,0,2) M : print () - \end{tkzelements} + } \end{minipage} % subsubsection method_print (end) @@ -727,7 +762,8 @@ Below, $A$ is an array. It can be displayed as a simple array or as a matrix, bu \vspace{.5em} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () A = {{1,2},{1,-1}} tex.print ('A = ') print_array (A) tex.print (' or ') @@ -735,11 +771,12 @@ Below, $A$ is an array. It can be displayed as a simple array or as a matrix, bu M = matrix : new ({{1,1},{0,2}}) tex.print ('\\\\') tex.print ('M = ') M : print () -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () A = {{1,2},{1,-1}} tex.print ('A = ') print_array (A) tex.print (' or ') @@ -747,7 +784,7 @@ Below, $A$ is an array. It can be displayed as a simple array or as a matrix, bu M = matrix : new ({{1,1},{0,2}}) tex.print ('\\\\') tex.print ('M = ') M : print () -\end{tkzelements} +} \end{minipage} @@ -758,19 +795,21 @@ Below, $A$ is an array. It can be displayed as a simple array or as a matrix, bu \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () M = matrix : new {{1,2},{2,-1}} S = M: get(1,1) + M: get(2,2) tex.print(S) - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new {{1,2},{2,-1}} S = M: get(1,1) + M: get(2,2) tex.print(S) -\end{tkzelements} +} \end{minipage} @@ -781,21 +820,23 @@ tex.print(S) \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () A = matrix : new ({{1,2},{2,-1}}) tex.print("Inverse of $A = $") B = A : inverse () B : print () -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () A = matrix : new ({{1,2},{2,-3}}) tex.print("Inverse of $A = $") B = A : inverse () B : print () -\end{tkzelements} +} \end{minipage} % subsubsection inverse_matrix (end) @@ -804,22 +845,24 @@ tex.print(S) \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new ({{1,0,1},{1,2, 1},{0,-1,2}}) tex.print("$M = $") print_matrix (M) tex.print('\\\\') tex.print("Inverse of $M = M^{-1} = $") print_matrix (M^-1) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () M = matrix : new ({{1,0,1},{1,2,1},{0,-1,2}}) tex.print("$M = $") print_matrix (M) tex.print('\\\\') tex.print("Inverse of $M = M^{-1} = $") print_matrix (M^-1) -\end{tkzelements} +} \end{minipage} % subsubsection inverse_matrix_with_power_syntax (end) @@ -832,21 +875,23 @@ A transposed matrix can be accessed with |A: transpose ()| or with |A^{'T'}|. \vspace{.5em} \begin{minipage}{.6\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () A = matrix : new ({{1,2},{2,-1}}) AT = A : transpose () tex.print("$A^{'T'} = $") AT : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () A = matrix : new ({{1,2},{2,-1}}) AT = A : transpose () tex.print("$A^{'T'} = $") AT : print () - \end{tkzelements} + } \end{minipage} \vspace{.5em} @@ -860,7 +905,8 @@ Remark: |(A ^'T')^'T' = A| \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () N = matrix : new {{1, 0, 3},{2, 1, 0},{-1, 2, 0}} tex.print('N = ') print_matrix(N) tex.print('\\\\') @@ -871,11 +917,12 @@ Remark: |(A ^'T')^'T' = A| tex.print('N $\\times$ adj(N) = ') print_matrix(N.i) tex.print('\\\\') tex.print('det(N) = ') tex.print(N.det) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () N = matrix : new {{1, 0, 3},{2, 1, 0},{-1, 2, 0}} tex.print('N = ') print_matrix(N) N.a = N : adjugate () @@ -885,7 +932,7 @@ Remark: |(A ^'T')^'T' = A| tex.print('N $\\times$ adj(N) = ') print_matrix(N.i) tex.print('\\\\') tex.print('det(N) = ') tex.print(N.det) -\end{tkzelements} +} \end{minipage} % subsubsection method_adjugate (end) @@ -898,17 +945,19 @@ Creating the identity matrix order 3 \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () Id_3 = matrix : identity (3) Id_3 : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () Id_3 = matrix : identity (3) Id_3 : print () -\end{tkzelements} +} \end{minipage} % subsubsection methode_identity (end) @@ -922,7 +971,8 @@ For the moment, this method only concerns matrices of order 2. \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () A = matrix : new {{5,-3}, {6,-4}} tex.print('A = ') A : print () D,P = A : diagonalize () @@ -936,11 +986,12 @@ For the moment, this method only concerns matrices of order 2. tex.print('Verification: $P^{-1}P = $ ') T = P^(-1)*P T : print () - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () A = matrix : new {{5,-3}, {6,-4}} tex.print('A = ') A : print () D,P = A : diagonalize () @@ -954,7 +1005,7 @@ For the moment, this method only concerns matrices of order 2. tex.print('Verification: $P^{-1}P = $ ') T = P^(-1)*P T : print () - \end{tkzelements} + } \end{minipage} % subsubsection diagonalization (end) @@ -964,7 +1015,8 @@ For the moment, this method only concerns matrices of order 2. The method returns \code{true} if the matrix is orthogonal and \code{false} otherwise. \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () local cos = math.cos local sin = math.sin local pi = math.pi @@ -983,10 +1035,11 @@ The method returns \code{true} if the matrix is orthogonal and \code{false} othe print_matrix(transposeMatrix (A)) tex.print('=') inv_matrix (A) : print () - \end{tkzelements} + } \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () local cos = math.cos local sin = math.sin local pi = math.pi @@ -1000,7 +1053,7 @@ tex.print('Test: $A^T = A^{-1} ?$') print_matrix(transposeMatrix (A)) tex.print('=') inv_matrix (A) : print () -\end{tkzelements} +} % subsubsection method_is_orthogonal (end) \subsubsection{Method \Imeth{matrix}{is\_diagonal}} % (fold) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-misc.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-misc.tex index e80a292858c..0266a2feb5c 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-misc.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-misc.tex @@ -25,7 +25,6 @@ \Igfct{math}{bisector\_ext (z1,z2,z3)} & L.Aa = bisector_ext (z.A,z.B,z.C) from A \\ \Igfct{math}{altitude (z1,z2,z3)} & altitude from z1 \\ \Igfct{package}{set\_lua\_to\_tex (list)} & set\_lua\_to\_tex('a','n') defines |\a| and |\n| \\ -\Igfct{package}{tkzUseLua (variable)} & |\textbackslash\tkzUseLua{a}| prints the value of a\\ %parabola (a,b,c) & to get \\ \Igfct{math}{value (v) } & apply |scale * value | \\ \Igfct{math}{real (v) } & apply | value /scale | \\ @@ -46,13 +45,14 @@ \subsection{Harmonic division with tkzphi } % (fold) \label{sub:harmonic_division_with_tkzphi} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale =.5 z.a = point: new(0,0) z.b = point: new(8,0) L.ab = line: new (z.a,z.b) z.m,z.n = L.ab: harmonic_both (tkzphi) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine[add= .2 and .2](a,n) @@ -62,17 +62,18 @@ \end{Verbatim} -\begin{tkzelements} - scale =.5 +\directlua{% +init_elements () + scale =.25 z.a = point: new(0,0) z.b = point: new(8,0) L.ab = line: new (z.a,z.b) z.m,z.n = L.ab: harmonic_both (tkzphi) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes - \tkzDrawLine[add= .2 and .2](a,n) + \tkzDrawLine[add= .1 and .1](a,n) \tkzDrawPoints(a,b,n,m) \tkzLabelPoints(a,b,n,m) \end{tikzpicture} @@ -83,7 +84,8 @@ \label{sub:function_islinear} \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (1, 1) z.b = point: new (2, 2) z.c = point: new (4, 4) @@ -92,7 +94,7 @@ else z.d = point: new (-1, -1) end -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(a,...,d) @@ -101,7 +103,8 @@ \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (1, 1) z.b = point: new (2, 2) z.c = point: new (4, 4) @@ -110,7 +113,7 @@ else z.d = point: new (-1, -1) end -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes @@ -141,13 +144,14 @@ If |scale = 1.2| with a = 6 then real(a) = $6 / 1.2 = 5$ . \subsection{Transfer from lua to \TEX} % (fold) \label{sub:transfer_from_lua_to_tex} -It's possible to transfer variable from Lua to \TEX{} with -\Igfct{package}{\textbackslash{tkzUseLua}}. +It's possible to transfer variable from Lua to \TEX{} with the macro +\tkzcname{tkzUseLua}. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) z.B = point : new (3 , 2) z.C = point : new (2 , 5) @@ -155,7 +159,7 @@ It's possible to transfer variable from Lua to \TEX{} with d = L.AB : distance (z.C) l = L.AB.length z.H = L.AB : projection (z.C) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B C,H) @@ -167,7 +171,8 @@ It's possible to transfer variable from Lua to \TEX{} with \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) z.B = point : new (3 , 2) z.C = point : new (2 , 5) @@ -175,7 +180,7 @@ It's possible to transfer variable from Lua to \TEX{} with d = L.AB : distance (z.C) l = L.AB.length z.H = L.AB : projection (z.C) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes @@ -191,7 +196,8 @@ It's possible to transfer variable from Lua to \TEX{} with \subsection{Normalized angles : Slope of lines (ab), (ac) and (ad)} % (fold) \label{sub:normalized_angles} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(0, 0) z.b = point: new(-3, -3) z.c = point: new(0, 3) @@ -205,7 +211,7 @@ It's possible to transfer variable from Lua to \TEX{} with angle = point.arg (z.d-z.a) tex.print('slope of (ad) : '..tostring(angle)..'\\\\') tex.print('slope normalized of (acd) : '..tostring(angle\_normalize(angle))..'\\\\') -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines[red](a,b a,c a,d) @@ -213,7 +219,8 @@ It's possible to transfer variable from Lua to \TEX{} with \tkzLabelPoints(a,b,c,d) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.a = point: new(0, 0) z.b = point: new(-3, -3) @@ -228,7 +235,7 @@ tex.print('slope normalized of (ac) : '..tostring(angle_normalize(angle))..'\\\\ angle = point.arg (z.d-z.a) tex.print('slope of (ad) : '..tostring(angle)..'\\\\') tex.print('slope normalized of (ad) : '..tostring(angle_normalize(angle))..'\\\\') -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} @@ -248,13 +255,14 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(0, 0) z.b = point: new(-2, -2) z.c = point: new(0, 3) angcb = tkzround ( get_angle (z.a,z.c,z.b),3) angbc = tkzround ( get_angle (z.a,z.b,z.c),3) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -269,14 +277,15 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.2 z.a = point: new(0, 0) z.b = point: new(-2, -2) z.c = point: new(0, 3) angcb = tkzround ( get_angle (z.a,z.c,z.b),3) angbc = tkzround ( get_angle (z.a,z.b,z.c),3) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} @@ -298,7 +307,8 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) z.C = point: new(0,3) @@ -307,7 +317,7 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro z.B_1, z.C_1 = get_points (T.ABC: anti ()) x = dot_product (z.A,z.B,z.C) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -319,7 +329,8 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.A = point: new(0,0) z.B = point: new(5,0) @@ -329,7 +340,7 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro z.B_1, z.C_1 = get_points (T.ABC: anti ()) x = dot_product (z.A,z.B,z.C) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes @@ -359,7 +370,8 @@ These functions are useful if you don't need to create a useful triangle object \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (0, 0) z.b = point: new (5, -2) z.c = point: new (2, 3) @@ -368,7 +380,7 @@ These functions are useful if you don't need to create a useful triangle object angic = tkzround ( get_angle (z.a,z.i,z.c),2) angci = tkzround ( get_angle (z.a,z.b,z.i),2) z.e = bisector_ext (z.a,z.b,z.c).pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -385,7 +397,8 @@ These functions are useful if you don't need to create a useful triangle object \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (0, 0) z.b = point: new (5, -2) z.c = point: new (2, 3) @@ -394,7 +407,7 @@ These functions are useful if you don't need to create a useful triangle object angic = tkzround ( get_angle (z.a,z.i,z.c),2) angci = tkzround ( get_angle (z.a,z.b,z.i),2) z.e = bisector_ext (z.a,z.b,z.c).pb -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -425,7 +438,8 @@ This function solves the equation $ax^2+bx+c= 0$ with real or complex numbers. \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () tex.sprint('Solve : $x^2+1=0$ The solution set is ') r1,r2 = solve_quadratic(1,0,1) tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}') @@ -440,11 +454,12 @@ This function solves the equation $ax^2+bx+c= 0$ with real or complex numbers. tex.sprint('Solve : $ix^2+(1+i)x+(-1+i)=0$ The solution set is ') r1,r2 = solve_quadratic(a,b,c) tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}') -\end{tkzelements} +} \end{Verbatim} \end{minipage} -\begin{tkzelements} +\directlua{% +init_elements () tex.sprint('Solve : $x^2+1=0$ The solution set is ') r1,r2 = solve_quadratic(1,0,1) tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}') @@ -459,7 +474,7 @@ This function solves the equation $ax^2+bx+c= 0$ with real or complex numbers. tex.sprint('Solve : $ix^2+(1+i)x+(-1+i)=0$ The solution set is ') r1,r2 = solve_quadratic(a,b,c) tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}') -\end{tkzelements} +} % subsubsection function_solve__quadratic (end) % section math_functions (end) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-parallelogram.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-parallelogram.tex index 6088f6cfb34..d6a1187ff36 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-parallelogram.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-parallelogram.tex @@ -39,7 +39,8 @@ Creation | P.new = parallelogram : new (z.A,z.B,z.C,z.D)| % subsubsection example_attributes (end) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 1 ) z.C = point : new ( 7 , 5 ) @@ -49,7 +50,7 @@ z.B = P.new.pb z.C = P.new.pc z.D = P.new.pd z.I = P.new.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C,D) @@ -61,7 +62,8 @@ z.I = P.new.center \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 1 ) z.C = point : new ( 7 , 5 ) @@ -71,7 +73,7 @@ z.B = P.new.pb z.C = P.new.pc z.D = P.new.pd z.I = P.new.center -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -109,15 +111,16 @@ z.I = P.new.center % subsubsection parallelogram_with_fourth_method (end) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new ( 0 , 0 ) -z.B = point : new ( 4 , 1 ) -z.C = point : new ( 5 , 3 ) +z.B = point : new ( 3 , 1 ) +z.C = point : new ( 4 , 3 ) P.four = parallelogram : fourth (z.A,z.B,z.C) z.D = P.four.pd z.I = P.four.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C,D) @@ -129,14 +132,16 @@ z.I = P.four.center \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () + scale = .75 z.A = point : new ( 0 , 0 ) -z.B = point : new ( 4 , 1 ) -z.C = point : new ( 5 , 3 ) +z.B = point : new ( 3 , 1 ) +z.C = point : new ( 4 , 3 ) P.four = parallelogram : fourth (z.A,z.B,z.C) z.D = P.four.pd z.I = P.four.center -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} @@ -147,5 +152,6 @@ z.I = P.four.center \tkzLabelPoints[above](C,D) \tkzDrawPoints[red](I) \end{tikzpicture} +\hspace{\fill} \end{minipage} % subsubsection parallelogram_with_side_method (end) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-point.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-point.tex index 0da8f16b78b..7dba1b80224 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-point.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-point.tex @@ -86,7 +86,8 @@ The creation of a point is done using the following method, but there are other % Method \Imeth{point}{new} \begin{mybox} - Creation |z.A = point: new (1,2) | + Creation \\ + |z.A = point: new (1,2) | \end{mybox} The point $A$ has coordinates $x=1$ and $y=2$. If you use the notation |z.A|, then $A$ will be referenced as a node in \TIKZ\ or in \pkg{tkz-euclide}. @@ -103,7 +104,7 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name \Iattr{point}{re} & |z.A.re = 1| & [\ref{ssub:methods}] \\ \Iattr{point}{im} & |z.A.im = 2| & [\ref{ssub:methods}] \\ \Iattr{point}{type} & |z.A.type = 'point'| & \\ - \Iattr{point}{argument} & |z.A.argument $\approx$ 0.78539816339745| & [\ref{ssub:example_point_attributes}] \\ + \Iattr{point}{argument} & |z.A.argument| $\approx$ |0.78539816339745| & [\ref{ssub:example_point_attributes}] \\ \Iattr{point}{modulus} & |z.A.modulus| $\approx$ |2.2360...| =$\sqrt{5}$ & [\ref{ssub:example_point_attributes}] \\ \bottomrule \end{tabular} @@ -114,16 +115,17 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name \subsubsection{Example: point attributes} % (fold) \label{ssub:example_point_attributes} -\begin{tkzelements} +\directlua{ +init_elements () z.M = point: new (1,2) -\end{tkzelements} +} \hspace*{\fill} \begin{Verbatim} -\begin{tkzelements} - z.M = point: new (1,2) -\end{tkzelements} +\directlua{ + init_elements () + z.M = point: new (1,2)} \end{Verbatim} \pgfkeys{/pgf/number format/.cd,std,precision=2} \let\pmpn\pgfmathprintnumber @@ -172,13 +174,16 @@ $|z_M| =\sqrt{5}\approx \pmpn{\tkzUseLua{z.M.modulus}}$ cm} \begin{scope}[every annotation/.style={fill=lightgray!15,anchor = east}] \node [annotation,font =\small,text width=6cm] at (current bounding box.west) { Attributes of \texttt{z.M} - \begin{itemize} - \item \texttt{z.M.re} = 1 - \item \texttt{z.M.im} = 2 - \item \texttt{z.M.type} = 'point' - \item \texttt{z.M.argument} = $\theta \approx \pmpn{\tkzUseLua{z.M.argument}}$ rad - \item \texttt{z.M.modulus} = $|z_M| =\sqrt{5}\approx \pmpn{\tkzUseLua{z.M.modulus}}$ cm - \end{itemize} + \begin{mybox}{} + \begin{itemize} + \item \texttt{z.M.re} = 1 + \item \texttt{z.M.im} = 2 + \item \texttt{z.M.type} = 'point' + \item \texttt{z.M.argument} = $\theta \approx \pmpn{\tkzUseLua{z.M.argument}}$ rad + \item \texttt{z.M.modulus} = $|z_M| =\sqrt{5}\approx \pmpn{\tkzUseLua{z.M.modulus}}$ cm + \end{itemize} + \end{mybox} + }; \end{scope} \end{tikzpicture} @@ -195,12 +200,13 @@ Attributes of \texttt{z.M} \normalsize \begin{minipage}{\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{ +init_elements () z.A = point : new ( 2 , 3 ) z.O = point : new ( 0 , 0 ) z.I = point : new ( 1 , 0 ) -\end{tkzelements} -\hspace{\fill}\begin{tikzpicture} +} +\begin{tikzpicture} \tkzGetNodes \tkzInit[xmin=-4,ymin=-4,xmax=4,ymax=4] \tkzDrawCircle[dashed,red](O,A) @@ -216,11 +222,12 @@ Attributes of \texttt{z.M} \end{minipage} \begin{minipage}{\textwidth} - \begin{tkzelements} +\directlua{ +init_elements () z.A = point : new ( 2 , 3 ) z.O = point : new ( 0 , 0 ) z.I = point : new ( 1 , 0 ) - \end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -262,7 +269,7 @@ The methods described in the following table are standard and can be found in mo \midrule \textbf{Points} &&\\ \midrule -\Imeth{point}{north(r)} & |r| distance to the point (1 if empty) & [\ref{par:power_v2} ; \ref{ssub:methods}] \\ +\Imeth{point}{north(r)} & |r| distance to the point (1 if empty) & [\ref{ssub:power_v2} ; \ref{ssub:methods}] \\ \Imeth{point}{south(r)} & & \\ \Imeth{point}{east(r)} & & \\ \Imeth{point}{west(r)} & & \\ @@ -292,14 +299,15 @@ If |d| is absent then it is considered equal to 1. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{ + init_elements () z.O = point : new ( 0, 0 ) z.A = z.O : east () z.Ap = z.O : east (2) : north (2) z.B = z.O : north () z.C = z.O : west () z.D = z.O : south () -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C,D) @@ -308,7 +316,8 @@ If |d| is absent then it is considered equal to 1. \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{ + init_elements () scale = 1.5 z.O = point : new ( 0, 0 ) z.A = z.O : east () @@ -316,7 +325,7 @@ If |d| is absent then it is considered equal to 1. z.B = z.O : north () z.C = z.O : west () z.D = z.O : south () -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -338,11 +347,12 @@ This involves defining a point using its modulus and argument. \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{ + init_elements () z.O = point: new (0, 0) z.A = point: new (3, 0) z.F = point: polar (3, math.pi/3) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) @@ -355,12 +365,13 @@ This involves defining a point using its modulus and argument. \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} +\directlua{ +init_elements () scale = .75 z.O = point: new (0, 0) z.A = point: new (3, 0) z.F = point: polar (3, math.pi/3) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -383,34 +394,27 @@ This involves defining a point using its modulus and argument. The result is a point located between the origin and the initial point at a distance of $1$ from the origin. -\begin{tkzelements} +\directlua{ +init_elements () scale = 1.5 z.O = point : new (0,0) z.A = point : new (2,1) z.B = z.A : normalize () z.I = point : new (1,0) -\end{tkzelements} +} + -\begin{center} - \begin{tikzpicture} - \tkzGetNodes - \tkzDrawSegment(O,A) - \tkzDrawCircle(O,B) - \tkzDrawPoints(O,A,B,I) - \tkzLabelPoints(O,A) - \tkzLabelPoints[above](B) - \tkzLabelPoint[below right](I){$1$} - \end{tikzpicture} -\end{center} +\begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{ +init_elements () scale = 1.5 z.O = point : new (0,0) z.A = point : new (1,2) z.B = z.A : normalize () z.I = point : new (1,0) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawSegment(O,A) @@ -420,6 +424,20 @@ z.I = point : new (1,0) \tkzLabelPoint[below right](I){$1$} \end{tikzpicture} \end{Verbatim} +\end{minipage} +\begin{minipage}{0.5\textwidth} +\begin{center} + \begin{tikzpicture} + \tkzGetNodes + \tkzDrawSegment(O,A) + \tkzDrawCircle(O,B) + \tkzDrawPoints(O,A,B,I) + \tkzLabelPoints(O,A) + \tkzLabelPoints[above](B) + \tkzLabelPoint[below right](I){$1$} + \end{tikzpicture} +\end{center} + \end{minipage} % subsubsection method_normalize (end) @@ -431,12 +449,13 @@ Let $O$ be the origin of the plane. The "orthogonal (d)" method is used to obtai \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{ +init_elements () z.A = point : new ( 3 , 1 ) z.B = z.A : orthogonal (1) z.O = point : new ( 0,0 ) z.C = z.A : orthogonal () -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawSegments(O,A O,C) @@ -446,12 +465,13 @@ Let $O$ be the origin of the plane. The "orthogonal (d)" method is used to obtai \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 3 , 1 ) z.B = z.A : orthogonal (1) z.O = point : new ( 0,0 ) z.C = z.A : orthogonal () -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes @@ -471,43 +491,39 @@ This method is complementary to the previous one, so you may not wish to have $\ \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} - z.A = point : new ( 3 , 1 ) - z.B = z.A : orthogonal (1) - z.O = point : new ( 0,0 ) - -- z.B = z.B : at (z.A) -- or - z.B = z.A : orthogonal (1) : at (z.A) - z.E = z.A : orthogonal (1) - z.C = z.A+z.B - z.D =(z.C-z.A):orthogonal(2) : at (z.C) -\end{tkzelements} -\begin{tikzpicture}[gridded] +\directlua{% +init_elements () +z.O = point : new ( 0,0 ) +z.A = point : new ( 3 , 2 ) +z.B = z.A : orthogonal (1) +z.C = z.A+z.B +z.D =(z.C-z.A):orthogonal(2) : at (z.C) +} + \begin{tikzpicture}[gridded] \tkzGetNodes \tkzLabelPoints[below right](O,A,C) - \tkzLabelPoints[above](B,D,E) - \tkzDrawSegments(O,A A,B A,C C,D O,E) - \tkzDrawPoints(O,A,B,C,D,E) -\end{tikzpicture} + \tkzLabelPoints[above](B,D) + \tkzDrawSegments(O,A A,B A,C C,D O,B) + \tkzDrawPoints(O,A,B,C,D) + \end{tikzpicture} \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} -z.A = point : new ( 3 , 1 ) -z.B = z.A : orthogonal (1) +\directlua{% +init_elements () z.O = point : new ( 0,0 ) --- z.B = z.B : at (z.A) -- or -z.B = z.A : orthogonal (1) : at (z.A) -z.E = z.A : orthogonal (1) +z.A = point : new ( 3 , 2 ) +z.B = z.A : orthogonal (1) z.C = z.A+z.B z.D =(z.C-z.A):orthogonal(2) : at (z.C) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzLabelPoints[below right](O,A,C) - \tkzLabelPoints[above](B,D,E) - \tkzDrawSegments(O,A A,B A,C C,D O,E) - \tkzDrawPoints(O,A,B,C,D,E) + \tkzLabelPoints[above](B,D) + \tkzDrawSegments(O,A A,B A,C C,D O,B) + \tkzDrawPoints(O,A,B,C,D) \end{tikzpicture} \end{center} \end{minipage} @@ -521,12 +537,13 @@ The arguments are the angle of rotation in radians, and here a list of points. \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(0, -1) z.b = point: new(4, 0) z.o = point: new(6, -2) z.ap,z.bp = z.o : rotation (math.pi/2,z.a,z.b) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(o,a o,a' o,b o,b') @@ -539,13 +556,14 @@ The arguments are the angle of rotation in radians, and here a list of points. \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.a = point: new(0, -1) z.b = point: new(4, 0) z.o = point: new(6, -2) z.ap,z.bp = z.o : rotation (math.pi/2,z.a,z.b) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -567,7 +585,8 @@ Rotate a triangle by an angle of $\pi/6$ around $O$. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.O = point : new ( -1 , -1 ) z.A = point : new ( 2 , 0 ) @@ -581,7 +600,7 @@ Rotate a triangle by an angle of $\pi/6$ around $O$. z.C = T.ABC.pc T.ApBpCp = z.O : rotation (math.pi/3,T.ABC) z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C A',B',C' A,B,E,F A',B',E',F') @@ -592,7 +611,8 @@ Rotate a triangle by an angle of $\pi/6$ around $O$. \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new ( -1 , -1 ) z.A = point : new ( 2 , 0 ) z.B = point : new ( 5 , 0 ) @@ -605,7 +625,7 @@ _,_,z.Ep,z.Fp = get_points ( S.new ) z.C = T.ABC.pc T.ApBpCp = z.O : rotation (math.pi/3,T.ABC) z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -630,14 +650,15 @@ Example of the symmetry of an object \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(0,-1) z.b = point: new(2, 0) L.ab = line : new (z.a,z.b) C.ab = circle : new (z.a,z.b) z.o = point: new(1,1) z.ap,z.bp = get_points (z.o: symmetry (C.ab)) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(a,b a',b') @@ -649,14 +670,15 @@ Example of the symmetry of an object \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(0, -1) z.b = point: new(2, 0) L.ab = line : new (z.a,z.b) C.ab = circle : new (z.a,z.b) z.o = point: new(1, 1) z.ap,z.bp = get_points (z.o: symmetry (C.ab)) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex index 30ee773eba9..55484fa41a0 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex @@ -42,15 +42,16 @@ Creation | Q.new = rectangle : new (z.A,z.B,z.C,z.D)| \label{ssub:quadrilateral_attributes} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 5 , 1 ) -z.D = point : new ( -1 , 4 ) +z.D = point : new ( 0 , 3 ) Q.ABCD = quadrilateral : new ( z.A , z.B , z.C , z.D ) z.I = Q.ABCD.i z.G = Q.ABCD.g -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -61,15 +62,16 @@ z.G = Q.ABCD.g \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 5 , 1 ) -z.D = point : new ( -1 , 4 ) +z.D = point : new ( 0 , 3 ) Q.ABCD = quadrilateral : new ( z.A , z.B , z.C , z.D ) z.I = Q.ABCD.i z.G = Q.ABCD.g -\end{tkzelements} +} \hspace{\fill}\begin{tikzpicture} \tkzGetNodes @@ -102,7 +104,8 @@ z.G = Q.ABCD.g \label{ssub:inscribed_quadrilateral} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.D = point : polar ( 4 , 2*math.pi/3 ) @@ -115,7 +118,7 @@ if bool == true then C.cir = triangle : new (z.A,z.B,z.C): circum_circle () z.O = C.cir.center end -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -129,7 +132,8 @@ end \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) @@ -143,7 +147,7 @@ if bool == true then C.cir = triangle : new (z.A,z.B,z.C): circum_circle () z.O = C.cir.center end -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex index cd0ae2981cb..0a9edc0d6d0 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex @@ -41,14 +41,15 @@ Creation | R.ABCD = rectangle : new (z.A,z.B,z.C,z.D)| \label{ssub:example} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 4 , 4) z.D = point : new ( 0 , 4) R.new = rectangle : new (z.A,z.B,z.C,z.D) z.I = R.new.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -61,7 +62,8 @@ z.I = R.new.center \end{Verbatim} \end{minipage} \hspace{\fill}\begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =1.5 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) @@ -69,7 +71,7 @@ z.I = R.new.center z.D = point : new ( 0 , 2) R.new = rectangle : new (z.A,z.B,z.C,z.D) z.I = R.new.center - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes @@ -118,7 +120,8 @@ z.I = R.new.center \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) @@ -127,7 +130,7 @@ P.ABCD = rectangle : angle ( z.I , z.A , math.pi/6) z.B = P.ABCD.pb z.C = P.ABCD.pc z.D = P.ABCD.pd -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -139,7 +142,8 @@ z.D = P.ABCD.pd \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) @@ -148,7 +152,7 @@ P.ABCD = rectangle : angle ( z.I , z.A , math.pi/6) z.B = P.ABCD.pb z.C = P.ABCD.pc z.D = P.ABCD.pd -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C,D) @@ -165,14 +169,15 @@ z.D = P.ABCD.pd \label{ssub:side_method} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 3 ) R.side = rectangle : side (z.A,z.B,3) z.C = R.side.pc z.D = R.side.pd z.I = R.side.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C,D) @@ -184,14 +189,15 @@ z.I = R.side.center \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 3 ) R.side = rectangle : side (z.A,z.B,3) z.C = R.side.pc z.D = R.side.pd z.I = R.side.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C,D) @@ -208,14 +214,15 @@ z.I = R.side.center \label{ssub:diagonal_method} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.C = point : new ( 4 , 3 ) R.diag = rectangle : diagonal (z.A,z.C) z.B = R.diag.pb z.D = R.diag.pd z.I = R.diag.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -229,14 +236,15 @@ z.I = R.diag.center \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.C = point : new ( 4 , 3 ) R.diag = rectangle : diagonal (z.A,z.C) z.B = R.diag.pb z.D = R.diag.pd z.I = R.diag.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -254,14 +262,15 @@ z.I = R.diag.center \label{ssub:gold_method} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.X = point : new ( 0 , 0 ) z.Y = point : new ( 4 , 2 ) R.gold = rectangle : gold (z.X,z.Y) z.Z = R.gold.pc z.W = R.gold.pd z.I = R.gold.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -275,14 +284,15 @@ z.I = R.gold.center \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.X = point : new ( 0 , 0 ) z.Y = point : new ( 4 , 2 ) R.gold = rectangle : gold (z.X,z.Y) z.Z = R.gold.pc z.W = R.gold.pd z.I = R.gold.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-regular.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-regular.tex index 98b6ac3610f..b4034f92454 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-regular.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-regular.tex @@ -33,7 +33,9 @@ Creation | RP.IA = regular_polygon : new (z.I,z.A,6)| \label{ssub:pentagon} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () +scale = .75 z.O = point: new (0,0) z.I = point: new (1,3) z.A = point: new (2,0) @@ -41,7 +43,7 @@ RP.five = regular_polygon : new (z.I,z.A,5) RP.five : name ("P_") C.ins = circle: radius (z.I,RP.five.inradius) z.H = RP.five.proj -\end{tkzelements} +} \begin{tikzpicture} \def\nb{\tkzUseLua{RP.five.nb}} \tkzGetNodes @@ -53,7 +55,9 @@ z.H = RP.five.proj \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () +scale = .75 z.O = point: new (0,0) z.I = point: new (1,3) z.A = point: new (2,0) @@ -61,7 +65,7 @@ z.H = RP.five.proj RP.five : name ("P_") C.ins = circle : radius ( z.I , RP.five.inradius ) z.H = RP.five.proj - \end{tkzelements} + } \hspace{\fill} \begin{tikzpicture} \def\nb{\tkzUseLua{RP.five.nb}} @@ -71,6 +75,7 @@ z.H = RP.five.proj \tkzDrawPoints[red](P_1,P_...,P_\nb,H,I) \tkzLabelPoints[red](I,A,H) \end{tikzpicture} + \hspace{\fill} \end{minipage} % subsubsection pentagon (end) % subsection regular_polygon_attributes (end) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-square.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-square.tex index 17e26d105fe..1a5b69bba53 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-square.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-square.tex @@ -41,7 +41,8 @@ Creation | S.AB = square : new (z.A,z.B,z.C,z.D)| \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 4 , 4) @@ -49,7 +50,7 @@ z.D = point : new ( 0 , 4) S.new = square : new ( z.A , z.B ,z.C,z.D) z.I = S.new.center z.H = S.new.proj -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[orange](I,A I,H) @@ -65,7 +66,8 @@ z.H = S.new.proj \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 4 , 4) @@ -73,7 +75,7 @@ z.H = S.new.proj S.new = square : new ( z.A , z.B ,z.C,z.D) z.I = S.new.center z.H = S.new.proj - \end{tkzelements} + } \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -115,7 +117,8 @@ z.H = S.new.proj % \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.A = point : new ( 0 , 0 ) z.B = point : new ( 2 , 1 ) @@ -124,7 +127,7 @@ z.H = S.new.proj z.C = S.side.pc z.D = S.side.pd z.I = S.side.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -137,7 +140,8 @@ z.H = S.new.proj \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = 2 z.A = point : new ( 0 , 0 ) z.B = point : new ( 2 , 1 ) @@ -146,7 +150,7 @@ z.B = S.side.pb z.C = S.side.pc z.D = S.side.pd z.I = S.side.center -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-triangle.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-triangle.tex index b144ed3e012..af4dac7c7ba 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-triangle.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-triangle.tex @@ -46,12 +46,13 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) z.C = point: new(2,3) T.ABC = triangle: new (z.A,z.B,z.C) -\end{tkzelements} +} \def\wangle#1{\tkzDN[2]{% \tkzUseLua{math.deg(T.ABC.#1)}}} \begin{tikzpicture} @@ -64,12 +65,13 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) z.C = point: new(2,3) T.ABC = triangle: new (z.A,z.B,z.C) -\end{tkzelements} +} \def\wangle#1{\tkzDN[2]{\tkzUseLua{math.deg(T.ABC.#1)}}} \begin{tikzpicture} \tkzGetNodes @@ -85,7 +87,8 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \label{ssub:example_triangle_attributes} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (4 , 0) z.C = point: new (0 , 3) @@ -100,7 +103,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp alpha = T.ABC.alpha beta = T.ABC.beta gamma = T.ABC.gamma -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -114,7 +117,8 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (4 , 0) z.C = point: new (1 , 3) @@ -129,7 +133,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp alpha = T.ABC.alpha beta = T.ABC.beta gamma = T.ABC.gamma -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -207,7 +211,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \Imeth{triangle}{bisector (n) } & |L.Bb = T.ABC : bisector (1) | n = 1 line from $B$ \footnote{|_,z.b = get_points(L.Bb)| recovers the common point of the opposite side and bisector. If you don't need to use the triangle object several times, you can obtain a bisector with the function |bisector (z.A,z.B,z.C)| [\ref{misc}]}& [\ref{ssub:method_imeth_triangle_bisector}]\\ -\Imeth{triangle}{bisector\_ext(n) } & n=2 line from the third vertex.& [\ref{sub:harmonic_division_and_bisector}]\\ +\Imeth{triangle}{bisector\_ext(n) } & n=2 line from the third vertex.& [\ref{ssub:harmonic_division_and_bisector}]\\ \Imeth{triangle}{symmedian\_line (n)} & Cevian with respect to Lemoine point.& [\ref{ssub:method_imeth_triangle_symmedial} ; \ref{ssub:method_imeth_line_isosceles}]\\ @@ -299,7 +303,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp \Imeth{triangle}{steiner\_circumellipse ()} & [ex. \ref{ssub:steiner_inellipse_and_circumellipse}] \\ -\Imeth{triangle}{euler\_ellipse ()} & [ex. (\ref{sub:euler_ellipse}]\\ +\Imeth{triangle}{euler\_ellipse ()} & [ex. (\ref{ssub:euler_ellipse}]\\ \midrule \textbf{Miscellaneous} &\\ \midrule @@ -322,7 +326,8 @@ The points of contact of the inscribed circle (incircle) with the triangle in qu \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(1,0) z.b = point: new(6,2) z.c = point: new(2,5) @@ -330,7 +335,7 @@ T = triangle : new (z.a,z.b,z.c) z.g = T : gergonne_point () z.i = T.incenter z.ta,z.tb,z.tc = get_points (T : intouch ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(a,b,c) @@ -344,7 +349,8 @@ z.ta,z.tb,z.tc = get_points (T : intouch ()) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new(1,0) z.b = point: new(6,2) z.c = point: new(2,5) @@ -352,7 +358,7 @@ T = triangle : new (z.a,z.b,z.c) z.g = T : gergonne_point () z.i = T.incenter z.ta,z.tb,z.tc = get_points (T : intouch ()) -\end{tkzelements} +} \begin{center} @@ -378,7 +384,8 @@ Let $E_a$ be the point at which the $J_a$-excircle meets the side $(BC)$ of a tr \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .7 z.A = point : new (0,0) z.B = point : new (3.6,0) @@ -389,7 +396,7 @@ Let $E_a$ be the point at which the $J_a$-excircle meets the side $(BC)$ of a tr z.J_c = get_points (T.ABC : excentral ()) z.E_a,z.E_b, z.E_c = get_points (T.ABC : extouch ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(A,B,C) @@ -407,7 +414,8 @@ Let $E_a$ be the point at which the $J_a$-excircle meets the side $(BC)$ of a tr \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .7 z.A = point : new (0,0) z.B = point : new (3.6,0) @@ -418,7 +426,7 @@ Let $E_a$ be the point at which the $J_a$-excircle meets the side $(BC)$ of a tr z.J_c = get_points (T.ABC : excentral ()) z.E_a,z.E_b, z.E_c = get_points (T.ABC : extouch ()) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -450,7 +458,8 @@ The Mittenpunkt is the symmedian point of the excentral triangle. The mittenpunk \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1 z.A = point : new ( 0 , 0 ) z.B = point : new ( 6 , 0 ) @@ -463,11 +472,12 @@ The Mittenpunkt is the symmedian point of the excentral triangle. The mittenpunk z.Mi = T : mittenpunkt_point () T.int = T : extouch () z.Ta,z.Tb,z.Tc = get_points(T.int) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1 z.A = point : new ( 0 , 0 ) z.B = point : new ( 6 , 0 ) @@ -480,7 +490,7 @@ The Mittenpunkt is the symmedian point of the excentral triangle. The mittenpunk z.Mi = T : mittenpunkt_point () T.int = T : extouch () z.Ta,z.Tb,z.Tc = get_points(T.int) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[scale=.5] \tkzGetNodes @@ -530,7 +540,8 @@ This involves obtaining the projections of a point onto the sides of a triangle. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (5 , 0) z.C = point: new (-.4 , 4) @@ -539,11 +550,12 @@ z.J,_ = get_points(T.ABC: ex_circle (2)) z.X , z.Y, z.Z = T.ABC : projection (z.J) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (5 , 0) z.C = point: new (-.4 , 4) @@ -552,7 +564,7 @@ z.J,_ = get_points(T.ABC: ex_circle (2)) z.X , z.Y, z.Z = T.ABC : projection (z.J) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -597,7 +609,8 @@ Given a reference triangle $ABC$, the trilinear coordinates of a point $P$ with \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 4 , 3 ) @@ -607,7 +620,7 @@ b = T.ABC.b c = T.ABC.c z.Gp = T.ABC : trilinear (b*c,a*c,a*b) z.G = T.ABC : barycentric (1,1,1) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -618,7 +631,8 @@ z.G = T.ABC : barycentric (1,1,1) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) z.C = point : new ( 4 , 3 ) @@ -628,7 +642,7 @@ b = T.ABC.b c = T.ABC.c z.Gp = T.ABC : trilinear (b*c,a*c,a*b) z.G = T.ABC : barycentric (1,1,1) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -651,14 +665,15 @@ This method produces a triplet of coordinates which are the barycentric coordina \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (1,1) z.B = point: new (8,0) z.C = point: new (2,5) T = triangle: new(z.A,z.B,z.C) z.G = T.centroid ca,cb,cc = T : barycentric_coordinates (z.G) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -669,7 +684,8 @@ This method produces a triplet of coordinates which are the barycentric coordina \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = .75 z.A = point: new (1,1) z.B = point: new (8,0) @@ -677,7 +693,7 @@ This method produces a triplet of coordinates which are the barycentric coordina T = triangle: new(z.A,z.B,z.C) z.G = T.centroid ca,cb,cc = T : barycentric_coordinates (z.G) - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -699,7 +715,8 @@ In the next example, the point $D$ is defined by $\overrightarrow{AD} = 1\cdot \ \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (1,1) z.B = point: new (8,0) @@ -708,7 +725,7 @@ In the next example, the point $D$ is defined by $\overrightarrow{AD} = 1\cdot \ T = triangle: new(z.A,z.B,z.C) z.D = T : base (1,1) z.E = T : base (.5,1) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,D,C A,B,E,C) @@ -719,7 +736,8 @@ In the next example, the point $D$ is defined by $\overrightarrow{AD} = 1\cdot \ \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = .75 z.A = point: new (1,1) z.B = point: new (8,0) @@ -728,7 +746,7 @@ In the next example, the point $D$ is defined by $\overrightarrow{AD} = 1\cdot \ T = triangle: new(z.A,z.B,z.C) z.D = T : base (1,1) z.E = T : base (.5,1) - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -751,7 +769,8 @@ The points $a$, $b$ and $c$ are the Euler points. They are the midpoints of the \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () scale = 1.25 z.A = point: new (0,0) z.B = point: new (5,0) @@ -766,7 +785,7 @@ The points $a$, $b$ and $c$ are the Euler points. They are the midpoints of the z.Ha, z.Hb, z.Hc = get_points (T.orthic) - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[red](A,B,C) @@ -780,7 +799,8 @@ The points $a$, $b$ and $c$ are the Euler points. They are the midpoints of the \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = 1.25 z.A = point: new (0,0) z.B = point: new (5,0) @@ -795,7 +815,7 @@ The points $a$, $b$ and $c$ are the Euler points. They are the midpoints of the z.Ha, z.Hb, z.Hc = get_points (T.orthic) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -821,7 +841,8 @@ In the next example, we look for the centre of gravity in two different ways: th \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.5 z.A = point: new (0,0) z.B = point: new (5,0) @@ -837,11 +858,12 @@ In the next example, we look for the centre of gravity in two different ways: th z.e7, z.e8, z.e9 = T : nine_points () -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.5 z.A = point: new (0,0) z.B = point: new (5,0) @@ -857,7 +879,7 @@ In the next example, we look for the centre of gravity in two different ways: th z.e7, z.e8, z.e9 = T : nine_points () -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[red](A,B,C) @@ -889,7 +911,8 @@ There are several methods to obtain one or more altitudes of a triangle. One pos \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (5,0) z.C = point: new (2,4) @@ -900,7 +923,7 @@ There are several methods to obtain one or more altitudes of a triangle. One pos z.Hc = L.HC.pb z.Ha = L.HA.pb z.a,z.b,z.c = get_points (T : orthic ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -915,7 +938,8 @@ There are several methods to obtain one or more altitudes of a triangle. One pos \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (5,0) z.C = point: new (2,4) @@ -926,7 +950,7 @@ There are several methods to obtain one or more altitudes of a triangle. One pos z.Hc = L.HC.pb z.Ha = L.HA.pb z.a,z.b,z.c = get_points (T : orthic ()) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -953,7 +977,8 @@ There are several methods to obtain one or more bisectors of a triangle. One pos \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) z.B = point : new (3 , 2) z.C = point : new (2 , 5) @@ -962,7 +987,7 @@ There are several methods to obtain one or more bisectors of a triangle. One pos z.E = L.AE.pb z.F = T.ABC : bisector (1).pb z.a,z.b,z.c = get_points (T.ABC : incentral ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -977,7 +1002,8 @@ There are several methods to obtain one or more bisectors of a triangle. One pos \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) z.B = point : new (3 , 2) z.C = point : new (2 , 5) @@ -986,7 +1012,7 @@ There are several methods to obtain one or more bisectors of a triangle. One pos z.E = L.AE.pb z.F = T.ABC : bisector (1).pb z.a,z.b,z.c = get_points (T.ABC : incentral ()) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1019,14 +1045,15 @@ There are several ways of obtaining the Euler circle. The first would be to use \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (5,0) z.C = point: new (1,4) T = triangle: new(z.A,z.B,z.C) C.euler = T : euler_circle () z.N,z.K = get_points (C.euler) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[red](A,B,C) @@ -1038,14 +1065,15 @@ There are several ways of obtaining the Euler circle. The first would be to use \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (5,0) z.C = point: new (1,4) T = triangle: new(z.A,z.B,z.C) C.euler = T : euler_circle () z.N,z.K = get_points (C.euler) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1068,14 +1096,15 @@ To obtain the circumscribed circle, simply use the \code{T.circumcenter} attribu \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (5,0) z.C = point: new (1,4) T = triangle: new(z.A,z.B,z.C) C.circum = T : circum_circle () z.O,z.K = get_points (C.circum) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[red](A,B,C) @@ -1087,14 +1116,15 @@ To obtain the circumscribed circle, simply use the \code{T.circumcenter} attribu \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (5,0) z.C = point: new (1,4) T = triangle: new(z.A,z.B,z.C) C.circum = T : circum_circle () z.O,z.K = get_points (C.circum) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1122,7 +1152,8 @@ The incenter is the point of concurrence of the triangle's angle bisectors. In a \vspace{6pt} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.A = point : new (0 , 0) z.B = point : new (5 , 0) @@ -1133,7 +1164,7 @@ The incenter is the point of concurrence of the triangle's angle bisectors. In a z.G = T.ABC : bisector (2).pb C.IH = T.ABC : in_circle () z.I,z.H = get_points (C.IH) -\end{tkzelements} +} \begin{tikzpicture}% [ new/.style ={ color = orange }, one/.style = { new,/tkzmkangle/size=.5 }, @@ -1166,7 +1197,8 @@ The incenter is the point of concurrence of the triangle's angle bisectors. In a \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0 , 0) z.B = point : new (5 , 0) z.C = point : new (1 , 3) @@ -1176,7 +1208,7 @@ The incenter is the point of concurrence of the triangle's angle bisectors. In a z.G = T.ABC : bisector (2).pb C.IH = T.ABC : in_circle () z.I,z.H = get_points (C.IH) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} @@ -1222,7 +1254,8 @@ Given a triangle, extend two sides in the direction opposite their common vertex \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (5 , 0) z.C = point: new (-.4 , 4) @@ -1239,11 +1272,12 @@ z.Zi = T.ABC : projection (z.I) z.Xj , z.Yj, z.Zj = T.ABC : projection (z.J) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0 , 0) z.B = point: new (5 , 0) @@ -1261,7 +1295,7 @@ z.Zi = T.ABC : projection (z.I) z.Xj , z.Yj, z.Zj = T.ABC : projection (z.J) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1305,7 +1339,8 @@ z.Zj = T.ABC : projection (z.J) In geometry, the incircle of the medial triangle of a triangle is the Spieker circle. Its center is the Spieker center. \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.5 z.A = point: new (1,1) z.B = point: new (5,1) @@ -1318,7 +1353,7 @@ In geometry, the incircle of the medial triangle of a triangle is the Spieker ci z.Qa = midpoint(z.A,z.N) z.Qb = midpoint(z.B,z.N) z.Qc = midpoint(z.C,z.N) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1335,7 +1370,8 @@ In geometry, the incircle of the medial triangle of a triangle is the Spieker ci \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (1,1) z.B = point: new (5,1) z.C = point: new (2.2,4) @@ -1347,7 +1383,7 @@ In geometry, the incircle of the medial triangle of a triangle is the Spieker ci z.Qa = midpoint(z.A,z.N) z.Qb = midpoint(z.B,z.N) z.Qc = midpoint(z.C,z.N) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C Qa,Qb,Qc) @@ -1374,7 +1410,8 @@ Picking a Cevian point $P$ in the interior of a triangle $ABC$ and drawing Cevia \vspace{6pt} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.A = point: new (0,0) z.B = point: new (4,0) @@ -1388,7 +1425,7 @@ Picking a Cevian point $P$ in the interior of a triangle $ABC$ and drawing Cevia z.Pa,z.Pb,z.Pc = get_points (T.cevian) C.cev = T.ABC : cevian_circle (z.P) z.w = C.cev.center -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1408,7 +1445,8 @@ Picking a Cevian point $P$ in the interior of a triangle $ABC$ and drawing Cevia \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (4,0) z.C = point: new (1.8,3) @@ -1421,7 +1459,7 @@ Picking a Cevian point $P$ in the interior of a triangle $ABC$ and drawing Cevia z.Pa,z.Pb,z.Pc = get_points (T.cevian) C.cev = T.ABC : cevian_circle (z.P) z.w = C.cev.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[cyan](A,B,C) @@ -1449,7 +1487,8 @@ Given a point $P$, the pedal triangle of $P$ is the triangle whose polygon verti \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) z.C = point: new(1.5,3) @@ -1460,7 +1499,7 @@ Given a point $P$, the pedal triangle of $P$ is the triangle whose polygon verti C.pedal = T.ABC : pedal_circle (z.O) z.w = C.pedal.center z.T = C.pedal.through - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1474,7 +1513,8 @@ Given a point $P$, the pedal triangle of $P$ is the triangle whose polygon verti \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new(0,0) z.B = point: new(5,0) z.C = point: new(1.5,3) @@ -1485,7 +1525,7 @@ Given a point $P$, the pedal triangle of $P$ is the triangle whose polygon verti C.pedal = T.ABC : pedal_circle (z.O) z.w = C.pedal.center z.T = C.pedal.through - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1510,7 +1550,8 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point:new (0,0) z.C = point:new (5,0) z.B = point:new (1,3) @@ -1519,7 +1560,7 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at z.w,z.t = get_points(C.conway) z.t1,z.t2,z.t3,z.t4, z.t5,z.t6= T.ABC : conway_points () - \end{tkzelements} + } \hspace*{5cm} \begin{tikzpicture} \tkzGetNodes @@ -1536,7 +1577,8 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = .5 z.A = point:new (0,0) z.C = point:new (5,0) @@ -1546,7 +1588,7 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at z.w,z.t = get_points(C.conway) z.t1,z.t2,z.t3, z.t4,z.t5,z.t6= T.ABC : conway_points () - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1568,7 +1610,8 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (1,1) z.B = point: new (6,0) @@ -1576,8 +1619,8 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at T = triangle: new(z.A,z.B,z.C) C.bevan = T : bevan_circle () z.c,z.t = get_points (C.bevan) - -- or z.c = T : bevan_point () -\end{tkzelements} + % or z.c = T : bevan_point () +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -1589,7 +1632,8 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =.5 z.A = point: new (1,1) z.B = point: new (6,0) @@ -1597,8 +1641,7 @@ In plane geometry, Conway's circle theorem states that when the sides meeting at T = triangle: new(z.A,z.B,z.C) C.bevan = T : bevan_circle () z.c,z.t = get_points (C.bevan) - -- or z.c = T : bevan_point () - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1631,7 +1674,8 @@ The exinscribed circles of a triangle are tangent to the circle of the nine poin \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .8 z.A = point: new (0,0) z.B = point: new (6,0) @@ -1643,7 +1687,7 @@ The exinscribed circles of a triangle are tangent to the circle of the nine poin z.Ja,z.Jb,z.Jc = get_points ( T.ABC : excentral () ) z.I = T.ABC.incenter z.Ia,z.Ib,z.Ic = get_points (T.ABC : intouch ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(Ja,Jb,Jc) @@ -1660,7 +1704,8 @@ The exinscribed circles of a triangle are tangent to the circle of the nine poin \end{minipage} -\begin{tkzelements} +\directlua{% +init_elements () scale = .7 z.A = point: new (0,0) z.B = point: new (6,0) @@ -1672,7 +1717,7 @@ The exinscribed circles of a triangle are tangent to the circle of the nine poin z.Ja,z.Jb,z.Jc = get_points ( T.ABC : excentral () ) z.I = T.ABC.incenter z.Ia,z.Ib,z.Ic = get_points (T.ABC : intouch ()) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1698,7 +1743,8 @@ The \code{similar} method creates a new triangle whose sides are parallel to the \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () scale =.5 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -1707,7 +1753,7 @@ The \code{similar} method creates a new triangle whose sides are parallel to the z.X,z.Y,z.Z = get_points ( T.ABC : similar ()) z.H_a,z.H_b, z.H_c = get_points (T.ABC : orthic ()) - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C X,Y,Z) @@ -1719,7 +1765,8 @@ The \code{similar} method creates a new triangle whose sides are parallel to the \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =.5 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -1728,7 +1775,7 @@ The \code{similar} method creates a new triangle whose sides are parallel to the z.X,z.Y,z.Z = get_points ( T.ABC : similar ()) z.H_a,z.H_b, z.H_c = get_points (T.ABC : orthic ()) - \end{tkzelements} + } \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes @@ -1752,7 +1799,8 @@ The triangle $MaMbMc$ formed by joining the midpoints of the sides of a triangle \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () scale = 1.25 z.A = point: new (0,1) z.B = point: new (6,0) @@ -1762,7 +1810,7 @@ The triangle $MaMbMc$ formed by joining the midpoints of the sides of a triangle z.Ma,z.Mb,z.Mc= get_points (T.med) z.G = T.centroid z.O = T.circumcenter - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -1780,7 +1828,8 @@ The triangle $MaMbMc$ formed by joining the midpoints of the sides of a triangle \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = 1.25 z.A = point: new (0,1) z.B = point: new (6,0) @@ -1790,7 +1839,7 @@ The triangle $MaMbMc$ formed by joining the midpoints of the sides of a triangle z.Ma,z.Mb,z.Mc= get_points (T.med) z.G = T.centroid z.O = T.circumcenter - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1822,7 +1871,8 @@ The incentral triangle $IaIbIc$ is the Cevian triangle of a triangle $ABC$ with \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1 , 4) @@ -1832,7 +1882,7 @@ The incentral triangle $IaIbIc$ is the Cevian triangle of a triangle $ABC$ with z.Ic = get_points (T.ABC : incentral ()) z.Ta,z.Tb, z.Tc = get_points (T.ABC : intouch ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1847,7 +1897,8 @@ The incentral triangle $IaIbIc$ is the Cevian triangle of a triangle $ABC$ with \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1 , 4) @@ -1857,7 +1908,7 @@ The incentral triangle $IaIbIc$ is the Cevian triangle of a triangle $ABC$ with z.Ic = get_points (T.ABC : incentral ()) z.Ta,z.Tb, z.Tc = get_points (T.ABC : intouch ()) - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1888,7 +1939,8 @@ The sides of an orthic triangle are parallel to the tangents to the circumcircle \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (0,0) z.B = point: new (5,0) @@ -1904,7 +1956,7 @@ The sides of an orthic triangle are parallel to the tangents to the circumcircle z.Ta, z.Tb, z.Tc = get_points (T : tangential ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[red](A,B,C Ta,Tb,Tc) @@ -1922,7 +1974,8 @@ The sides of an orthic triangle are parallel to the tangents to the circumcircle \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (0,0) z.B = point: new (5,0) @@ -1938,7 +1991,7 @@ The sides of an orthic triangle are parallel to the tangents to the circumcircle z.Ta, z.Tb, z.Tc = get_points (T : tangential ()) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1981,7 +2034,8 @@ In the next example, $L$ is the \code{Lemoine point} or the \code{Symmedian poin \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.A = point : new (0,0) z.B = point : new (7,0) @@ -1996,9 +2050,9 @@ In the next example, $L$ is the \code{Lemoine point} or the \code{Symmedian poin _,z.Kb = get_points(L.Kb) z.G = T.ABC.centroid z.Ia,z.Ib,z.Ic = get_points ( T.ABC : incentral ()) - -- z.T = T.ABC : trilinear (0,1,1) + % z.T = T.ABC : trilinear (0,1,1) z.I = T.ABC.incenter -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -2014,7 +2068,8 @@ In the next example, $L$ is the \code{Lemoine point} or the \code{Symmedian poin \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.A = point : new (0,0) z.B = point : new (7,0) @@ -2029,9 +2084,8 @@ In the next example, $L$ is the \code{Lemoine point} or the \code{Symmedian poin _,z.Kb = get_points(L.Kb) z.G = T.ABC.centroid z.Ia,z.Ib,z.Ic = get_points ( T.ABC : incentral ()) - -- z.T = T.ABC : trilinear (0,1,1) z.I = T.ABC.incenter -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -2059,7 +2113,8 @@ The anticomplementary triangle is the triangle $TaTbTc$ which has a given triang \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.A = point: new (0,0) z.B = point: new (5,0) @@ -2069,7 +2124,7 @@ The anticomplementary triangle is the triangle $TaTbTc$ which has a given triang z.Ta, z.Tb, z.Tc = get_points (T.similar) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons[red](A,B,C) @@ -2081,7 +2136,8 @@ The anticomplementary triangle is the triangle $TaTbTc$ which has a given triang \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.A = point: new (0,0) z.B = point: new (5,0) @@ -2091,7 +2147,7 @@ The anticomplementary triangle is the triangle $TaTbTc$ which has a given triang z.Ta, z.Tb, z.Tc = get_points (T.similar) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -2116,7 +2172,8 @@ The line on which the orthocenter $H$, triangle centroid $G$, circumcenter $O$, \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1.5 , 3.5) @@ -2127,7 +2184,7 @@ The line on which the orthocenter $H$, triangle centroid $G$, circumcenter $O$, z.H = T.ABC.orthocenter z.P,z.Q,z.R = get_points (T.ABC: orthic()) z.K,z.I,z.J = get_points (T.ABC: medial ()) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines[blue](O,H) @@ -2143,7 +2200,8 @@ The line on which the orthocenter $H$, triangle centroid $G$, circumcenter $O$, \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1.5 , 3.5) @@ -2154,7 +2212,7 @@ The line on which the orthocenter $H$, triangle centroid $G$, circumcenter $O$, z.H = T.ABC. orthocenter z.P,z.Q,z.R = get_points (T.ABC: orthic()) z.K,z.I,z.J = get_points (T.ABC: medial ()) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -2174,13 +2232,14 @@ The line on which the orthocenter $H$, triangle centroid $G$, circumcenter $O$, \end{minipage} % subsubsection euler_line (end) -\subsection{Euler ellipse} % (fold) -\label{sub:euler_ellipse} +\subsubsection{Euler ellipse} % (fold) +\label{ssub:euler_ellipse} The Euler ellipse is a conic, tangent to the three sides of a triangle, with the orthocentre and the centre of the circumscribed circle as foci. Example of obtaining the Euler circle as well as the Euler ellipse. \vspace{6pt} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (2,3.8) z.B = point: new (0 ,0) z.C = point: new (6.2 ,0) @@ -2194,11 +2253,12 @@ ang = math.deg(E.euler.slope) z.O = T.ABC.circumcenter z.G = T.ABC.centroid z.H = T.ABC.orthocenter -\end{tkzelements} +} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (2,3.8) z.B = point: new (0 ,0) z.C = point: new (6.2 ,0) @@ -2212,7 +2272,7 @@ ang = math.deg(E.euler.slope) z.O = T.ABC.circumcenter z.G = T.ABC.centroid z.H = T.ABC.orthocenter -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} @@ -2242,7 +2302,7 @@ z.H = T.ABC.orthocenter \tkzLabelPoints[above](A) \end{tikzpicture} \end{Verbatim} -% subsection euler_ellipse (end) +% subsubsection euler_ellipse (end) \subsubsection{Steiner inellipse and circumellipse} % (fold) \label{ssub:steiner_inellipse_and_circumellipse} @@ -2251,7 +2311,8 @@ In this example, the inner and outer Steiner ellipses, referred to as the "inell \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (1 , 4) z.B = point: new (11 , 1) @@ -2270,10 +2331,11 @@ In this example, the inner and outer Steiner ellipses, referred to as the "inell L.T1,L.T2= E : tangent_from (z.M) z.T1 = L.T1.pb z.T2 = L.T2.pb -\end{tkzelements} +} \end{Verbatim} \end{minipage} -\begin{minipage}{.5\textwidth}\begin{tkzelements} +\begin{minipage}{.5\textwidth}\directlua{% +init_elements () scale = .5 z.A = point: new (1 , 4) z.B = point: new (11 , 1) @@ -2292,7 +2354,7 @@ z.M = C : point (0) L.T1,L.T2= E : tangent_from (z.M) z.T1 = L.T1.pb z.T2 = L.T2.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -2329,8 +2391,8 @@ z.T2 = L.T2.pb % subsubsection steiner_inellipse_and_circumellipse (end) -\subsection{Harmonic division and bisector} % (fold) -\label{sub:harmonic_division_and_bisector} +\subsubsection{Harmonic division and bisector} % (fold) +\label{ssub:harmonic_division_and_bisector} Let four points $A$, $C$, $B$ and $D$, in this order, lying on the straight line $(d)$ and $M$ un point pris hors de $(d)$. Then, if two of the following three propositions are true, then the third is also true: \begin{enumerate} @@ -2342,7 +2404,8 @@ Let four points $A$, $C$, $B$ and $D$, in this order, lying on the straight line \vspace{6pt} \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .4 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -2361,11 +2424,12 @@ Let four points $A$, $C$, $B$ and $D$, in this order, lying on the straight line L.MD = line: new (z.M,z.D) z.E = intersection (L.LL,L.MC) z.F = intersection (L.LL,L.MD) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale =.4 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -2384,7 +2448,7 @@ Let four points $A$, $C$, $B$ and $D$, in this order, lying on the straight line L.MD = line: new (z.M,z.D) z.E = intersection (L.LL,L.MC) z.F = intersection (L.LL,L.MD) -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -2418,7 +2482,7 @@ Let four points $A$, $C$, $B$ and $D$, in this order, lying on the straight line \tkzMarkSegments(B,E B,M B,F) \end{tikzpicture} \end{Verbatim} -% subsection harmonic_division_and_bisector (end) +% subsubsection harmonic_division_and_bisector (end) % diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-vectors.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-vectors.tex index ed1ea771833..f5e1e3a4305 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-vectors.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-vectors.tex @@ -25,8 +25,8 @@ z.C = ... z.D = ... V.AB = vector : new (z.A,z.B) V.CD = vector : new (z.C,z.D) -V.AE = V.AB + V.CD -- possible V.AB : add (V.CD) -z.E = V.AE.head -- we recover the final point (head) +V.AE = V.AB + V.CD % possible V.AB : add (V.CD) +z.E = V.AE.head % we recover the final point (head) \end{Verbatim} \subsection{Attributes of a vector} % (fold) @@ -56,7 +56,8 @@ z.E = V.AE.head -- we recover the final point (head) \begin{minipage}{.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (0,1) z.B = point: new (3,4) @@ -67,7 +68,7 @@ z.E = V.AE.head -- we recover the final point (head) v = vector : new (z.C,z.D) w =u+v z.E = w.head -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzLabelPoints(A,B,C,D,O,E) @@ -81,7 +82,8 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$ \end{Verbatim} \end{minipage} \begin{minipage}{.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0,0) z.A = point: new (0,1) z.B = point: new (3,4) @@ -92,7 +94,7 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$ v = vector : new (z.C,z.D) w = u+v z.E = w.head -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzLabelPoints(A,B,C,D,O,E) @@ -139,7 +141,9 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$ \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () +scale = .75 z.O = point: new (0,0) z.A = point: new (0,1) z.B = point: new (3,4) @@ -156,7 +160,7 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$ z.X = V.AX.head V.OY = V.AX : at (z.O) z.Y = V.OY.head -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawSegments[>=stealth,->,red](A,B A,C A,D A,N A,R A,X O,Y) @@ -165,7 +169,9 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$ \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () +scale = .75 z.O = point: new (0,0) z.A = point: new (0,1) z.B = point: new (3,4) @@ -182,7 +188,7 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$ z.X = V.AX.head V.OY = V.AX : at (z.O) z.Y = V.OY.head -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawSegments[>=stealth,->,red](A,B A,C A,D A,N A,R A,X O,Y) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes.tex index 1228c60e08c..3b7e1db188c 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes.tex @@ -41,20 +41,22 @@ A method is an operation (function or procedure) associated (linked) with an obj Example: The point object is used to vertically determine a new point object located at a certain distance from it (here 2). Then it is possible to rotate objects around it. \begin{Verbatim} - \begin{tkzelements} +\directlua{ + init_elements () z.A = point (1,0) z.B = z.A : north (2) z.C = z.A : rotation (math.pi/3,z.B) tex.print(tostring(z.C)) - \end{tkzelements} +} \end{Verbatim} -\begin{tkzelements} +\directlua{ + init_elements () z.A = point (1,0) z.B = z.A : north (2) z.C = z.A : rotation (math.pi/3,z.B) tex.print(tostring("The coordinates of $C$ are: " .. z.C.re .." and "..z.C.im)) -\end{tkzelements} +} % subsubsection methods (end) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex index 70b61fb902a..49afe50798b 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex @@ -14,7 +14,7 @@ |if bool == ... then ... else ... end| \end{mybox} - and outside the environment \tkzNameEnv{tkzelements} you can use the macro + and you can use the macro \begin{mybox} |\ifthenelse{\equal{\tkzUseLua{bool}}{true}}{ ... }{ ... }| \end{mybox} @@ -34,7 +34,7 @@ At present, the only obligation is to store the points in the table |z| \footnote{To place the point M in the table, simply write |z.M| = \ldots or |z["M"]|= \ldots} if you intend to use them in \TIKZ\ or \pkg{tkz-euclide}. f a point will not be used, you can designate it as you wish while adhering to Lua conventions. - Points within the \tkzNameEnv{tkzelements} environment must follow a convention in the form |z.name|, where |name| represents the name of the corresponding \tkzname{node}. + Points in the lua code must follow a convention in the form |z.name|, where |name| represents the name of the corresponding \tkzname{node}. As for the conventions for designating |name| you must adhere to Lua conventions in particular cases. \begin{enumerate} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex index 284ecca8eba..bb5d40e3728 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex @@ -10,7 +10,8 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new ( 0 , 0 ) z.B = point : new ( 3 , 0 ) @@ -21,7 +22,7 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t z.E = z.B: east (L.AB.length) z.M = L.AB.mid z.F = z.E : north (length(z.C,z.M)) -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -33,7 +34,8 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new ( 0 , 0 ) z.B = point : new ( 3 , 0 ) @@ -44,7 +46,7 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t z.E = z.B: east (L.AB.length) z.M = L.AB.mid z.F = z.E : north (length(z.C,z.M)) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[gridded] @@ -66,7 +68,8 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (0,0) z.a = point : new (4,0) z.B = point : new (7,-1) @@ -82,7 +85,7 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t z.Ip = C.Aa : internal_similitude (C.Bb) z.Jp = C.Aa : internal_similitude (C.Cc) z.Kp = C.Cc : internal_similitude (C.Bb) -\end{tkzelements} +} \begin{tikzpicture}[rotate=-60] \tkzGetNodes \tkzDrawCircles(A,a B,b C,c) @@ -94,7 +97,8 @@ Use of |north and east| functions linked to points, to transfer lengths, Refer t \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point : new (0,0) z.a = point : new (4,0) @@ -111,7 +115,7 @@ z.K = C.Cc : external_similitude (C.Bb) z.Ip = C.Aa : internal_similitude (C.Bb) z.Jp = C.Aa : internal_similitude (C.Cc) z.Kp = C.Cc : internal_similitude (C.Bb) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[rotate=30] @@ -132,7 +136,8 @@ z.Kp = C.Cc : internal_similitude (C.Bb) \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new (0,0) z.a = point : new (5,0) @@ -146,7 +151,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb) z.i,z.j = get_points (C.Aa : radical_axis (C.Bb)) z.k,z.l = get_points (C.Aa : radical_axis (C.Cc)) z.m,z.n = get_points (C.Bb : radical_axis (C.Cc)) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,a B,b C,c) @@ -155,7 +160,8 @@ z.Kp = C.Cc : internal_similitude (C.Bb) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point : new (0,0) z.a = point : new (5,0) @@ -169,7 +175,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb) z.i,z.j = get_points (C.Aa : radical_axis (C.Bb)) z.k,z.l = get_points (C.Aa : radical_axis (C.Cc)) z.m,z.n = get_points (C.Bb : radical_axis (C.Cc)) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -187,7 +193,8 @@ z.Kp = C.Cc : internal_similitude (C.Bb) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.P = point : new (0,0) z.Q = point : new (5,0) z.I = point : new (3,2) @@ -202,7 +209,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb) L.AF = line : new (z.A,z.F) L.CQ = line : new (z.C,z.Q) z.D = intersection (L.AF,L.CQ) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(P,E Q,E) @@ -215,7 +222,8 @@ z.Kp = C.Cc : internal_similitude (C.Bb) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale =.5 z.P = point : new (0,0) z.Q = point : new (5,0) @@ -231,7 +239,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb) L.AF = line : new (z.A,z.F) L.CQ = line : new (z.C,z.Q) z.D = intersection (L.AF,L.CQ) - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -251,7 +259,8 @@ z.Kp = C.Cc : internal_similitude (C.Bb) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.A = point: new (1,0) z.B = point: new (5,2) @@ -265,7 +274,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb) z.P = intersection (L.tA,T.bc) z.Q = intersection (L.tB,T.ca) z.R = intersection (L.tC,T.ab) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon[teal](A,B,C) @@ -280,7 +289,8 @@ z.Kp = C.Cc : internal_similitude (C.Bb) \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (1,0) z.B = point: new (5,2) @@ -294,7 +304,7 @@ L.tC = C.OA: tangent_at (z.C) z.R = intersection (L.tC,T.ab) z.P = intersection (L.tA,T.bc) z.Q = intersection (L.tB,T.ca) -\end{tkzelements} +} \begin{center} \begin{tikzpicture}[rotate=90] @@ -318,7 +328,8 @@ z.Q = intersection (L.tB,T.ca) \label{sub:alternate} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1 , 5) @@ -328,7 +339,7 @@ z.Q = intersection (L.tB,T.ca) z.D = intersection (L.AI,T.bc) L.LLC = T.ab: ll_from (z.C) z.E = intersection (L.AI,L.LLC) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -345,7 +356,8 @@ z.Q = intersection (L.tB,T.ca) \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (1 , 5) @@ -355,7 +367,7 @@ L.AI = line: new (z.A,z.I) z.D = intersection (L.AI,T.bc) L.LLC = T.ab: ll_from (z.C) z.E = intersection (L.AI,L.LLC) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -379,7 +391,8 @@ z.E = intersection (L.AI,L.LLC) For two circles to be orthogonal, it is necessary and sufficient for a secant passing through one of their common points to be seen from the other common point at a right angle. \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 2 ) L.AB = line : new ( z.A , z.B ) @@ -396,7 +409,7 @@ For two circles to be orthogonal, it is necessary and sufficient for a secant L.mm = L.TTp : ll_from (z.C) _,z.M = intersection (L.mm, C.AC) z.Mp = intersection (L.mm, C.BC) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -410,7 +423,8 @@ For two circles to be orthogonal, it is necessary and sufficient for a secant \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 2 ) L.AB = line : new ( z.A , z.B ) @@ -427,7 +441,7 @@ z.Mp = intersection (L.MC, C.BC) L.mm = L.TTp : ll_from (z.C) _,z.M = intersection (L.mm, C.AC) z.Mp = intersection (L.mm, C.BC) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -447,7 +461,8 @@ z.Mp = intersection (L.mm, C.BC) \subsection{Apollonius circle} % (fold) \label{sub:apollonius_circle} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -461,11 +476,12 @@ scale=.75 z.O = L.CD.mid L.AM = T.MAB.ab z.E = z.M : symmetry (z.A) -\end{tkzelements} +} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -479,7 +495,7 @@ scale=.75 z.O = L.CD.mid L.AM = T.MAB.ab z.E = z.M : symmetry (z.A) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} @@ -536,7 +552,8 @@ Remark : The circle can be obtained with: \label{sub:apollonius_and_circle_circumscribed} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale =.75 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -554,7 +571,7 @@ Remark : The circle can be obtained with: C.GA = circle: new (z.G,z.A) C.OC = circle: new (z.O,z.C) _,z.N = intersection (C.GA , C.OC) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,M) @@ -570,7 +587,8 @@ Remark : The circle can be obtained with: \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale =.75 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -588,7 +606,7 @@ Remark : The circle can be obtained with: C.GA = circle: new (z.G,z.A) C.OC = circle: new (z.O,z.C) _,z.N = intersection (C.GA , C.OC) -\end{tkzelements} +} \begin{center} @@ -614,7 +632,8 @@ Remark : The circle can be obtained with: \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (4.5 , 1) @@ -642,7 +661,7 @@ Remark : The circle can be obtained with: z.T = intersection (L.Bz,T.ABC.ca) L.Bpt = line: new (z.Bp,z.T) z.O3 = L.Bpt.mid -\end{tkzelements} +} \end{Verbatim} \begin{Verbatim} \begin{tikzpicture} @@ -658,7 +677,8 @@ Remark : The circle can be obtained with: \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (4.5 , 1) @@ -686,7 +706,7 @@ L.Bz = line: new (z.B,z.z) z.T = intersection (L.Bz,T.ABC.ca) L.Bpt = line: new (z.Bp,z.T) z.O3 = L.Bpt.mid -\end{tkzelements} +} \begin{center} @@ -708,7 +728,8 @@ z.O3 = L.Bpt.mid Same result using the function |T.ABC.ab : apollonius (k) | \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () scale = .75 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -721,7 +742,7 @@ Same result using the function |T.ABC.ab : apollonius (k) | z.w2,z.t2 = get_points ( C.AC ) C.BC = T.ABC.bc : apollonius (length(z.A,z.B)/length(z.A,z.C)) z.w3,z.t3 = get_points ( C.BC ) - \end{tkzelements} + } \end{Verbatim} % subsection apollonius_circles (end) @@ -731,7 +752,8 @@ Same result using the function |T.ABC.ab : apollonius (k) | \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O_1 = point: new (0, 0) z.O_2 = point: new (0, 1) z.A = point: new (0, 3) @@ -744,7 +766,7 @@ Same result using the function |T.ABC.ab : apollonius (k) | L = line: new (z.x,z.O_2) C = circle: new (z.O_2,z.A) z.C,z.D = intersection (L ,C) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O_1,A O_2,A) @@ -756,7 +778,8 @@ Same result using the function |T.ABC.ab : apollonius (k) | \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () z.O_1 = point: new (0, 0) z.O_2 = point: new (0, 1) z.A = point: new (0, 3) @@ -769,7 +792,7 @@ Same result using the function |T.ABC.ab : apollonius (k) | L = line: new (z.x,z.O_2) C = circle: new (z.O_2,z.A) z.C,z.D = intersection (L ,C) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -788,7 +811,8 @@ Same result using the function |T.ABC.ab : apollonius (k) | \subsection{Bankoff circle} % (fold) \label{sub:bankoff_circle} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (10 , 0) L.AB = line : new (z.A,z.B) @@ -826,7 +850,7 @@ Same result using the function |T.ABC.ab : apollonius (k) | z.O_4 = T.P0P1P2.circumcenter T.CP1P2 = triangle : new (z.C,z.P_1,z.P_2) z.O_5 = T.CP1P2.circumcenter -\end{tkzelements} +} \end{Verbatim} \begin{Verbatim} @@ -854,7 +878,8 @@ Same result using the function |T.ABC.ab : apollonius (k) | \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.A = point: new (0 , 0) z.B = point: new (10 , 0) @@ -893,7 +918,7 @@ Same result using the function |T.ABC.ab : apollonius (k) | z.O_4 = T.P0P1P2.circumcenter T.CP1P2 = triangle : new (z.C,z.P_1,z.P_2) z.O_5 = T.CP1P2.circumcenter -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -929,7 +954,8 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ \vspace{6pt} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () scale = 1.5 z.A = point : new (1,2) z.B = point : new (5,1) @@ -942,7 +968,7 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ T.ABC.b*T.ABC.b+T.ABC.c*T.ABC.c) L.SY = line : new (z.C,z.Lc) z.L = L.SY : point (k) - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -959,7 +985,8 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () scale = 1.5 z.A = point : new (1,2) z.B = point : new (5,1) @@ -972,7 +999,7 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ T.ABC.b*T.ABC.b+T.ABC.c*T.ABC.c) L.SY = line : new (z.C,z.Lc) z.L = L.SY : point (k) - \end{tkzelements} + } \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -997,7 +1024,8 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ \label{sub:example_cevian_with_orthocenter} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.5 z.a = point: new (1,2) z.b = point: new (5,1) @@ -1008,7 +1036,7 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ z.ta,z.tb,z.tc = get_points (T.cevian) C.cev = T : cevian_circle (z.i) z.w = C.cev.center -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(a,b,c ta,tb,tc) @@ -1020,7 +1048,8 @@ $L$ is the symmedian point or lemoine point. $\dfrac{CL}{CLc} = \dfrac{a^2+b^2}{ \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.5 z.a = point: new (1,2) z.b = point: new (5,1) @@ -1031,7 +1060,7 @@ T.cevian = T : cevian (z.i) z.ta,z.tb,z.tc = get_points (T.cevian) C.cev = T : cevian_circle (z.i) z.w = C.cev.center -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -1050,7 +1079,8 @@ z.w = C.cev.center \label{sub:excircles} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 0.7 z.A = point: new (0,0) z.B = point: new (6,0) @@ -1062,7 +1092,7 @@ z.w = C.cev.center la = line: new ( z.A, z.T_a) lb = line: new ( z.B, z.T_b) z.G = intersection (la,lb) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints[new](J_a,J_b,J_c) @@ -1085,7 +1115,8 @@ z.w = C.cev.center \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=0.7 z.A = point: new (0,0) z.B = point: new (6,0) @@ -1097,7 +1128,7 @@ z.w = C.cev.center la = line: new ( z.A, z.T_a) lb = line: new ( z.B, z.T_b) z.G = intersection (la,lb) -\end{tkzelements} +} \begin{center} @@ -1131,7 +1162,8 @@ z.w = C.cev.center \label{sub:divine_ratio} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (8 , 0) L.AB = line: new (z.A,z.B) @@ -1155,7 +1187,7 @@ C1 = circle: new (z.O_1,z.C) _,z.T = intersection (L.AR,C1) L.BG = line: new (z.B,z.G) z.L = intersection (L.AR,L.BG) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,C,E,F A,B,G,H) @@ -1166,7 +1198,8 @@ z.L = intersection (L.AR,L.BG) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (8 , 0) L.AB = line: new (z.A,z.B) @@ -1190,7 +1223,7 @@ C1 = circle: new (z.O_1,z.C) _,z.T = intersection (L.AR,C1) L.BG = line: new (z.B,z.G) z.L = intersection (L.AR,L.BG) -\end{tkzelements} +} \begin{center} @@ -1212,7 +1245,8 @@ z.L = intersection (L.AR,L.BG) % modif C: point (0.25) instead of 2 \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.O = point: new (0 , 0) z.F1 = point: new (4 , 0) @@ -1228,7 +1262,7 @@ z.L = intersection (L.AR,L.BG) L.J,L.K = E: tangent_from (z.L) z.J = L.J.pb z.K = L.K.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(F1,F2,O) @@ -1244,7 +1278,8 @@ z.L = intersection (L.AR,L.BG) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.O = point: new (0 , 0) z.F1 = point: new (4 , 0) @@ -1260,7 +1295,7 @@ z.L = C: point (0.25) L.J,L.K = E: tangent_from (z.L) z.J = L.J.pb z.K = L.K.pb -\end{tkzelements} +} \begin{center} @@ -1286,7 +1321,8 @@ z.K = L.K.pb \label{sub:gold_division} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (2.5,0) L.AB = line: new (z.A,z.B) @@ -1302,7 +1338,7 @@ z.G = intersection (L.mediator,C.BA) L.EG = line:new (z.E,z.G) z.C = intersection (L.EG,L.AB) z.O = C.AB: antipode (z.B) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawArc[delta=5](O,B)(G) @@ -1315,7 +1351,8 @@ z.O = C.AB: antipode (z.B) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (2.5,0) L.AB = line: new (z.A,z.B) @@ -1331,7 +1368,7 @@ z.G = intersection (L.mediator,C.BA) L.EG = line:new (z.E,z.G) z.C = intersection (L.EG,L.AB) z.O = C.AB: antipode (z.B) -\end{tkzelements} +} \begin{center} @@ -1354,7 +1391,8 @@ z.O = C.AB: antipode (z.B) \label{sub:ellipse} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.C = point: new (3 , 2) z.A = point: new (5 , 1) L.CA = line : new (z.C,z.A) @@ -1365,7 +1403,7 @@ z.O = C.AB: antipode (z.B) a = E.Rx b = E.Ry slope = math.deg(E.slope) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[teal](C,A) @@ -1376,7 +1414,8 @@ z.O = C.AB: antipode (z.B) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.C = point: new (3 , 2) z.A = point: new (5 , 1) L.CA = line : new (z.C,z.A) @@ -1387,7 +1426,7 @@ E = ellipse: new (z.C,z.A,z.B) a = E.Rx b = E.Ry slope = math.deg(E.slope) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1407,7 +1446,8 @@ slope = math.deg(E.slope) \label{sub:ellipse_with_radii} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.5 z.C = point: new (0 , 4) b = value(math.sqrt(8)) @@ -1416,7 +1456,7 @@ ang = math.deg(math.pi/4) E = ellipse: radii (z.C,a,b,math.pi/4) z.V = E : point (0) z.CoV = E : point (math.pi/2) -\end{tkzelements} +} \begin{tikzpicture}[gridded] \tkzGetNodes \tkzDrawEllipse[blue](C,\tkzUseLua{a}, @@ -1426,7 +1466,8 @@ z.CoV = E : point (math.pi/2) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale=.5 z.C = point: new (0 , 4) b = value(math.sqrt(8)) @@ -1435,7 +1476,7 @@ ang = math.deg(math.pi/4) E = ellipse: radii (z.C,a,b,math.pi/4) z.V = E : point (0) z.CoV = E : point (math.pi/2) -\end{tkzelements} +} \begin{center} @@ -1453,7 +1494,8 @@ z.CoV = E : point (math.pi/2) \label{sub:ellipse_with_foci} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () local e e = .8 z.A = point: new (2 , 3) @@ -1471,7 +1513,7 @@ z.CoV = E : point (math.pi/2) L.ta,L.tb = E: tangent_from (z.K) z.F = L.ta.pb z.G = L.tb.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(A,B,C,K,F,G,V,cV) @@ -1482,7 +1524,8 @@ z.CoV = E : point (math.pi/2) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () local e e = .8 z.A = point: new (2 , 3) @@ -1500,7 +1543,7 @@ ang = math.deg(E.slope) L.ta,L.tb = E: tangent_from (z.K) z.F = L.ta.pb z.G = L.tb.pb -\end{tkzelements} +} \begin{center} @@ -1521,7 +1564,8 @@ z.G = L.tb.pb \label{sub:euler_relation} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (0 , 0) z.B = point: new (5 , 0) @@ -1536,7 +1580,7 @@ z.G = L.tb.pb z.w = T.IBA.circumcenter L.Ow = line : new (z.O,z.w) _,z.E = intersection (L.Ow, C.OA) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawArc(J,X)(Y) @@ -1551,7 +1595,8 @@ z.G = L.tb.pb \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (5 , 0) z.C = point: new (-.4 , 4) @@ -1565,7 +1610,7 @@ T.IBA = triangle: new (z.I,z.B,z.A) z.w = T.IBA.circumcenter L.Ow = line : new (z.O,z.w) _,z.E = intersection (L.Ow, C.OA) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1589,7 +1634,8 @@ _,z.E = intersection (L.Ow, C.OA) \label{sub:external_angle} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (0 , 0) z.B = point: new (5 , 0) @@ -1599,7 +1645,7 @@ _,z.E = intersection (L.Ow, C.OA) z.O = T.ABC.circumcenter z.D = intersection (T.ext.ab,T.ABC.ab) z.E = z.C: symmetry (z.B) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1615,7 +1661,8 @@ _,z.E = intersection (L.Ow, C.OA) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (0 , 0) z.B = point: new (5 , 0) @@ -1625,7 +1672,7 @@ T.ext = T.ABC: excentral () z.O = T.ABC.circumcenter z.D = intersection (T.ext.ab,T.ABC.ab) z.E = z.C: symmetry (z.B) -\end{tkzelements} +} \begin{center} @@ -1651,7 +1698,8 @@ z.E = z.C: symmetry (z.B) \label{sub:internal_angle} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .8 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -1663,7 +1711,7 @@ z.E = z.C: symmetry (z.B) L.LL = T.ab: ll_from (z.C) L.AD = line: new (z.A,z.D) z.E = intersection (L.LL,L.AD) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -1679,7 +1727,8 @@ z.E = z.C: symmetry (z.B) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale =.8 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -1691,7 +1740,7 @@ z.D = intersection (L.AI, T.bc) L.LL = T.ab: ll_from (z.C) L.AD = line: new (z.A,z.D) z.E = intersection (L.LL,L.AD) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1715,7 +1764,8 @@ z.E = intersection (L.LL,L.AD) \label{sub:nine_points} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.5 z.A = point: new (0 , 0) z.B = point: new (5 , -.5) @@ -1740,8 +1790,8 @@ z.E = intersection (L.LL,L.AD) z.P = L.CU: projection (z.A) z.Q = L.CU: projection (z.B) L.LH = line: new (z.L,z.H) - z.F = intersection (L.LH,C.IH) -- feuerbach -\end{tkzelements} + z.F = intersection (L.LH,C.IH) % feuerbach +} \begin{tikzpicture} \tkzGetNodes @@ -1757,7 +1807,8 @@ z.E = intersection (L.LL,L.AD) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = 1 z.A = point: new (0 , 0) z.B = point: new (5 , -.5) @@ -1780,8 +1831,8 @@ L.ML = line: new (z.M,z.L) z.P = L.CU: projection (z.A) z.Q = L.CU: projection (z.B) L.LH = line: new (z.L,z.H) -z.F = intersection (L.LH,C.IH) -- feuerbach -\end{tkzelements} +z.F = intersection (L.LH,C.IH) % feuerbach +} \begin{center} \begin{tikzpicture}[rotate=90] @@ -1804,7 +1855,8 @@ z.F = intersection (L.LH,C.IH) -- feuerbach \label{sub:gold_ratio_with_segment} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (8 , 0) L.AB = line: new (z.A,z.B) @@ -1815,7 +1867,7 @@ z.F = intersection (L.LH,C.IH) -- feuerbach _,z.K = intersection (L.BX,C.MA) L.AK = line: new (z.Y,z.K) z.C = intersection (L.AK,L.AB) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B X,K) @@ -1827,7 +1879,8 @@ z.F = intersection (L.LH,C.IH) -- feuerbach \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0 , 0) z.B = point: new (8 , 0) @@ -1839,7 +1892,7 @@ C.MA = circle: new (z.M,z.A) _,z.K = intersection (L.BX,C.MA) L.AK = line: new (z.Y,z.K) z.C = intersection (L.AK,L.AB) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1859,7 +1912,8 @@ z.C = intersection (L.AK,L.AB) \label{sub:gold_arbelos} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.A = point: new (0 , 0) z.C = point: new (6 , 0) @@ -1872,7 +1926,7 @@ z.C = intersection (L.AK,L.AB) z.O_2 = L.CB.mid L.AB = line: new (z.A,z.B) z.O_0 = L.AB.mid -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O_1,C O_2,B O_0,B) @@ -1882,7 +1936,8 @@ z.C = intersection (L.AK,L.AB) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = .4 z.A = point: new (0 , 0) z.C = point: new (6 , 0) @@ -1895,7 +1950,7 @@ L.CB = line: new (z.C,z.B) z.O_2 = L.CB.mid L.AB = line: new (z.A,z.B) z.O_0 = L.AB.mid -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1913,7 +1968,8 @@ z.O_0 = L.AB.mid \label{sub:harmonic_division_v1} \begin{minipage}[t]{.4\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point: new (0 , 0) z.B = point: new (4 , 0) @@ -1926,7 +1982,7 @@ z.O_0 = L.AB.mid z.F = z.B : symmetry (z.E) L.GF = line :new (z.G,z.F) z.C = intersection (L.GF,L.AB) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,B A,G A,D A,G F,E G,F G,D) @@ -1937,7 +1993,8 @@ z.O_0 = L.AB.mid \end{Verbatim} \end{minipage} \begin{minipage}[t]{.6\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point: new (0 , 0) z.B = point: new (4 , 0) @@ -1950,7 +2007,7 @@ z.O_0 = L.AB.mid z.F = z.B : symmetry (z.E) L.GF = line :new (z.G,z.F) z.C = intersection (L.GF,L.AB) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -1968,7 +2025,8 @@ z.O_0 = L.AB.mid \label{sub:harmonic_division_v2} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -1985,7 +2043,7 @@ L.BF = line: new (z.B,z.F) z.G = intersection (L.AE,L.BF) L.GX = line: new (z.G,z.X) z.C = intersection (L.GX,L.AB) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines(A,D A,E B,F D,F X,A X,B X,C) @@ -1995,7 +2053,8 @@ z.C = intersection (L.GX,L.AB) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -2012,7 +2071,7 @@ L.BF = line: new (z.B,z.F) z.G = intersection (L.AE,L.BF) L.GX = line: new (z.G,z.X) z.C = intersection (L.GX,L.AB) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2030,7 +2089,8 @@ z.C = intersection (L.GX,L.AB) \label{sub:menelaus} \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (5 , 4) @@ -2041,7 +2101,7 @@ z.C = intersection (L.GX,L.AB) L.BC = line: new (z.B,z.C) z.Q = intersection (L.AC,L.PX) z.R = intersection (L.BC,L.PX) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon(A,B,C) @@ -2053,7 +2113,8 @@ z.C = intersection (L.GX,L.AB) \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (6 , 0) z.C = point: new (5 , 4) @@ -2064,7 +2125,7 @@ L.PX = line: new (z.P,z.X) L.BC = line: new (z.B,z.C) z.Q = intersection (L.AC,L.PX) z.R = intersection (L.BC,L.PX) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2084,7 +2145,8 @@ z.R = intersection (L.BC,L.PX) \subsection{Euler ellipse} % (fold) \label{sub:hexagram} -\begin{tkzelements} +\directlua{% +init_elements () scale =1.3 z.A = point: new (0 , 0) z.B = point: new (5 , 1) @@ -2120,11 +2182,12 @@ z.x = intersection (L.BC,L.XO) z.U = intersection (L.XO,E) _,z.V = intersection (L.YO,E) _,z.W = intersection (L.ZO,E) -\end{tkzelements} +} \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.3 z.A = point: new (0 , 0) z.B = point: new (5 , 1) @@ -2163,7 +2226,7 @@ _,z.W = intersection (L.ZO,E) z.U = intersection (L.XO,E) _,z.V = intersection (L.YO,E) _,z.W = intersection (L.ZO,E) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} @@ -2207,7 +2270,8 @@ _,z.W = intersection (L.ZO,E) \subsection{Gold Arbelos properties} % (fold) \label{sub:gold_arbelos_properties} -\begin{tkzelements} +\directlua{% +init_elements () scale = .7 z.A = point : new(0,0) z.B = point : new(10,0) @@ -2244,11 +2308,12 @@ z.R ,z.S = L.UV : projection (z.O_2,z.O_3) L.O1D = line : new (z.O_1,z.D) z.W = intersection (L.UV,L.O1D) z.O = C.DC : inversion (z.W) -\end{tkzelements} +} \begin{minipage}{.4\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new(0,0) z.B = point : new(10,0) z.C = gold_segment_ (z.A,z.B) @@ -2284,7 +2349,7 @@ z.O = C.DC : inversion (z.W) L.O1D = line : new (z.O_1,z.D) z.W = intersection (L.UV,L.O1D) z.O = C.DC : inversion (z.W) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} @@ -2358,7 +2423,8 @@ z.O = C.DC : inversion (z.W) \subsection{Apollonius circle v1 with inversion} % (fold) \label{sub:apollonius_circle_v1_with_inversion} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .7 z.A = point: new (0,0) z.B = point: new (6,0) @@ -2375,7 +2441,7 @@ z.O = C.DC : inversion (z.W) C.apo = C.ortho : inversion (C.euler) z.O = C.apo.center z.xa,z.xb,z.xc = C.ortho : inversion (z.Ea,z.Eb,z.Ec) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles[red](O,xa N,Ea) @@ -2395,7 +2461,8 @@ z.O = C.DC : inversion (z.W) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0,0) z.B = point: new (6,0) @@ -2412,7 +2479,7 @@ z.O = C.DC : inversion (z.W) C.apo = C.ortho : inversion (C.euler) z.O = C.apo.center z.xa,z.xb,z.xc = C.ortho : inversion (z.Ea,z.Eb,z.Ec) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2440,7 +2507,8 @@ z.O = C.DC : inversion (z.W) \subsection{Apollonius circle v2} % (fold) \label{sub:apollonius_circle_v2} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (0,0) z.B = point: new (6,0) @@ -2466,7 +2534,7 @@ z.O = C.DC : inversion (z.W) L.ox = L.NMa: ll_from (z.o) L.MaS = line: new (z.Ma,z.S) z.t = intersection (L.ox,L.MaS) -- through -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -2481,7 +2549,8 @@ z.O = C.DC : inversion (z.W) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale =.5 z.A = point: new (0,0) z.B = point: new (6,0) @@ -2507,7 +2576,7 @@ L.NMa = line: new (z.N,z.Ma) L.ox = L.NMa: ll_from (z.o) L.MaS = line: new (z.Ma,z.S) z.t = intersection (L.ox,L.MaS) -- through -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2530,7 +2599,8 @@ z.t = intersection (L.ox,L.MaS) -- through \label{sub:orthogonal_circles_v2} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.O = point: new (2,2) z.Op = point: new (-4,1) @@ -2545,7 +2615,7 @@ z.T = L.T.pb z.Tp = L.Tp.pb L.OOp = line : new (z.O,z.Op) z.M = L.OOp.mid -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle[red](O,P) @@ -2564,7 +2634,8 @@ z.M = L.OOp.mid \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.O = point: new (2,2) z.Op = point: new (-4,1) @@ -2579,7 +2650,7 @@ z.T = L.T.pb z.Tp = L.Tp.pb L.OOp = line : new (z.O,z.Op) z.M = L.OOp.mid -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2607,7 +2678,8 @@ z.M = L.OOp.mid \label{sub:orthogonal_circle_to_two_circles} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point : new (-1,0) z.B = point : new (0,2) z.Op = point : new (4,-1) @@ -2623,7 +2695,7 @@ z.M = L.OOp.mid z.K = L.K.pb z.Tp = L.Tp.pb z.Kp = L.Kp.pb -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(O,B O',D) @@ -2636,7 +2708,8 @@ z.M = L.OOp.mid \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.25 z.O = point : new (-1,0) z.B = point : new (0,2) @@ -2653,7 +2726,7 @@ z.T = L.T.pb z.K = L.K.pb z.Tp = L.Tp.pb z.Kp = L.Kp.pb -\end{tkzelements} +} \begin{center} @@ -2675,7 +2748,8 @@ z.Kp = L.Kp.pb \subsection{Midcircles} % (fold) \label{sub:midcircles} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (10 , 0) L.AB = line : new (z.A,z.B) @@ -2720,7 +2794,7 @@ _,z.G = intersection (L.AP0,C.O4P0) z.H = intersection (L.BP0,C.O4P0) z.Ap = z.M_1: symmetry (z.A) z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) -\end{tkzelements} +} \begin{center} @@ -2757,7 +2831,8 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (10 , 0) L.AB = line : new (z.A,z.B) @@ -2802,7 +2877,7 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) z.H = intersection (L.BP0,C.O4P0) z.Ap = z.M_1: symmetry (z.A) z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) -\end{tkzelements} +} \end{Verbatim} \begin{Verbatim} @@ -2842,7 +2917,8 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) \subsection{Pencil v1} % (fold) \label{sub:pencil_v1} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point : new (0,2) z.B = point : new (0,-2) @@ -2857,7 +2933,7 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) z.x,z.y = get_points (C.C0A : orthogonal_from (z.M_0)) z.xp,z.yp = get_points (C.C0A : orthogonal_from (z.M_1)) z.O = L.BA.mid -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(C_0,A C_1,A C_3,A C_5,A) @@ -2870,7 +2946,8 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point : new (0,2) z.B = point : new (0,-2) @@ -2885,7 +2962,7 @@ C.C0A = circle : new (z.C_0,z.A) z.x,z.y = get_points (C.C0A : orthogonal_from (z.M_0)) z.xp,z.yp = get_points (C.C0A : orthogonal_from (z.M_1)) z.O = L.BA.mid -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2906,7 +2983,8 @@ z.O = L.BA.mid \subsection{Pencil v2} % (fold) \label{sub:pencil_v2} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point : new (0,0) z.B = point : new (1,0) @@ -2924,7 +3002,7 @@ z.O = L.BA.mid z.u = C.orth0.through z.v = C.orth1.through z.t = C.orth2.through -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(C_0,A C_1,B) @@ -2936,7 +3014,8 @@ z.O = L.BA.mid \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale=.75 z.A = point : new (0,0) z.B = point : new (1,0) @@ -2954,7 +3033,7 @@ z.O = L.BA.mid z.u = C.orth0.through z.v = C.orth1.through z.t = C.orth2.through -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -2974,7 +3053,8 @@ z.O = L.BA.mid \subsection{Reim v1} % (fold) \label{sub:reim_v1} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.E = point: new (-2,2) C.AE = circle : new (z.A,z.E) @@ -2989,7 +3069,7 @@ z.O = L.BA.mid L.FD = line: new (z.F,z.D) z.G = intersection (L.FD,C.BD) z.O = intersection (L.EC,L.FD) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,E B,H) @@ -3006,7 +3086,8 @@ z.O = L.BA.mid \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.E = point: new (-2,2) C.AE = circle : new (z.A,z.E) @@ -3021,7 +3102,7 @@ z.O = L.BA.mid L.FD = line: new (z.F,z.D) z.G = intersection (L.FD,C.BD) z.O = intersection (L.EC,L.FD) -\end{tkzelements} +} \begin{center} @@ -3047,7 +3128,8 @@ z.O = L.BA.mid \subsection{Reim v2} % (fold) \label{sub:reim_v2} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .6 z.A = point: new (0,0) z.B = point: new (10,0) @@ -3060,7 +3142,7 @@ z.O = L.BA.mid z.N = intersection (L.MC,C.BC) z.m,z.mp = get_points (C.AC: tangent_at (z.M)) z.n,z.np = get_points (C.BC: tangent_at (z.N)) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,C B,C) @@ -3074,7 +3156,8 @@ z.O = L.BA.mid \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .4 z.A = point: new (0,0) z.B = point: new (10,0) @@ -3087,7 +3170,7 @@ C.BC = circle: new (z.B,z.C) z.N = intersection (L.MC,C.BC) z.m,z.mp = get_points (C.AC: tangent_at (z.M)) z.n,z.np = get_points (C.BC: tangent_at (z.N)) -\end{tkzelements} +} \begin{center} @@ -3110,7 +3193,8 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) \subsection{Reim v3} % (fold) \label{sub:reim_v3} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (8,0) z.C = point: new (2,6) @@ -3132,7 +3216,7 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) C.zO = circle: new (z.z,z.O) L.KO = line: new (z.K,z.O) z.D = intersection (L.KO,C.zO) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -3149,7 +3233,8 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (0,0) z.B = point: new (8,0) @@ -3172,7 +3257,7 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) C.zO = circle: new (z.z,z.O) L.KO = line: new (z.K,z.O) z.D = intersection (L.KO,C.zO) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3197,7 +3282,9 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) \label{sub:tangent_and_circle} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () +scale = .75 z.A = point: new (1,0) z.B = point: new (2,2) z.E = point: new (5,-4) @@ -3209,7 +3296,7 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) z.i = L.Ti.pb z.j = L.Tj.pb z.k,z.l = get_points (C.AB: tangent_at (z.B)) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,B M,A) @@ -3220,7 +3307,9 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N)) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () +scale = .75 z.A = point: new (1,0) z.B = point: new (2,2) z.E = point: new (5,-4) @@ -3232,7 +3321,7 @@ L.Ti,L.Tj = C.AB: tangent_from (z.E) z.i = L.Ti.pb z.j = L.Tj.pb z.k,z.l = get_points (C.AB: tangent_at (z.B)) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3251,12 +3340,14 @@ z.k,z.l = get_points (C.AB: tangent_at (z.B)) \label{sub:homothety} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () +scale = .5 z.A = point: new (0,0) z.B = point: new (1,2) z.E = point: new (-3,2) z.C,z.D = z.E : homothety(2,z.A,z.B) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(A,B,C,E,D) @@ -3267,13 +3358,14 @@ z.k,z.l = get_points (C.AB: tangent_at (z.B)) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} -scale = .6 +\directlua{% +init_elements () +scale = .5 z.A = point: new (0,0) z.B = point: new (1,2) z.E = point: new (-3,2) z.C,z.D = z.E : homothety(2,z.A,z.B) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} \tkzGetNodes @@ -3291,7 +3383,8 @@ z.C,z.D = z.E : homothety(2,z.A,z.B) \label{sub:tangent_and_chord} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .8 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -3305,7 +3398,7 @@ z.C,z.D = z.E : homothety(2,z.A,z.B) L.AO = line: new (z.A,z.O) z.b1,z.b2 = get_points (C.OA: tangent_at (z.B)) z.H = L.AB: projection (z.O) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircle(O,A) @@ -3320,7 +3413,8 @@ z.C,z.D = z.E : homothety(2,z.A,z.B) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 0.75 z.A = point: new (0 , 0) z.B = point: new (6 , 0) @@ -3334,7 +3428,7 @@ z.D = C.OA: point (4.5) L.AO = line: new (z.A,z.O) z.b1,z.b2 = get_points (C.OA: tangent_at (z.B)) z.H = L.AB: projection (z.O) -\end{tkzelements} +} \begin{center} @@ -3359,7 +3453,8 @@ z.H = L.AB: projection (z.O) \label{sub:three_chords} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0 , 0) z.B = point: new (0 , 2) z.P = point: new (1 , -.5) @@ -3387,11 +3482,12 @@ C.xD = circle : new (z.x,z.D) z.Ap = intersection (L.GB,C.xB) z.Ep,_ = intersection (L.GE,C.xF) z.Cp,_ = intersection (L.GD,C.xD) -\end{tkzelements} +} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.O = point: new (0 , 0) z.B = point: new (0 , 2) z.P = point: new (1 , -.5) @@ -3419,7 +3515,7 @@ C.xD = circle : new (z.x,z.D) z.Ap = intersection (L.GB,C.xB) z.Ep,_ = intersection (L.GE,C.xF) z.Cp,_ = intersection (L.GD,C.xD) -\end{tkzelements} +} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} @@ -3472,7 +3568,8 @@ z.Cp,_ = intersection (L.GD,C.xD) \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (-1 , 0) z.C = point: new (4 , -1.5) z.E = point: new (1 , -1) @@ -3489,7 +3586,7 @@ z.Cp,_ = intersection (L.GD,C.xD) L.TA = C.wE : tangent_at (z.A) L.TC = C.xE : tangent_at (z.C) z.I = intersection (L.TA,L.TC) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(w,E) @@ -3504,7 +3601,8 @@ z.Cp,_ = intersection (L.GD,C.xD) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (-1 , 0) z.C = point: new (4 , -1.5) @@ -3522,7 +3620,7 @@ z.G = intersection (L.Aw,L.Cx) L.TA = C.wE : tangent_at (z.A) L.TC = C.xE : tangent_at (z.C) z.I = intersection (L.TA,L.TC) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3544,13 +3642,14 @@ z.I = intersection (L.TA,L.TC) \label{sub:midarc} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (-1,0) z.B = point: new (2,4) C.AB = circle: new (z.A,z.B) z.C = z.A: rotation (math.pi/3,z.B) z.D = C.AB: midarc (z.B,z.C) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(A,B,C) @@ -3561,14 +3660,15 @@ z.I = intersection (L.TA,L.TC) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.A = point: new (-1,0) z.B = point: new (2,4) C.AB = circle: new (z.A,z.B) z.C = z.A: rotation (math.pi/3,z.B) z.D = C.AB: midarc (z.B,z.C) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3587,7 +3687,8 @@ z.D = C.AB: midarc (z.B,z.C) \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 1.6 z.A = point: new (1,0) z.B = point: new (5,2) @@ -3607,7 +3708,7 @@ z.D = C.AB: midarc (z.B,z.C) z.P = intersection (L.tA,L.BC) z.Q = intersection (L.tB,L.AC) z.R = intersection (L.tC,L.AB) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygon[teal](A,B,C) @@ -3621,7 +3722,8 @@ z.D = C.AB: midarc (z.B,z.C) \end{Verbatim} \end{minipage} \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () scale = 0.75 z.A = point: new (1,0) z.B = point: new (5,2) @@ -3641,7 +3743,7 @@ L.tC = line: new (z.Cr,z.Cl) z.P = intersection (L.tA,L.BC) z.Q = intersection (L.tB,L.AC) z.R = intersection (L.tC,L.AB) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3667,7 +3769,8 @@ Draw lines through the symmedian point $L$ and parallel to the sides of the tria [\href{https://mathworld.wolfram.com/FirstLemoineCircle.html}{Weisstein, Eric W. "First Lemoine Circle." From MathWorld--A Wolfram Web Resource.}] \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (1,1) z.B = point: new (5,1) z.C = point: new (2.2,4) @@ -3679,7 +3782,7 @@ Draw lines through the symmedian point $L$ and parallel to the sides of the tria z.y5,z.y6 = intersection (T.bc,C.first_lemoine) z.y3,z.y4 = intersection (T.ca,C.first_lemoine) z.L = T : lemoine_point () -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3695,7 +3798,8 @@ Draw lines through the symmedian point $L$ and parallel to the sides of the tria \begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (1,1) z.B = point: new (5,1) z.C = point: new (2.2,4) @@ -3707,7 +3811,7 @@ Draw lines through the symmedian point $L$ and parallel to the sides of the tria z.y5,z.y6 = intersection (T.bc,C.first_lemoine) z.y3,z.y4 = intersection (T.ca,C.first_lemoine) z.L = T : lemoine_point () -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(A,B,C) @@ -3730,7 +3834,8 @@ Draw antiparallels through the symmedian point $L$. The points where these lines \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.a = point: new (0,0) z.b = point: new (5,0) @@ -3753,7 +3858,7 @@ Draw antiparallels through the symmedian point $L$. The points where these lines L.y1y6 = line : new (z.y1,z.y6) L.y4y5 = line : new (z.y4,z.y5) L.y2y3 = line : new (z.y2,z.y3) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPolygons(a,b,c y1,y2,y3,y4,y5,y6) @@ -3767,7 +3872,8 @@ Draw antiparallels through the symmedian point $L$. The points where these lines \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.a = point: new (0,0) z.b = point: new (5,0) @@ -3790,7 +3896,7 @@ z.x5,z.x6 = intersection (L.ca,C.second_lemoine) L.y1y6 = line : new (z.y1,z.y6) L.y4y5 = line : new (z.y4,z.y5) L.y2y3 = line : new (z.y2,z.y3) -\end{tkzelements} +} \begin{center} @@ -3813,7 +3919,8 @@ L.y2y3 = line : new (z.y2,z.y3) \subsection{Inversion} % (fold) \label{sub:inversion} -\begin{tkzelements} +\directlua{% +init_elements () scale = .75 z.A = point: new (-1,0) z.B = point: new (2,2) @@ -3828,12 +3935,13 @@ z.H = L.AE : projection (z.t1) z.Bp, z.Ep, z.Cp = C.AC: inversion ( z.B, z.E, z.C ) -\end{tkzelements} +} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new (-1,0) z.B = point: new (2,2) z.C = point: new (2,4) @@ -3848,7 +3956,7 @@ z.Cp = C.AC: inversion ( z.B, z.E, z.C ) z.Bp, z.Ep, z.Cp = C.AC: inversion ( z.B, z.E, z.C ) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -3881,7 +3989,8 @@ z.Cp = C.AC: inversion ( z.B, z.E, z.C ) \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (0,0) z.b = point: new (5,0) z.c = point: new (1,4) @@ -3893,7 +4002,7 @@ z.Cp = C.AC: inversion ( z.B, z.E, z.C ) z.y_0,z.y_1 = get_points (L.anti) L.anti = T : antiparallel (z.L,2) z.z_0,z.z_1 = get_points (L.anti) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -3907,7 +4016,8 @@ z.Cp = C.AC: inversion ( z.B, z.E, z.C ) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.a = point: new (0,0) z.b = point: new (5,0) z.c = point: new (1,4) @@ -3919,7 +4029,7 @@ L.anti = T : antiparallel (z.L,1) z.y_0,z.y_1 = get_points (L.anti) L.anti = T : antiparallel (z.L,2) z.z_0,z.z_1 = get_points (L.anti) -\end{tkzelements} +} \begin{center} \begin{tikzpicture} @@ -3940,7 +4050,8 @@ z.z_0,z.z_1 = get_points (L.anti) \label{sub:soddy} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) z.C = point : new ( 0.5 , 4 ) @@ -3972,7 +4083,7 @@ C.soddy_ext = C.ins : inversion (C.soddy_int) z.w = C.soddy_ext.center z.s = C.soddy_ext.through z.Xip,z.Yip,z.Zip = C.ins : inversion (z.Xi,z.Yi,z.Zi) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -3986,7 +4097,8 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.Xi,z.Yi,z.Zi) \end{tikzpicture} \end{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) z.C = point : new ( 0.5 , 4 ) @@ -4018,7 +4130,7 @@ C.soddy_ext = C.ins : inversion (C.soddy_int) z.w = C.soddy_ext.center z.s = C.soddy_ext.through z.Xip,z.Yip,z.Zip = C.ins : inversion (z.Xi,z.Yi,z.Zi) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -4035,7 +4147,8 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.Xi,z.Yi,z.Zi) \subsection{Soddy circle with function} % (fold) \label{sub:soddy_circle_with_function} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) z.C = point : new (4 , 4 ) @@ -4051,11 +4164,12 @@ C.soddy_ext = C.ins : inversion (C.soddy_int) z.w = C.soddy_ext.center z.t = C.soddy_ext.through z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) -\end{tkzelements} +} \begin{minipage}{.5\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 5 , 0 ) z.C = point : new (4 , 4 ) @@ -4073,7 +4187,7 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) z.t = C.soddy_ext.through z.Xip,z.Yip, z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) - \end{tkzelements} + } \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} @@ -4106,7 +4220,8 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) \subsection{Pappus chain} % (fold) \label{sub:pappus_chain} -\begin{tkzelements} +\directlua{% +init_elements () scale =.75 xC,nc = 10,16 xB = xC/tkzphi @@ -4133,10 +4248,11 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) L.SpTp = line:new ( z["S"..i.."p"], z["T"..i.."p"]) z["I"..i] = L.SpTp.mid end -\end{tkzelements} +} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () xC,nc = 10,16 xB = xC/tkzphi xD = (xC*xC)/xB @@ -4162,7 +4278,7 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) L.SpTp = line:new ( z["S"..i.."p"], z["T"..i.."p"]) z["I"..i] = L.SpTp.mid end -\end{tkzelements} +} \end{Verbatim} \begin{minipage}{.5\textwidth} @@ -4196,7 +4312,8 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi) \subsection{Three Circles} % (fold) \label{sub:three_circles} -\begin{tkzelements} +\directlua{% +init_elements () function threecircles(c1,r1,c2,r2,c3,h1,h3,h2) local xk = math.sqrt (r1*r2) local cx = (2*r1*math.sqrt(r2))/(math.sqrt(r1)+math.sqrt(r2)) @@ -4210,11 +4327,12 @@ function threecircles(c1,r1,c2,r2,c3,h1,h3,h2) z[h3] = L.h1h2: projection (z[c3]) end threecircles("A",4,"B",3,"C","E","G","F") -\end{tkzelements} +} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () function threecircles(c1,r1,c2,r2,c3,h1,h3,h2) local xk = math.sqrt (r1*r2) local cx = (2*r1*math.sqrt(r2))/(math.sqrt(r1)+math.sqrt(r2)) @@ -4228,7 +4346,7 @@ function threecircles(c1,r1,c2,r2,c3,h1,h3,h2) z[h3] = L.h1h2: projection (z[c3]) end threecircles("A",4,"B",3,"C","E","G","F") -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -4254,7 +4372,8 @@ end Pentagons in a golden arbelos} % (fold) \label{sub:golden_arbelos} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (10 , 0) L.AB = line: new ( z.A, z.B) @@ -4289,11 +4408,12 @@ k = 1/tkzphi^2 kk = tkzphi z.D_1,z.E_1,z.F_1,z.G_1 = z.B : homothety (k, z.D,z.E,z.F,z.G) z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1) -\end{tkzelements} +} \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0 , 0) z.B = point: new (10 , 0) L.AB = line: new ( z.A, z.B) @@ -4328,7 +4448,7 @@ z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1) kk = tkzphi z.D_1,z.E_1,z.F_1,z.G_1 = z.B : homothety (k, z.D,z.E,z.F,z.G) z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-indepthstudy.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-indepthstudy.tex index 140063f9289..e49c7892afc 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-indepthstudy.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-indepthstudy.tex @@ -247,13 +247,14 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. \begin{minipage}{.6\textwidth} \begin{Verbatim} - \begin{tkzelements} + \directlua{% +init_elements () z.O = point : new (0,0) z.A = point : new (1,2) a = math.pi/6 za = point(math.cos(a),math.sin(a)) z.B = z.A * za - \end{tkzelements} + } \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(O,A,B) @@ -264,14 +265,15 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. \end{Verbatim} \end{minipage} \begin{minipage}{.6\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale=2 z.O = point : new (0,0) z.A = point : new (1,2) a = math.pi/6 za = point(math.cos(a),math.sin(a)) z.B = z.A * za -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawPoints(O,A,B) @@ -287,7 +289,8 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.o = point: new(0,0) z.a = point: new(1,-1) z.b = point: new(2,1) @@ -300,7 +303,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. -- = z.a : conj () z.g = z.b* point(math.cos(math.pi/2), math.sin(math.pi/2)) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} @@ -315,7 +318,8 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.o = point: new(0,0) z.a = point: new(1,-1) z.b = point: new(2,1) @@ -327,7 +331,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. z.ap = point.conj (z.a) -- = z.a : conj () z.g = z.b* point(math.cos(math.pi/2),math.sin(math.pi/2)) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} @@ -374,12 +378,13 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (1,0) z.B = point: new (5,-1) z.C = point: new (2,5) z.G = barycenter ({z.A,3},{z.B,1},{z.C,1}) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -388,12 +393,13 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|. \end{tikzpicture} \end{Verbatim} \end{minipage} -\begin{minipage}{.5\textwidth}\begin{tkzelements} +\begin{minipage}{.5\textwidth}\directlua{% +init_elements () z.A = point: new (1,0) z.B = point: new (5,-1) z.C = point: new (2,5) z.G = barycenter ({z.A,3},{z.B,1},{z.C,1}) -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -427,7 +433,8 @@ The problem encountered in this example stems from the notation of the point nam \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () local r = 3 z.O = point : new (0,0) max = 100 @@ -436,11 +443,12 @@ The problem encountered in this example stems from the notation of the point nam z["A_"..i] = point : polar(r,2*i*math.pi/max) end a = math.deg(get_angle (z.O,z.A_1,z.A_2)) -\end{tkzelements} +} \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () local r = 3 z.O = point : new (0,0) max = 100 @@ -449,7 +457,7 @@ The problem encountered in this example stems from the notation of the point nam z["A_"..i] = point : polar(r,2*i*math.pi/max) end a = math.deg(get_angle (z.O,z.A_1,z.A_2)) -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \pgfkeys{/pgf/number format/.cd,use comma} @@ -501,7 +509,8 @@ The \tkzNamePack{ifthen} package is required for the code below. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (1,2) z.X = point: new (2,4.000) @@ -514,7 +523,7 @@ if L.AB : in_out (z.X) inline = false end inline_bis = L.AB : in_out (z.Y) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -531,7 +540,8 @@ if L.AB : in_out (z.X) \end{Verbatim} \end{minipage} \begin{minipage}{.5\textwidth} - \begin{tkzelements} + \directlua{% +init_elements () z.A = point: new (0,0) z.B = point: new (1,2) z.X = point: new (2,4.000) @@ -544,7 +554,7 @@ if L.AB : in_out (z.X) inline = false end inline_bis = L.AB : in_out (z.Y) -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -664,7 +674,8 @@ You obtain a point on the object by entering a real number between 0 and 1. \begin{minipage}{.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 2 ) z.C = point : new ( 1 , 3 ) @@ -674,7 +685,7 @@ You obtain a point on the object by entering a real number between 0 and 1. z.I = L.AB : point (0.5) z.J = C.AB : point (0.5) z.K = T.ABC : point (0.5) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine(A,B) @@ -686,7 +697,8 @@ You obtain a point on the object by entering a real number between 0 and 1. \end{minipage} \hspace{\fill} \begin{minipage}{.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale =.75 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 2 ) @@ -697,7 +709,7 @@ You obtain a point on the object by entering a real number between 0 and 1. z.I = L.AB : point (0.5) z.J = C.AB : point (0.5) z.K = T.ABC : point (0.5) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLine(A,B) diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-intersection.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-intersection.tex index 1ba8fd0981c..53eff14d51a 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-intersection.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-intersection.tex @@ -12,7 +12,8 @@ The result is of the form: |point| or |false|. \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,-1) z.B = point : new (4,1) z.C = point : new (2,1) @@ -26,7 +27,7 @@ The result is of the form: |point| or |false|. else z.I = x end -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -37,7 +38,8 @@ The result is of the form: |point| or |false|. \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,-1) z.B = point : new (4,1) z.C = point : new (2,1) @@ -51,7 +53,7 @@ tex.print('error') else z.I = x end -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -71,7 +73,8 @@ The result is of the form : |point,point| or |false,false|. If the line is tange \begin{minipage}{0.6\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,-1) z.B = point : new (1,2) L.AB = line : new (z.A,z.B) @@ -82,7 +85,7 @@ The result is of the form : |point,point| or |false,false|. If the line is tange C.OD = circle : new (z.O,z.D) z.I,_ = intersection (L.AB,C.OD) _,z.K = intersection (C.OD,L.AE) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -94,7 +97,8 @@ The result is of the form : |point,point| or |false,false|. If the line is tange \end{Verbatim} \end{minipage} \begin{minipage}{0.4\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale = 2 z.A = point : new (1,-1) z.B = point : new (1,2) @@ -106,15 +110,16 @@ L.AE = line : new (z.A,z.E) C.OD = circle : new (z.O,z.D) z.I,_ = intersection (L.AB,C.OD) _,z.K = intersection (C.OD,L.AE) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes -\tkzDrawLines(A,B A,E) +\tkzDrawLines[add=.1 and .1](A,B A,E) \tkzDrawCircle(O,D) \tkzDrawPoints(A,B,O,D,I,K) \tkzLabelPoints[left](A,B,O,D,I,K) \end{tikzpicture} +\hfill \end{minipage} Other examples: \ref{sub:altshiller} @@ -128,7 +133,8 @@ The result is of the form : |point,point| or |false,false|. If the circles are \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,1) z.B = point : new (2,2) z.C = point : new (3,3) @@ -138,7 +144,7 @@ The result is of the form : |point,point| or |false,false|. If the circles are z.I,_ = intersection (C.AB,C.CB) C.DC = circle : new (z.D,z.C) z.J,z.K = intersection (C.DC,C.CB) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawCircles(A,B C,B D,C) @@ -148,7 +154,8 @@ The result is of the form : |point,point| or |false,false|. If the circles are \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () z.A = point : new (1,1) z.B = point : new (2,2) z.C = point : new (3,3) @@ -158,7 +165,7 @@ C.CB = circle : new (z.C,z.B) z.I,_ = intersection (C.AB,C.CB) C.DC = circle : new (z.D,z.C) z.J,z.K = intersection (C.DC,C.CB) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -180,7 +187,8 @@ The designation of intersection points is a little more complicated than the pre \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{% +init_elements () scale = .5 z.a = point: new (5 , 2) z.b = point: new (-4 , 0) @@ -196,7 +204,7 @@ The designation of intersection points is a little more complicated than the pre a = E.Rx b = E.Ry ang = math.deg(E.slope) -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawLines[red](a,b u,v) % p,s p,t @@ -210,23 +218,24 @@ The designation of intersection points is a little more complicated than the pre \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} +\directlua{% +init_elements () scale =.5 z.a = point: new (5 , 2) z.b = point: new (-4 , 0) z.m = point: new (2 , 4) z.n = point: new (4 , 4) - L.ab = line : new (z.a,z.b) - L.mn = line : new (z.m,z.n) + L.ab = line : new (z.a,z.b) + L.mn = line : new (z.m,z.n) z.c = L.ab. mid z.e = L.ab: point (-.2) E = ellipse: foci (z.a,z.b,z.e) z.u,z.v = intersection (E,L.mn) - -- transfer to tex + % transfer to tex a = E.Rx b = E.Ry ang = math.deg(E.slope) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex index 10998bb7f58..427dfe3c2d7 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex @@ -1,6 +1,6 @@ % !TEX TS-program = lualatex % encoding : utf8 -% Documentation of tkz-elements v2.30c +% Documentation of tkz-elements v3.00c % Copyright 2024 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -21,10 +21,10 @@ headings = small ]{tkz-doc} \gdef\tkznameofpack{tkz-elements} -\gdef\tkzversionofpack{2.30c} +\gdef\tkzversionofpack{3.00c} \gdef\tkzdateofpack{\today} \gdef\tkznameofdoc{tkz-elements.pdf} -\gdef\tkzversionofdoc{2.30c} +\gdef\tkzversionofdoc{3.00c} \gdef\tkzdateofdoc{\today} \gdef\tkzauthorofpack{Alain Matthes} \gdef\tkzadressofauthor{} @@ -139,6 +139,8 @@ sharp corners \newcommand*{\Immeth}[2]{\texttt{#2}\index{#1_3@\texttt{#1: metamethod}!\_\_\texttt{#2}}} \newcommand*{\Igfct}[2]{\texttt{#2}\index{#1_3@\texttt{#1: function}!\texttt{#2}}} \newcommand*{\Iclass}[1]{\texttt{#1}\index{Class !#1@\texttt{#1}}} +\newcommand*{\Iengine}[1]{\texttt{#1}\index{Engine !#1@\texttt{#1}}} +\newcommand*{\Iprimitive}[1]{\textbackslash\texttt{#1}\index{Lua\TeX\ primitive !#1@\texttt{\textbackslash#1}}} \newcommand*{\tkzNameObj}[1]{\tkzname{#1}\Iobj{#1}} \newcommand*{\Iobj}[1]{\index{Object_1@\texttt{Object}!\texttt{#1}}} \newcommand*{\tkzRBomb}{\textcolor{red}{\bomb}} @@ -171,7 +173,6 @@ sharp corners \AtBeginDocument{\MakeShortVerb{\|}} % link to shortvrb \begin{document} -%\LuaCodeDebugOn \parindent=0pt \tkzTitleFrame{tkz-elements \tkzversionofpack\\Euclidean Geometry} @@ -212,6 +213,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch \clearpage \newpage +\input{TKZdoc-elements-news.tex} \input{TKZdoc-elements-structure.tex} \input{TKZdoc-elements-why.tex} \input{TKZdoc-elements-presentation.tex} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-news.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-news.tex new file mode 100644 index 00000000000..9eb6544054e --- /dev/null +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-news.tex @@ -0,0 +1,13 @@ +\section{News} % (fold) +\label{sec:news} + +The documentation you are reading corresponds to the latest version 3.0 of \tkzNamePack{tkz-elements}. This version introduces an important new feature: the code \code{Lua} part of the code can now be processed using the \Iprimitive{directlua} primitive of \Iengine{Lua\LaTeX}. See the examples given in the Transfers section. + +This introduces a slight complication whatever the method used to execute the \code{Lua} code. If you want to use the \tkzNameEnv{tkzelements} environment, then you need to load the \pkg{luacode} package. If you prefer to use the |\directlua| primitive, you'll need to delete and reset the tables and \Igfct{tkz-elements}{scale} with the \Igfct{tkz-elements}{init\_elements} function. + +Some complex examples require the use of the \Iprimitive{directlua} primitive. + + +% section news (end) +\endinput + diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex index 1778a7c8fb8..22025d11469 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-organization.tex @@ -9,9 +9,7 @@ You can load \tkzname{tkz-euclide} in three different ways. The simplest is |\us The package \pkg{ifthen} is useful if you need to use some Boolean. -The macro \tkzcname{LuaCodeDebugOn} allows you to try and find errors in Lua code. - -While it's possible to leave the Lua code in the \tkzNameEnv{tkzelements} environment, externalizing this code has its advantages. +While it's possible to leave the Lua code in the macro |directlua|, externalizing this code has its advantages. The first advantage is that, if you use a good editor, you have a better presentation of the code. Styles differ between \code{Lua} and \LATEX{}, making the code clearer. This is how I proceeded, then reintegrated the code into the main code. @@ -29,12 +27,11 @@ A third advantage is that the code can be reused. \usepackage[mini]{tkz-euclide} \usepackage{tkz-elements,ifthen} -\begin{document} -\LuaCodeDebugOn -\begin{tkzelements} +\begin{document} +\directlua{ scale = 1.25 dofile ("sangaku.lua") -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -63,10 +60,11 @@ L.Cc = line : new (z.C,z.c) z.I = intersection (L.Cc,L.BF) \end{Verbatim} -\begin{tkzelements} +\directlua{ + init_elements () scale = 1.25 dofile ("sangaku.lua") -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes @@ -82,15 +80,24 @@ z.I = intersection (L.Cc,L.BF) If necessary, it's better to perform scaling in the \code{Lua} section. This approach tends to be more accurate. However, there is a caveat to be aware of. I've made it a point to avoid using numerical values in my codes whenever possible. Generally, these values only appear in the definition of fixed points. If the \code{scale} option is used, scaling is applied when points are created. Let's imagine you want to organize your code as follows: -|scale = 1.5|\\ -|xB = 8|\\ -|z.B = point : new ( xB,0 )| +\begin{mybox}{} + \begin{verbatim} + scale = 1.5 + xB = 8 + z.B = point : new ( xB,0 ) + \end{verbatim} +\end{mybox} + Scaling would then be ineffective, as the numerical values are not modified, only the point coordinates. To account for scaling, use the function \Igfct{math}{value (v) }. -|scale = 1.5|\\ -|xB = value (8)|\\ -|z.B = point : new ( xB,0 )| +\begin{mybox}{} +\begin{verbatim} + scale = 1.5 + xB = value (8) + z.B = point : new ( xB,0 ) +\end{verbatim} +\end{mybox} \subsection{Code presentation} % (fold) \label{sub:code_presentation} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-presentation.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-presentation.tex index f0689fcc74d..195a6910644 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-presentation.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-presentation.tex @@ -4,8 +4,7 @@ \subsection{With Lua} % (fold) \label{sub:with_lua} -The primary function of tkz-elements is to calculate dimensions and define points, which is achieved using Lua. You can view tkz-elements as a kernel that is utilized either by tkz-euclide or by TikZ, -Definitions and calculations take place within the environment \tkzNameEnv{tkzelements}, which is based on \tkzNameEnv{luacode}. +The primary function of tkz-elements is to calculate dimensions and define points, which is achieved using Lua. You can view tkz-elements as a kernel that is utilized either by tkz-euclide or by TikZ. The lua code can be implemented immediately using the \tkzcname{directlua} primitive, or it can take place within a \tkzNameEnv{tkzelements} environment which is based on \tkzNameEnv{luacode}. In the latter case, you need to load the \pkg{luacode} package. In the first case, if you create a complex document, you'll be able to reset the tables and scale with the \Igfct{package}{init\_elements} function. \begin{minipage}[t]{.52\textwidth}\vspace{0pt}% The key points are: @@ -13,12 +12,12 @@ Definitions and calculations take place within the environment \tkzNameEnv{tkze \item The source file must be \tkzEHand\ {\color{red}\uline{ \color{black}UTF8}} encoded. \item Compilation is done with \tkzEHand\ {\color{red}\uline{ \color{black}Lua\LATEX{}}}. \item You need to load \tkzimp{\TIKZ}{} or \tkzimp{tkz-euclide} and \tkzimp{tkz-elements}. - \item Definitions and calculations are performed in an (orthonormal) Cartesian coordinate system, using Luawithin the \tkzimp{tkzelements} environment. + \item Definitions and calculations are performed in an (orthonormal) Cartesian coordinate system, using Lua with the macro \tkzcname{directlua} or within the \tkzimp{tkzelements} environment. \end{itemize} On the right, you can see the minimum template. -The code is divided into two parts, represented by two environments \tkzNameEnv{tkzelements} and \tkzNameEnv{tikzpicture}. In the first environment, you place your Lua code, while in the second, you use tkz-euclide commands. +The code is divided into two parts, represented by lua code, argument to the primitive |\directlua| and the environment \tkzNameEnv{tikzpicture}. In the first part, you place your Lua code, while in the second, you use tkz-euclide commands. \vspace*{4.1 cm}% \end{minipage}\hspace*{\fill} @@ -33,14 +32,14 @@ The code is divided into two parts, represented by two environments \tkzNameEnv \usepackage{tkz-elements} begin{document} -\begin{tkzelements} +\directlua{ scale = 1 % definition of some points z.A = point : new ( , ) z.B = point : new ( , ) ...code... -\end{tkzelements} +} \begin{tikzpicture} % point transfer to Nodes @@ -77,7 +76,7 @@ After obtaining all the necessary points for the drawing, they must be transform \subsubsection{The figure} -\begin{tkzelements} +\directlua{ scale = 1.2 z.A = point: new (0 , 0) z.B = point: new (10 , 0) @@ -102,7 +101,7 @@ After obtaining all the necessary points for the drawing, they must be transform z.P_1 = intersection (C.PC,C.AC) _,z.P_2 = intersection (C.QA,C.CB) z.O_3 = triangle: new ( z.P_0, z.P_1, z.P_2).circumcenter -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes @@ -128,29 +127,29 @@ After obtaining all the necessary points for the drawing, they must be transform \usepackage{tkz-elements} \begin{document} -\begin{tkzelements} +\directlua{ z.A = point: new (0 , 0) -z.B = point: new (10 , 0) -- creation of two fixed points $A$ and $B$ +z.B = point: new (10 , 0) % creation of two fixed points $A$ and $B$ L.AB = line: new ( z.A, z.B) -z.C = L.AB: gold_ratio () -- use of a method linked to “line” -z.O_0 = line: new ( z.A, z.B).mid -- midpoint of segment with an attribute of “line” -z.O_1 = line: new ( z.A, z.C).mid -- objects are not stored and cannot be reused. +z.C = L.AB: gold_ratio () % use of a method linked to “line” +z.O_0 = line: new ( z.A, z.B).mid % midpoint of segment with an attribute of “line” +z.O_1 = line: new ( z.A, z.C).mid % objects are not stored and cannot be reused. z.O_2 = line: new ( z.C, z.B).mid -C.AB = circle: new ( z.O_0, z.B) -- new object “circle” stored and reused +C.AB = circle: new ( z.O_0, z.B) % new object “circle” stored and reused C.AC = circle: new ( z.O_1, z.C) C.CB = circle: new ( z.O_2, z.B) -z.P = C.CB.north -- “north” atrributes of a circle +z.P = C.CB.north % “north” atrributes of a circle z.Q = C.AC.north z.O = C.AB.south -z.c = z.C : north (2) -- “north” method of a point (needs a parameter) -C.PC = circle: new ( z.P, z.C) -C.QA = circle: new ( z.Q, z.A) -z.P_0 = intersection (C.PC,C.AB) -- search for intersections of two circles. -z.P_1 = intersection (C.PC,C.AC) -- idem -_,z.P_2 = intersection (C.QA,C.CB) -- idem -z.O_3 = triangle: new ( z.P_0, z.P_1, z.P_2).circumcenter - -- circumcenter attribute of “triangle” -\end{tkzelements} +z.c = z.C : north (2) % “north” method of a point (needs a parameter) +C.PC = circle: new ( z.P, z.C) +C.QA = circle: new ( z.Q, z.A) +z.P_0 = intersection (C.PC,C.AB) % search for intersections of two circles. +z.P_1 = intersection (C.PC,C.AC) % idem +_,z.P_2 = intersection (C.QA,C.CB) % idem +z.O_3 = triangle: new ( z.P_0, z.P_1, z.P_2).circumcenter + % circumcenter attribute of “triangle” +} \end{Verbatim} \begin{Verbatim} @@ -179,24 +178,25 @@ Here's another example with comments \documentclass{standalone} \usepackage{tkz-euclide,tkz-elements} \begin{document} -\begin{tkzelements} - z.A = point: new (2 , 4) -- we create environment tkzelements - z.B = point: new (0 , 0) -- three fixed points are used +\directlua{ + z.A = point: new (2 , 4) + z.B = point: new (0 , 0) % three fixed points are used z.C = point: new (8 , 0) - T.ABC = triangle: new (z.A,z.B,z.C) -- we create a new triangle object - C.ins = T.ABC: in_circle () -- we get the incircle of this triangle - z.I = C.ins.center -- center is an attribute of the circle - z.T = C.ins.through -- through is also an attribute - -- z.I,z.T = get_points (C.ins) -- get_points is a shortcut - C.cir = T.ABC : circum_circle () -- we get the circumscribed circle - z.W = C.cir.center -- we get the center of this circle - z.O = C.cir.south -- now we get the south pole of this circle - L.AO = line: new (z.A,z.O) -- we create an object "line" - L.BC = T.ABC.bc -- we get the line (BC) - z.I_A = intersection (L.AO,L.BC) -- we search the intersection of the last lines -\end{tkzelements} + T.ABC = triangle: new (z.A,z.B,z.C) % we create a new triangle object + C.ins = T.ABC: in_circle () % we get the incircle of this triangle + z.I = C.ins.center % center is an attribute of the circle + z.T = C.ins.through % through is also an attribute + -- z.I,z.T = get_points (C.ins) % get_points is a shortcut + C.cir = T.ABC : circum_circle () % we get the circumscribed circle + z.W = C.cir.center % we get the center of this circle + z.O = C.cir.south % now we get the south pole of this circle + L.AO = line: new (z.A,z.O) % we create an object "line" + L.BC = T.ABC.bc % we get the line (BC) + z.I_A = intersection (L.AO,L.BC) % we search the intersection of the last lines +} \end{Verbatim} -\begin{tkzelements} +\directlua{ + init_elements () scale = 1.2 z.A = point: new (2 , 4) z.B = point: new (0 , 0) @@ -205,14 +205,13 @@ Here's another example with comments C.ins = T.ABC: in_circle () z.I = C.ins.center z.T = C.ins.through --- z.I,z.T = get_points (C.ins) C.cir = T.ABC : circum_circle () z.W = C.cir.center z.O = C.cir.south L.AO = line: new (z.A,z.O) L.BC = T.ABC.bc z.I_A = intersection (L.AO,L.BC) -\end{tkzelements} +} \hspace*{\fill} \begin{tikzpicture} @@ -229,7 +228,7 @@ Here's another example with comments \tkzLabelPoints[above](A) \end{tikzpicture} \hspace*{\fill} - +% Here's the tikzpicture environment to obtain the drawing: \begin{Verbatim} \begin{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-structure.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-structure.tex index d1958d4763f..510b43df370 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-structure.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-structure.tex @@ -1,12 +1,10 @@ \section{Structure} % (fold) \label{sec:structure} -\tkzNamePack{tkz-elements} loads the \tkzNamePack{luacode} package to create the \tkzNameEnv{tkzelements} environment, which is based on the \tkzNameEnv{luacode} environment. - -Within the \tkzNameEnv{tkzelements} environment, the scale is initialized to 1, and then all values in various tables are cleared. +After loading the package, the scale is initialized to 1, and then all values in various tables are cleared. The package defines two macros |\tkzGetNodes| and |\tkzUseLua|. -Additionally, the package loads the file |tkz_elements_main.lua|. This file initializes all the tables that will be used by the modules in which the classes are defined. +Additionally, the package loads the file |tkz_elements_main.lua|. This file initializes all the tables that will be used by the modules in which the classes are defined. In this file, a function is defined to reset all tables and the scale. This is the function \Igfct{tkz-elements}{init\_elements}. \begin{tikzpicture}[scale=.75] \begin{scope} @@ -22,9 +20,7 @@ Additionally, the package loads the file |tkz_elements_main.lua|. This file ini L2/.style={level distance=65mm,minimum size=2cm}] node[concept,circular drop shadow] {|tkz-elements.sty|} [clockwise from=10] - child[concept color=MidnightBlue!40,minimum size=16mm] { - node[concept,circular drop shadow] {|luacode|} -} + child[concept color= MidnightBlue!80,minimum size=4cm,text width=38mm, clockwise from=27] { node[concept,circular drop shadow] {|tkz\_elements\_main|} @@ -45,13 +41,11 @@ clockwise from=27] { \end{scope} \end{tikzpicture} -The current classes are (some are still inactive): -\begin{itemize} - \item active : \Iclass{point} (z) ; \Iclass{line} (L) ; \Iclass{circle} (C) ; \Iclass{triangle} (T) ; \Iclass{ellipse} (E) ; \Iclass{quadrilateral} (Q) ; \Iclass{square} (S) ; \Iclass{rectangle} (R) ; \Iclass{parallelogram} (P) ; \Iclass{regular\_polygon} (RP); \Iclass{vector} (V). +The current classes are : + + \Iclass{point} (z) ; \Iclass{line} (L) ; \Iclass{circle} (C) ; \Iclass{triangle} (T) ; \Iclass{ellipse} (E) ; \Iclass{quadrilateral} (Q) ; \Iclass{square} (S) ; \Iclass{rectangle} (R) ; \Iclass{parallelogram} (P) ; \Iclass{regular\_polygon} (RP); \Iclass{vector} (V) and \Iclass{matrix} (M). - \item inactive : matrix (M) ; vector (V). -\end{itemize} If |name| is name of a class, you can find its definition in the file |tkz_elements_name.lua|. diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-transfers.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-transfers.tex index 264097e9b82..1b65e4dabe8 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-transfers.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-transfers.tex @@ -5,11 +5,11 @@ \subsection{From Lua to tkz-euclide or TikZ} % (fold) \label{sub:fom_lua_to_tkz_euclide_or_tikz} -In this section, we'll explore how to transfer points, Booleans, and numerical values. +In this section, we'll explore how to transfer points, booleans, and numerical values. \subsubsection{Points transfer} % (fold) \label{ssub:points_transfer} -We utilize an environment \tkzname{tkzelements} outside an \tkzname{tikzpicture} environment which allows us to perform all the necessary calculations. Then, we execute the macro \Imacro{tkzGetNodes} which transforms the affixes of the table |z| into \tkzname{Nodes}. Finally, we proceed with the drawing. +The necessary definitions and calculations are performed with the primitive \tkzcname{directlua} or inside the environment \tkzNameEnv{tkzelements}. Then, we execute the macro \Imacro{tkzGetNodes} which transforms the affixes of the table |z| into \tkzname{Nodes}. Finally, we proceed with the drawing. At present, the drawing program is either \TIKZ\ or \pkg{tkz-euclide}. However, you have the option to use another package for plotting. To do so, you'll need to create a macro similar to \tkzcname{tkzGetNodes}. Of course, this package must be capable of storing points like \TIKZ\ or \pkg{tkz-euclide}. @@ -34,18 +34,20 @@ end} \end{mybox} See the section In-depth Study \ref{sec:in_depth_study} for an explanation of the previous code. -The environment \tkzNameEnv{tkzelements} allows to use the underscore |_| and the macro \tkzcname{tkzGetNodes} allows to obtain names of nodes containing \tkzname{prime} or \tkzname{double prime}. (Refer to the next example) +Point names can contain the underscore |_| and the macro \tkzcname{tkzGetNodes} allows to obtain names of nodes containing \tkzname{prime} or \tkzname{double prime}. (Refer to the next example) +\vspace{6pt} \begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} - scale = 1.2 +\directlua{ + init_elements () + scale = 1.5 z.o = point: new (0,0) z.a_1 = point: new (2,1) z.a_2 = point: new (1,2) z.ap = z.a_1 + z.a_2 z.app = z.a_1 - z.a_2 -\end{tkzelements} +} \begin{tikzpicture} \tkzGetNodes \tkzDrawSegments(o,a_1 o,a_2 o,a' o,a'') @@ -57,14 +59,15 @@ The environment \tkzNameEnv{tkzelements} allows to use the underscore |_| and th \end{Verbatim} \end{minipage} \begin{minipage}{0.5\textwidth} -\begin{tkzelements} - scale = 1.2 +\directlua{ + init_elements () + scale = 1.5 z.o = point: new (0,0) z.a_1 = point: new (2,1) z.a_2 = point: new (1,2) z.ap = z.a_1 + z.a_2 z.app = z.a_1 - z.a_2 -\end{tkzelements} +} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes @@ -78,15 +81,42 @@ The environment \tkzNameEnv{tkzelements} allows to use the underscore |_| and th \end{minipage}% \newpage +% subsubsection points_transfer (end) % subsection fom_lua_to_tkz_euclide_or_tikz (end) + \subsubsection{Other transfers} % (fold) \label{ssub:other_transfers} Sometimes it's useful to transfer angle, length measurements or boolean. For this purpose, I have created the macro (refer to \ref{sub:transfer_from_lua_to_tex}) \IEmacro{tkzUseLua(value)} +\begin{mybox} + \begin{Verbatim} + \def\tkzUseLua#1{\directlua{tex.print(tostring(#1))}} +\end{Verbatim} +\end{mybox} +\directlua{ +init_elements () +z.b = point: new (1,1) +z.a = point: new (4,2) +z.c = point: new (2,2) +z.d = point: new (5,1) +L.ab = line : new (z.a,z.b) +L.cd = line : new (z.c,z.d) +det = (z.b-z.a)^(z.d-z.c) +if det == 0 then bool = true + else bool = false +end +x = intersection (L.ab,L.cd) +} + +The intersection of the two lines lies at +a point whose affix is: \tkzUseLua{x} + +\begin{minipage}{0.5\textwidth} \begin{Verbatim} -\begin{tkzelements} +\directlua{ + init_elements () z.b = point: new (1,1) z.a = point: new (4,2) z.c = point: new (2,2) @@ -98,14 +128,12 @@ Sometimes it's useful to transfer angle, length measurements or boolean. For thi else bool = false end x = intersection (L.ab,L.cd) -\end{tkzelements} - +} The intersection of the two lines lies at a point whose affix is:\tkzUseLua{x} - \begin{tikzpicture} \tkzGetNodes - \tkzInit[xmin =-1,ymin=-1,xmax=6,ymax=3] + \tkzInit[xmin =0,ymin=0,xmax=5,ymax=3] \tkzGrid\tkzAxeX\tkzAxeY \tkzDrawPoints(a,...,d) \ifthenelse{\equal{\tkzUseLua{bool}}{true}}{ @@ -114,29 +142,12 @@ The intersection of the two lines lies at \tkzLabelPoints(a,...,d) \end{tikzpicture} \end{Verbatim} - -\begin{tkzelements} -z.b = point: new (1,1) -z.a = point: new (4,2) -z.c = point: new (2,2) -z.d = point: new (5,1) -L.ab = line : new (z.a,z.b) -L.cd = line : new (z.c,z.d) -det = (z.b-z.a)^(z.d-z.c) -if det == 0 then bool = true - else bool = false -end -x = intersection (L.ab,L.cd) -\end{tkzelements} - -The intersection of the two lines lies at -a point whose affix is: \tkzUseLua{x} - -\vspace{1em} +\end{minipage} +\begin{minipage}{0.5\textwidth} \hspace{\fill} \begin{tikzpicture} \tkzGetNodes - \tkzInit[xmin =-1,ymin=-1,xmax=6,ymax=3] + \tkzInit[xmin =0,ymin=0,xmax=5,ymax=3] \tkzGrid\tkzAxeX\tkzAxeY \tkzDrawPoints(a,...,d) \ifthenelse{\equal{\tkzUseLua{bool}}{true}}{ @@ -144,9 +155,306 @@ a point whose affix is: \tkzUseLua{x} \tkzDrawSegments[blue](a,b c,d)} \tkzLabelPoints(a,...,d) \end{tikzpicture} - \hspace{\fill} + \hspace{\fill} + \end{minipage} + % subsubsection other_transfers (end) -% subsubsection points_transfer (end) +\subsubsection{Example 1} % (fold) +\label{ssub:example_1} + +In this example, it's necessary to transfer the function to the Lua part, then retrieve the curve point coordinates from \TeX. + +The main tools used are a table and its methods (\Imeth{table}{insert},\Imeth{table}{concat}) and the \Igfct{lua}{load} function. + +\begin{Verbatim} +\makeatletter\let\percentchar\@percentchar\makeatother +\directlua{ + function list (f,min,max,nb) + local tbl = {} + for x = min, max, (max - min) / nb do + table.insert (tbl, ('(\percentchar f,\percentchar f)'):format (x, f (x))) + end + return table.concat (tbl) + end +} +\def\plotcoords#1#2#3#4{% +\directlua{% + f = load (([[ + return function (x) + return (\percentchar s) + end + ]]):format ([[#1]]), nil, 't', math) () +tex.print(list(f,#2,#3,#4))} +} +\begin{tikzpicture} +\tkzInit[xmin=1,xmax=3,ymin=0,ymax=2] +\tkzGrid +\tkzDrawX[right=3pt,label={$x$}] +\tkzDrawY[above=3pt,label={$f(x) = \dfrac{1-\mathrm{e}^{-x^2}}{1+\mathrm{e}^{-x^2}}$}] +\draw[cyan,thick] plot coordinates {\plotcoords{(1-exp(-x^2))/(exp(-x^2)+1)}{-3}{3}{100}}; +\end{tikzpicture} +\end{Verbatim} + + +\makeatletter\let\percentchar\@percentchar\makeatother +\directlua{ + function list (f,min,max,nb) + local tbl = {} + for x = min, max, (max - min) / nb do + table.insert (tbl, ('(\percentchar f,\percentchar f)'):format (x, f (x))) + end + return table.concat (tbl) + end +} + +\def\plotcoords#1#2#3#4{% +\directlua{% + f = load (([[ + return function (x) + return (\percentchar s) + end + ]]):format ([[#1]]), nil, 't', math) () +tex.print(list(f,#2,#3,#4))} +} + +\begin{tikzpicture} +\tkzInit[xmin=1,xmax=3,ymin=0,ymax=2] +\tkzGrid +\tkzDrawX[right=3pt,label={$x$}] +\tkzDrawY[above=3pt,label={$f(x) = \dfrac{1-\mathrm{e}^{-x^2}}{1+\mathrm{e}^{-x^2}}$}] +\draw[cyan,thick] plot coordinates {\plotcoords{(1-exp(-x^2))/(exp(-x^2)+1)}{-3}{3}{100}}; + +\end{tikzpicture} + +% subsubsection example_1 (end) + +\subsubsection{Example 2} % (fold) +\label{ssub:example_2} + +This consists in passing a number (the number of sides) from \TeX\ to \code{Lua}. This is made easier by using the \Iprimitive{directlua} primitive. This example is based on a answer from egreg [\href{https://tex.stackexchange.com/questions/729009/how-can-these-regular-polygons-be-arranged-within-a-page/731503#731503}{egreg--tex.stackexchange.com}] + +\begin{Verbatim} +\directlua{ + z.I = point: new (0,0) + z.A = point: new (2,0) +} +\def\drawPolygon#1{ +\directlua{ + RP.six = regular_polygon : new (z.I,z.A,#1) + RP.six : name ("P_") + } +\begin{tikzpicture}[scale=.5] + \def\nb{\tkzUseLua{RP.six.nb}} + \tkzGetNodes + \tkzDrawCircles(I,A) + \tkzDrawPolygon(P_1,P_...,P_\nb) + \tkzDrawPoints[red](P_1,P_...,P_\nb) +\end{tikzpicture} +} +\foreach [count=\i] \n in {3, 4, ..., 10} { + \makebox[0.2\textwidth]{% + \begin{tabular}[t]{@{}c@{}} + $n=\n$ \\[1ex] + \drawPolygon{\n} + \end{tabular}% + }\ifnum\i=4 \\[2ex]\fi +} +\end{Verbatim} + +\directlua{ + z.I = point: new (0,0) + z.A = point: new (2,0) +} +\def\drawPolygon#1{ +\directlua{ + RP.six = regular_polygon : new (z.I,z.A,#1) + RP.six : name ("P_") + } +\begin{tikzpicture}[scale=.5] + \def\nb{\tkzUseLua{RP.six.nb}} + \tkzGetNodes + \tkzDrawCircles(I,A) + \tkzDrawPolygon(P_1,P_...,P_\nb) + \tkzDrawPoints[red](P_1,P_...,P_\nb) +\end{tikzpicture} +} +\foreach [count=\i] \n in {3, 4, ..., 10} { + \makebox[0.2\textwidth]{% + \begin{tabular}[t]{@{}c@{}} + $n=\n$ \\[1ex] + \drawPolygon{\n} + \end{tabular}% + }\ifnum\i=4 \\[2ex]\fi +} + +% subsubsection example_2 (end) + +\subsubsection{Example 3} % (fold) +\label{ssub:example_3} + +This time, the transfer will be carried out using an external file. The following example is based on this one, but using a table. + +\directlua{ + z.a = point: new (1,0) + z.b = point: new (3,2) + z.c = point: new (0,2) + A,B,C = parabola (z.a,z.b,z.c) + + function f(t0, t1, n) + local out=assert(io.open("tmp.table","w")) + local y + for t = t0,t1,(t1-t0)/n do + y = A*t^2+B*t +C + out:write(t, " ", y, " i\string\n") + end + out:close() + end + } + +\begin{minipage}{0.5\textwidth} +\begin{Verbatim} +\directlua{ + z.a = point: new (1,0) + z.b = point: new (3,2) + z.c = point: new (0,2) + A,B,C = parabola (z.a,z.b,z.c) + + function f(t0, t1, n) + local out=assert(io.open("tmp.table","w")) + local y + for t = t0,t1,(t1-t0)/n do + y = A*t^2+B*t +C + out:write(t, " ", y, " i\string\n") + end + out:close() + end + } +\begin{tikzpicture} + \tkzGetNodes + \tkzInit[xmin=-1,xmax=5,ymin=0,ymax=6] + \tkzDrawX\tkzDrawY + \tkzDrawPoints[red,size=2](a,b,c) + \directlua{f(-1,3,100)}% + \draw[domain=-1:3] plot[smooth] file {tmp.table}; +\end{tikzpicture} +\end{Verbatim} +\end{minipage} +\begin{minipage}{0.5\textwidth} +\begin{tikzpicture} + \tkzGetNodes + \tkzInit[xmin=-1,xmax=5,ymin=0,ymax=6] + \tkzDrawX\tkzDrawY + \tkzDrawPoints[red,size=2](a,b,c) + \directlua{f(-1,3,100)}% + \draw[domain=-1:3] plot[smooth] file {tmp.table}; +\end{tikzpicture} +\end{minipage} +% subsubsection example_3 (end) + +\subsubsection{Example 4} % (fold) +\label{ssub:example_4} + +The result is identical to the previous one. +\begin{Verbatim} +\directlua{ + z.a = point: new (1,0) + z.b = point: new (3,2) + z.c = point: new (0,2) + A,B,C = parabola (z.a,z.b,z.c) + + function f(t0, t1, n) + local tbl = {} + for t = t0,t1,(t1-t0)/n do + y = A*t^2+B*t +C + table.insert (tbl, "("..t..","..y..")") + end + return table.concat (tbl) +end +} +\begin{tikzpicture} + \tkzGetNodes + \tkzDrawX\tkzDrawY + \tkzDrawPoints[red,size=2pt](a,b,c) + \draw[domain=-2:3,smooth] plot coordinates {\directlua{tex.print(f(-2,3,100))}}; +\end{tikzpicture} +\end{Verbatim} +% subsubsection example_4 (end) + +\subsubsection{Example 5} % (fold) +\label{ssub:example_5} + +\begin{Verbatim} +\makeatletter\let\percentchar\@percentchar\makeatother +\directlua{ +function cellx (start,step,n) +return start+step*(n-1) +end +} +\def\calcval#1#2{% +\directlua{ + f = load (([[ + return function (x) + return (\percentchar s) + end + ]]):format ([[#1]]), nil, 't', math) () +x = #2 +tex.print(string.format("\percentchar.2f",f(x)))} +} +\def\fvalues(#1,#2,#3,#4) {% +\def\firstline{$x$} + \foreach \i in {1,2,...,#4}{% + \xdef\firstline{\firstline & \tkzUseLua{cellx(#2,#3,\i)}}} +\def\secondline{$f(x)=#1$} + \foreach \i in {1,2,...,#4}{% + \xdef\secondline{\secondline & + \calcval{#1}{\tkzUseLua{cellx(#2,#3,\i)}}}} +\begin{tabular}{l*{#4}c} + \toprule + \firstline \\ + \secondline \\ + \bottomrule + \end{tabular} +} +\fvalues(x^2-3*x+1,-2,.25,8) +\vspace{12pt} + +\end{Verbatim} + +\makeatletter\let\percentchar\@percentchar\makeatother +\directlua{ +function cellx (start,step,n) +return start+step*(n-1) +end +} +\def\calcval#1#2{% +\directlua{ + f = load (([[ + return function (x) + return (\percentchar s) + end + ]]):format ([[#1]]), nil, 't', math) () +x = #2 +tex.print(string.format("\percentchar.2f",f(x)))} +} +\def\fvalues(#1,#2,#3,#4) {% +\def\firstline{$x$} + \foreach \i in {1,2,...,#4}{% + \xdef\firstline{\firstline & \tkzUseLua{cellx(#2,#3,\i)}}} +\def\secondline{$f(x)=#1$} + \foreach \i in {1,2,...,#4}{% + \xdef\secondline{\secondline & + \calcval{#1}{\tkzUseLua{cellx(#2,#3,\i)}}}} +\begin{tabular}{l*{#4}c} + \toprule + \firstline \\ + \secondline \\ + \bottomrule + \end{tabular} +} +\fvalues(x^2-3*x+1,-2,.25,8) +\vspace{12pt} + +% subsubsection example_5 (end) % section transfers (end) \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex index 6ab030ee2f8..4b288263919 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex +++ b/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex @@ -76,7 +76,7 @@ This version utilizes the simplest construction method made possible by Lua. \begin{mybox} \begin{Verbatim} -\begin{tkzelements} +\directlua{ scale = .4 z.A = point: new (0,0) z.B = point: new (6,0) @@ -95,7 +95,7 @@ This version utilizes the simplest construction method made possible by Lua. C.apo = C.ortho : inversion (C.euler) z.O = C.apo.center z.xa,z.xb,z.xc = C.ortho : inversion (z.Ea,z.Eb,z.Ec) -\end{tkzelements} +} \end{Verbatim} \end{mybox} @@ -160,7 +160,7 @@ The subsequent section exclusively deals with drawings, and is managed by \pkg{t \end{Verbatim} \vspace{1em} -\begin{tkzelements} +\directlua{ scale = .4 z.A = point: new (0,0) z.B = point: new (6,0) @@ -179,7 +179,7 @@ The subsequent section exclusively deals with drawings, and is managed by \pkg{t C.apo = C.ortho : inversion (C.euler) z.O = C.apo.center z.xa,z.xb,z.xc = C.ortho : inversion (z.Ea,z.Eb,z.Ec) -\end{tkzelements} +} \begin{minipage}{\textwidth} \hspace*{\fill} \begin{tikzpicture} diff --git a/Master/texmf-dist/doc/latex/tkz-elements/tkz-elements.pdf b/Master/texmf-dist/doc/latex/tkz-elements/tkz-elements.pdf Binary files differindex edb5864f4fb..f7ba1922c0e 100644 --- a/Master/texmf-dist/doc/latex/tkz-elements/tkz-elements.pdf +++ b/Master/texmf-dist/doc/latex/tkz-elements/tkz-elements.pdf diff --git a/Master/texmf-dist/doc/latex/tkz-elements/tmp.table b/Master/texmf-dist/doc/latex/tkz-elements/tmp.table new file mode 100644 index 00000000000..2d2b1e66d4f --- /dev/null +++ b/Master/texmf-dist/doc/latex/tkz-elements/tmp.table @@ -0,0 +1,100 @@ +-1 6 i +-0.96 5.8016 i +-0.92 5.6064 i +-0.88 5.4144 i +-0.84 5.2256 i +-0.8 5.04 i +-0.76 4.8576 i +-0.72 4.6784 i +-0.68 4.5024 i +-0.64 4.3296 i +-0.6 4.16 i +-0.56 3.9936 i +-0.52 3.8304 i +-0.48 3.6704 i +-0.44 3.5136 i +-0.4 3.36 i +-0.36 3.2096 i +-0.32 3.0624 i +-0.28 2.9184 i +-0.24 2.7776 i +-0.2 2.64 i +-0.16 2.5056 i +-0.12 2.3744 i +-0.08 2.2464 i +-0.04 2.1216 i +3.4694469519536e-16 2 i +0.04 1.8816 i +0.08 1.7664 i +0.12 1.6544 i +0.16 1.5456 i +0.2 1.44 i +0.24 1.3376 i +0.28 1.2384 i +0.32 1.1424 i +0.36 1.0496 i +0.4 0.96 i +0.44 0.8736 i +0.48 0.7904 i +0.52 0.7104 i +0.56 0.6336 i +0.6 0.56 i +0.64 0.4896 i +0.68 0.4224 i +0.72 0.3584 i +0.76 0.2976 i +0.8 0.24 i +0.84 0.1856 i +0.88 0.1344 i +0.92 0.086399999999999 i +0.96 0.041599999999999 i +1 -4.4408920985006e-16 i +1.04 -0.0384 i +1.08 -0.0736 i +1.12 -0.1056 i +1.16 -0.1344 i +1.2 -0.16 i +1.24 -0.1824 i +1.28 -0.2016 i +1.32 -0.2176 i +1.36 -0.2304 i +1.4 -0.24 i +1.44 -0.2464 i +1.48 -0.2496 i +1.52 -0.2496 i +1.56 -0.2464 i +1.6 -0.24 i +1.64 -0.2304 i +1.68 -0.2176 i +1.72 -0.2016 i +1.76 -0.1824 i +1.8 -0.16 i +1.84 -0.1344 i +1.88 -0.1056 i +1.92 -0.073599999999999 i +1.96 -0.038399999999998 i +2 1.7763568394003e-15 i +2.04 0.041600000000001 i +2.08 0.086400000000002 i +2.12 0.1344 i +2.16 0.1856 i +2.2 0.24 i +2.24 0.2976 i +2.28 0.3584 i +2.32 0.4224 i +2.36 0.4896 i +2.4 0.56 i +2.44 0.6336 i +2.48 0.7104 i +2.52 0.7904 i +2.56 0.8736 i +2.6 0.96 i +2.64 1.0496 i +2.68 1.1424 i +2.72 1.2384 i +2.76 1.3376 i +2.8 1.44 i +2.84 1.5456 i +2.88 1.6544 i +2.92 1.7664 i +2.96 1.8816 i diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty b/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty index 597a0508506..821fe562258 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty @@ -1,5 +1,5 @@ % encoding : utf8 -% tkz-elements.sty v2.30c +% tkz-elements.sty v3.0c % Copyright 2024 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -11,29 +11,33 @@ % This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -\ProvidesPackage{tkz-elements}[2024/07/16 version 2.30c Graphic Object Library] -\RequirePackage{luacode} -\directlua{require "tkz_elements_main"} +\ProvidesPackage{tkz-elements}[2024/07/16 version 3.00 Graphic Object Library] +%\RequirePackage{luacode} + \directlua{ + require "tkz_elements_main" + tkz_epsilon=1e-8 + tkz_dc=2 + indirect = true + init_elements()}% + \newenvironment{tkzelements} { \directlua{scale=1} - \directlua{tkz_epsilon=1e-8} - \directlua{tkz_dc=2} - \directlua{indirect = true} - \directlua{z={} - C={} - E={} - L={} - M={} - P={} - Q={} - R={} - RP={} - S={} - T={} - V={}} + \directlua{z = {} + C = {} + E = {} + L = {} + M = {} + P = {} + Q = {} + R = {} + RP= {} + S = {} + T = {} + V = {}} \luacode} - {\endluacode} + {\endluacode}% + % new version of the next macro proposed by Sanskar Singh \def\tkzGetNodes{\directlua{% for K,V in pairs(z) do diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua index e17ccb2ebb4..6bb0c7c4f04 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua @@ -1,6 +1,6 @@ -- tkz_elements-circles.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua index 3ded691d539..6d5fae53ec3 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua @@ -1,6 +1,6 @@ -- tkz_elements_class.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- from class.lua (Simple Lua Classes from Lua-users wiki) -- Compatible with Lua 5.1 (not 5.0). -- http://lua-users.org/wiki/SimpleLuaClasses DavidManura diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua index 7581c19d7a9..cbc3a3969c9 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua @@ -1,6 +1,6 @@ -- tkz_elements-ellipses.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua index 88f9040b7f0..3208f7a5d3a 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_circles.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua index fe253e9aa23..750bafe0784 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua @@ -1,6 +1,6 @@ -- tkz_elements_intersections.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua index a5504593c06..31c735df6f9 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_lines.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua index c3f7e54ffd3..d3efe9b2909 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_maths.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_matrices.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_matrices.lua index c80420090f4..3ced42be40c 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_matrices.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_matrices.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_matrices.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua index e2366e25e3d..59454e78f02 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_points.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua index 0f74d28fe98..0dfed425ae2 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_regular.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua index 02d3058a161..5a81a993e1a 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_triangles.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua index 797365f33f4..4d24d9d229c 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua @@ -1,6 +1,6 @@ -- tkz_elements_lines.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -437,6 +437,14 @@ function line: sas (a,phi) pt = rotation_ (self.pa,phi,x) return triangle : new (self.pa,self.pb,pt) end + +function line: asa (alpha,beta) + local pta,ptb,pt + pta = rotation_ (self.pa,alpha,self.pb) + ptb = rotation_ (self.pb,-beta,self.pa) + pt = intersection_ll_ (self.pa,pta,self.pb,ptb) + return triangle : new (self.pa,self.pb,pt) +end ---- sacred triangles ---- function line: gold (swap) diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua index 142f00c8ed0..e4f5c7623ea 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua @@ -1,6 +1,6 @@ -- tkz_elements-main.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -12,20 +12,7 @@ -- This work has the LPPL maintenance status “maintained”. -- The Current Maintainer of this work is Alain Matthes. - z = {} - C = {} - E = {} - L = {} - P = {} - M = {} - Q = {} - R = {} - RP = {} - S = {} - T = {} - V = {} - - -- loads module +-- loads module require "tkz_elements_point.lua" require "tkz_elements_line.lua" require "tkz_elements_circle.lua" @@ -48,4 +35,20 @@ require "tkz_elements_functions_circles.lua" require "tkz_elements_functions_triangles.lua" require "tkz_elements_functions_regular.lua" require "tkz_elements_functions_matrices.lua" -require "tkz_elements_matrices.lua"
\ No newline at end of file +require "tkz_elements_matrices.lua" + +function init_elements () + scale=1 + z={} + C={} + E={} + L={} + M={} + P={} + Q={} + R={} + RP={} + S={} + T={} + V={} +end
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_matrices.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_matrices.lua index 035e8a0a33e..f0bd69b95e7 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_matrices.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_matrices.lua @@ -1,6 +1,6 @@ -- tkz_elements_matrices.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua index daa3e21872b..7fcac90d860 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_maths.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua index d471976d066..a6dc3360f99 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua @@ -1,6 +1,6 @@ -- tkz_elements_parallelogram.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua index e29779ef791..3ec0262051e 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua @@ -1,6 +1,6 @@ -- tkz_elements_point.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua index 6625b9d7898..fc3e95b28fc 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua @@ -1,6 +1,6 @@ -- tkz_elements_quadrilateral.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua index fdc30845018..a5317220209 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua @@ -1,6 +1,6 @@ -- tkz_elements-rectangle.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua index a4527c779b9..bf49fca814c 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua @@ -1,6 +1,6 @@ -- tkz_elements_regular.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -15,7 +15,7 @@ regular_polygon = {} function regular_polygon: new (za, zb ,nb) local type = 'regular_polygon' - local table = regular_ (za , zb , nb) + local table = regular_ (za , zb , nb) local center = za local through = zb local angle = 2 * math.pi/nb @@ -52,7 +52,7 @@ end ----------------------- function regular_polygon : incircle () local next,first - next = self.table[2] + next = self.table[2] first = self.table[1] return circle : new ( self.center , projection_ (first,next,self.center) ) end diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua index 93860b825c9..68bfa8dec00 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua @@ -1,6 +1,6 @@ -- tkz_elements-square.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua index 84b10273dad..6318a7d8d11 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua @@ -1,6 +1,6 @@ -- tkz_elements_triangles.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua index 0dcbbfde61d..fcd63c783a5 100644 --- a/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua +++ b/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua @@ -1,6 +1,6 @@ -- tkz_elements_vectors.lua -- date 2024/07/16 --- version 2.30c +-- version 3.00 -- Copyright 2024 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 |