summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex175
1 files changed, 98 insertions, 77 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
index 017e3ae2d4..d0867da269 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
@@ -5,7 +5,7 @@
\bgroup
\catcode`_=12
\small
-\captionof{table}{Math constants and functions.}
+\captionof{table}{Math constants and functions.}\label{misc}
\begin{tabular}{ll}
\toprule
\textbf{contants or functions} & \textbf{Comments}\\
@@ -17,21 +17,31 @@
%tkzround( num, idp ) & \\
% Cramer33(a1,a2,a3,b1,b2,b3,c1,c2,c3) & \\
% Cramer22(a1,a2,b1,b2) & \\
+\Igfct{math}{length (a,b) } & point.abs(a-b) See (\ref{ssub:report_de_distance}) \\
\Igfct{math}{islinear (z1,z2,z3) } & Are the points aligned? (z2-z1) $\parallel$ (z3-z1) ? \\
\Igfct{math}{isortho (z1,z2,z3)} & (z2-z1) $\perp$ (z3-z1) ? boolean\\
+\Igfct{math}{get\_angle (z1,z2,z3)} & the vertex is z1 See (\ref{sub:get_angle}) \\
+\Igfct{math}{bisector (z1,z2,z3)} & L.Aa = bisector (z.A,z.B,z.C) from A (\ref{sub:get_angle})\\
+\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 | \\
-\Igfct{math}{angle\_normalize (a) } & to get a value between 0 and $2\pi$ \\
-\Igfct{misc}{radical\_center (C1,C2,C3)} & see \ref{sub:radical_center} \\
-\Igfct{misc}{radical\_circle (C1,C2,C3)} & see \ref{sub:radical_circle} \\
+\Igfct{math}{angle\_normalize (an) } & to get a value between 0 and $2\pi$ \\
\Igfct{misc}{barycenter (\{z1,n1\},\{z2,n2\}, ...)} & barycenter of list of points \\
\bottomrule
\end{tabular}
\egroup
+\subsection{Length of a segment} % (fold)
+\label{sub:length_of_a_segment}
+|length(z.A,z.B)| is a shortcut for |point.abs(z.A-z.B)|. This avoids the need to use complexes.
+
+% subsection length_of_a_segment (end)
+
+
\subsection{Harmonic division with tkzphi } % (fold)
\label{sub:harmonic_division_with_tkzphi}
\begin{tkzexample}[latex=0cm,small,code only]
@@ -111,7 +121,7 @@
% subsection function_islinear (end)
-\subsection{Function \tkzfname{value} }% (fold)
+\subsection{Function value }% (fold)
\label{sub:function_value}
value to apply scaling if necessary
@@ -120,7 +130,7 @@ If |scale = 1.2| with a = value(5) the actual value of |a| will be $5\times 1.2
% subsubsection function_value (end)
-\subsubsection{Function \tkzfname{real} }% (fold)
+\subsubsection{Function real }% (fold)
\label{ssub:function_real}
If |scale = 1.2| with a = 6 then real(a) = $6 / 1.2 = 5$ .
@@ -135,44 +145,44 @@ It's possible to transfer variable from Lua to \TEX{} with
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.A = point : new (0 , 0)
- z.B = point : new (4 , 3)
- z.C = point : new (2 , 5)
- L.AB = line : new (z.A,z.B)
- d = L.AB : distance (z.C)
- l = L.AB.length
- z.H = L.AB : projection (z.C)
- \end{tkzelements}
- % possible here \tkzUseLua{L.AB.length}
- \begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawLines(A,B C,H)
- \tkzDrawPoints(A,B,C,H)
- \tkzLabelPoints(A,B,C,H)
- \tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$}
- \tkzLabelSegment[below left,draw](C,H){$AB = \tkzUseLua{l}$}
- \end{tikzpicture}
- \end{verbatim}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new (0 , 0)
+ z.B = point : new (3 , 2)
+ z.C = point : new (2 , 5)
+ L.AB = line : new (z.A,z.B)
+ 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)
+\tkzDrawPoints(A,B,C,H)
+\tkzLabelPoints(A,B,C,H)
+\tkzLabelSegment[above right,draw](C,H){$CH = \tkzUseLua{d}$}
+\tkzLabelSegment[below right,draw](A,B){$AB = \tkzUseLua{l}$}
+\end{tikzpicture}
+\end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
z.A = point : new (0 , 0)
- z.B = point : new (4 , 3)
+ z.B = point : new (3 , 2)
z.C = point : new (2 , 5)
L.AB = line : new (z.A,z.B)
d = L.AB : distance (z.C)
l = L.AB.length
z.H = L.AB : projection (z.C)
\end{tkzelements}
+ \hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLines(A,B C,H)
\tkzDrawPoints(A,B,C,H)
\tkzLabelPoints(A,B,C,H)
-\tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$}
-\tkzLabelSegment[below left,draw](C,H){$AB = \tkzUseLua{l}$}
+\tkzLabelSegment[above right,draw](C,H){$CH = \tkzUseLua{d}$}
+\tkzLabelSegment[below right,draw](A,B){$AB = \tkzUseLua{l}$}
\end{tikzpicture}
\end{minipage}
% subsection transfer_from_lua_to_tex (end)
@@ -280,7 +290,6 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}
-
% subsection get_angle (end)
\subsection{Dot or scalar product} % (fold)
@@ -343,59 +352,71 @@ With the functions |islinear| and |isortho|. |islinear(z.a,z.b,z.c)| gives |true
|isortho(z.a,z.b,z.c)| gives |true| if the line $(ab)$ is orthogonal to the line $(ac)$.
% subsection alignment_or_orthogonality (end)
+\subsection{Bisector and altitude} % (fold)
+\label{sub:bisector_and_altitude}
+These functions are useful if you don't need to create a useful triangle object for the rest of your code.
+
+\begin{minipage}{.5\textwidth}
+ \begin{verbatim}
+\begin{tkzelements}
+ z.a = point: new (0, 0)
+ z.b = point: new (5, -2)
+ z.c = point: new (2, 3)
+ z.i = bisector (z.a,z.c,z.b).pb
+ z.h = altitude (z.b,z.a,z.c).pb
+ 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
+ \tkzDrawPolygon(a,b,c)
+ \tkzDrawSegments(a,i b,h a,e)
+ \tkzDrawPoints(a,b,c,i,h)
+ \tkzLabelPoints(a,b)
+ \tkzLabelPoints[above](c,i,h)
+ \tkzMarkAngle[->](i,a,c)
+ \tkzLabelAngle[font=\tiny,pos=.75](i,a,c){\tkzUseLua{angci}}
+ \tkzMarkAngle[<-](b,a,i)
+ \tkzLabelAngle[font=\tiny,pos=.75](b,a,i){\tkzUseLua{angic}}
+\end{tikzpicture}
+ \end{verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ z.a = point: new (0, 0)
+ z.b = point: new (5, -2)
+ z.c = point: new (2, 3)
+ z.i = bisector (z.a,z.c,z.b).pb
+ z.h = altitude (z.b,z.a,z.c).pb
+ 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
+ \tkzDrawPolygon(a,b,c)
+ \tkzDrawSegments(a,i b,h a,e)
+ \tkzDrawPoints(a,b,c,i,h)
+ \tkzLabelPoints(a,b)
+ \tkzLabelPoints[above](c,i,h)
+ \tkzMarkAngle[->](i,a,c)
+ \tkzLabelAngle[font=\tiny,pos=.75](i,a,c){\tkzUseLua{angci}}
+ \tkzMarkAngle[<-](b,a,i)
+ \tkzLabelAngle[font=\tiny,pos=.75](b,a,i){\tkzUseLua{angic}}
+\end{tikzpicture}
+\end{minipage}
+% subsection bisector_and_altitude (end)
+
\subsection{Other functions} % (fold)
\label{sub:other_functions}
Not documented because still in beta version: |parabola|, |Cramer22|, |Cramer33|.
% subsection other_functions (end)
-
% section math_functions (end)
-% % section classes_and_objects (end)
-\endinput
-
-
+\endinput
-% \bgroup
-% \catcode`_=12
-% \begin{table}[H]
-% \small
-% \begin{center}
-% \caption{functions\_polygons.lua }
-% \begin{tabular}{lll}
-% \toprule
-% \textbf{Functions} & \textbf{Comments}\\
-% \midrule
-% function square (a,b) \\
-% function parallelogram (a,b,c) \\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-% \end{table}
-% \egroup
-
-
-% \bgroup
-% \catcode`_=12
-% \begin{table}[H]
-% \small
-% \begin{center}
-% \caption{elements\_vectors.lua }
-% \begin{tabular}{lll}
-% \toprule
-% \textbf{Methods} & \textbf{Comments}\\
-% \midrule
-% vector = {} class vector \\
-% \Imeth{vector}{function vector: new (z1,z2)} & st, ed \\
-% \Imeth{vector}{function vector: normalize ()} &\\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-% \end{table}
-% \egroup
-
-
-
-
-\endinput \ No newline at end of file