diff options
author | Norbert Preining <norbert@preining.info> | 2022-01-05 03:00:57 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-01-05 03:00:57 +0000 |
commit | c03c0d515f1bfbd111d40e78805db4696e080fb8 (patch) | |
tree | 4d72d1df66079b3937776da41a78d71189719dad /macros/latex/contrib/tkz/tkz-euclide | |
parent | 1903b598f8dda613f5c584bb18ccfd2fd8c278bb (diff) |
CTAN sync 202201050300
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-euclide')
317 files changed, 10982 insertions, 11153 deletions
diff --git a/macros/latex/contrib/tkz/tkz-euclide/README.md b/macros/latex/contrib/tkz/tkz-euclide/README.md index 2f040206df..54f230b2e0 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/README.md +++ b/macros/latex/contrib/tkz/tkz-euclide/README.md @@ -1,33 +1,31 @@ -# tkz-euclide — for euclidan geometry +# tkz-euclide — for euclidean geometry -Release 3.0§c 2020/04/06 +Release 4.00 b 2022/01/04 ## Description `tkz-euclide` is a package (latex) which allows you to draw two-dimensional geometric figures, in other words to create figures of Euclidean geometry. -It uses a Cartesian coordinate system orthogonal provided by the `tkz-base` -package as well as tools to define the unique coordinates of points and to +It uses a Cartesian coordinate system orthogonormal (unit 1cm) + as well as tools to define the unique coordinates of points and to manipulate them. The idea is to allow you to follow step by step a construction that would be done by hand as naturally as possible. ## Licence -The scontents package may be modified and distributed under the terms and -conditions of the [LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3c or greater. +This package may be modified and distributed under the terms and +conditions of the [LaTeX Project Public License](https://www.latex-project.org/lppl/), version 1.3 or greater. ## Requirements The package compiles with utf8, pdflatex and lualatex, loads and depends on updated versions of: -- [tkz-base](https://ctan.org/pkg/tkz-base) - [xfp](https://ctan.org/pkg/xfp) -- [numprint](https://ctan.org/pkg/numprint) - [tikz](https://ctan.org/pkg/tikz) ## Installation -The package `tkz-eculide` is present in TeXLive and MiKTeX, use the package +The package `tkz-euclide` is present in TeXLive and MiKTeX, use the package manager to install. You can experiment with the `tkz-euclide` package by placing all of the @@ -36,16 +34,6 @@ distribution files in the directory containing your current tex file. The different files must be moved into the different directories in your installation `TDS` tree or in your `TEXMFHOME`: -``` - doc/cheatsheet_euclide_2.pdf -> TDS:doc/latex/tkz-euclide/cheatsheet_euclide_2.pdf - doc/cheatsheet_euclide_1.pdf -> TDS:doc/latex/tkz-euclide/cheatsheet_euclide_1.pdf - doc/Euclidean_geometry.pdf -> TDS:doc/latex/tkz-euclide/Euclidean_geometry.pdf - doc/TKZdoc-euclide.pdf -> TDS:doc/latex/tkz-euclide/TKZdoc-euclide.pdf - doc/README.md -> TDS:doc/latex/tkz-euclide/README.md - doc/examples/*.* -> TDS:doc/latex/tkz-euclide/examples/*.* - doc/sourcedoc/*.* -> TDS:doc/latex/tkz-euclide/sourcedoc/*.* - code/*.* -> TDS:tex/latex/tkz-euclide/*.* -``` ## How to use it @@ -54,6 +42,12 @@ your LaTeX document: ``` \usepackage{tkz-euclide} +\begin{document} +\begin{tikzpicture} +``` +your code +``` +\end{tikzpicture} ``` The line `\usetkzobj{all}` is no longer required with `tkz-euclide` but you can use it with @@ -64,26 +58,24 @@ package conflicts. ## Documentation -Documentation for `tkz-euclide` is available on `CTAN`. You have two -cheatsheets about tkz-euclide in the archive. Use `texdoc tkz-euclide`. +Documentation for `tkz-euclide` is available on `CTAN`. ## Examples -All examples given in documentation will be stored on `CTAN` as standalone -files, ready for compilation. You can use the main.tex file to load and -compile an example. - -The archive contains a litle document about Euclidean Geometry with four -examples. +All examples given in documentation will be stored on my site : [http://altermundus.fr](http://altermundus.fr) as standalone +files, ready for compilation. -Other examples, en français, are on my site: [http://altermundus.fr](http://altermundus.fr) +Other examples, in French, are on my site. ## Compatibility The new version of `tkz-euclide` is *not* fully compatible with the version -1.16 but the differences are minor. +3.06 but the differences are minor. ## History +- 4.00 correction of bugs, tkz-euclide no longer depends on tkz-base. The unit is "cm". + The bounding box is controlled. The documentation has been restructured according to the rule: + set, calculate, draw, mark and fill, label. - 3.06 correction of bugs, amelioration of the documentation. - 3.05 correction of bugs, amelioration of the documentation. - 3.02 replacement french documentation by english documentation, correction of bugs. diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/Euclidean_geometry.pdf b/macros/latex/contrib/tkz/tkz-euclide/doc/Euclidean_geometry.pdf Binary files differdeleted file mode 100644 index 385ff5261c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/Euclidean_geometry.pdf +++ /dev/null diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/TKZdoc-euclide.pdf b/macros/latex/contrib/tkz/tkz-euclide/doc/TKZdoc-euclide.pdf Binary files differdeleted file mode 100644 index bbaa8678ef..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/TKZdoc-euclide.pdf +++ /dev/null diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/cheatsheet_euclide_1.pdf b/macros/latex/contrib/tkz/tkz-euclide/doc/cheatsheet_euclide_1.pdf Binary files differdeleted file mode 100644 index 6b771bf35b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/cheatsheet_euclide_1.pdf +++ /dev/null diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/cheatsheet_euclide_2.pdf b/macros/latex/contrib/tkz/tkz-euclide/doc/cheatsheet_euclide_2.pdf Binary files differdeleted file mode 100644 index 20dfc84c2e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/cheatsheet_euclide_2.pdf +++ /dev/null diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-FAQ.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-FAQ.tex index c445fcc638..041890614d 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-FAQ.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-FAQ.tex @@ -4,13 +4,42 @@ For the moment, I'm basing myself on my own, because having changed syntax several times, I've made a number of mistakes. This section is going to be expanded. \begin{itemize}\setlength{\itemsep}{10pt} + \item Error "dimension too large" : In some cases, this error occurs. One way to avoid it is to use the "\tkzname{xfp}" option. When this option is used in an environment, the "veclen" function is replaced by a function dependent on "xfp". For example, an error occurs if you use the macro \tkzcname{tkzDrawArc} + with too small an angle. The error is produced by the \NameLib{decoration} library when you want to place a mark on an arc. Even if the mark is absent, the error is still present. + +\begin{tkzexample}[] +\begin{tikzpicture}[scale=1.25] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2.5,0){N} + \tkzDefPoint(-4.2,0.5){M} + \tkzDefPointBy[rotation=center O angle 30](N) + \tkzGetPoint{B} + \tkzDefPointBy[rotation=center O angle -50](N) + \tkzGetPoint{A} + \tkzInterLC(M,B)(O,N) \tkzGetFirstPoint{C} + \tkzInterLC(M,A)(O,N) \tkzGetSecondPoint{A'} + \tkzMarkAngle[mkpos=.2, size=0.5](A,C,B) + \tkzMarkAngle[mkpos=.2, size=0.5](A,M,C) + \tkzDrawSegments(A,C M,A M,B) + \tkzDrawCircle(O,N) + \tkzLabelCircle[above left](O,N)(120){$\mathcal{C}$} + \begin{scope}[xfp] + \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M) + \end{scope} + \tkzDrawPoints(O, A, B, M, B, C) + \tkzLabelPoints[right](O,A,B) + \tkzLabelPoints[above left](M,C) + \tkzLabelPoint[below left](A'){$A'$} +\end{tikzpicture} +\end{tkzexample} + \item \tkzcname{tkzDrawPoint(A,B)} when you need \tkzcname{tkzDrawPoints}. \item \tkzcname{tkzGetPoint(A)} When defining an object, use braces and not brackets, so write: \tkzcname{tkzGetPoint\{A\}}. \item \tkzcname{tkzGetPoint\{A\}} in place of \tkzcname{tkzGetFirstPoint\{A\}}. When a macro gives two points as results, either we retrieve these points using \tkzcname{tkzGetPoints\{A\}\{B\}}, or we retrieve only one of the two points, using \tkzcname{tkzGetFirstPoint\{A\}} or \tkzcname{tkzGetSecondPoint\{A\}}. These two points can be used with the reference \tkzname{tkzFirstPointResult} or -\tkzname{tkzSecondPointResult}. It is possible that a third point is given as \tkzname{tkzPointResult}. +\tkzname{tkzSecondPointResult}. It is possible that a third point is given as\\ \tkzname{tkzPointResult}. \item \tkzcname{tkzDrawSegment(A,B A,C)} when you need \tkzcname{tkzDrawSegments}. It is possible to use only the versions with an "s" but it is less efficient! @@ -25,8 +54,5 @@ \item Use of \tkzcname{tkzClip}: In order to get accurate results, I avoided using normalized vectors. The advantage of normalization is to control the dimension of the manipulated objects, the disadvantage is that with TeX, this implies inaccuracies. These inaccuracies are often small, in the order of a thousandth, but they lead to disasters if the drawing is enlarged. Not normalizing implies that some points are far away from the working area and \tkzcname{tkzClip} allows you to reduce the size of the drawing. -\item An error occurs if you use the macro \tkzcname{tkzDrawAngle} - with too small an angle. The error is produced by the \NameLib{decoration} library when you want to place a mark on an arc. Even if the mark is absent, the error is still present. It is possible to get around this difficulty with the option \tkzname{mkpos=.2} for example, which will place the mark before the arc. Another possibility is to use the macro \tkzcname{tkzFillAngle}. - \end{itemize} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-angles.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-angles.tex index d67ea4cc8d..7a65cf6a51 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-angles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-angles.tex @@ -1,431 +1,7 @@ \section{The angles} -\subsection{Colour an angle: fill} -The simplest operation -\begin{NewMacroBox}{tkzFillAngle}{\oarg{local options}\parg{A,O,B}}% -$O$ is the vertex of the angle. $OA$ and $OB$ are the sides. Attention the angle is determined by the order of the points. - -\medskip - -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{size}{1 cm}{this option determines the radius of the coloured angular sector.} - -\bottomrule -\end{tabular} - -\medskip -Of course, you have to add all the styles of \TIKZ, like the use of fill and shade... -\end{NewMacroBox} - -\subsubsection{Example with \tkzname{size}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzInit - \tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B} - \tkzFillAngle[size=2cm, fill=gray!10](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} -\end{tkzexample} - - -\subsubsection{Changing the order of items} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzInit - \tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B} - \tkzFillAngle[size=2cm,fill=gray!10](B,O,A) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} -\end{tkzexample} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzInit - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - % Don't forget {} to get, () to use - \tkzFillAngle[size=4cm,left color=white, - right color=red!50](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} -\end{tkzexample} - -\begin{NewMacroBox}{tkzFillAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% -With common options, there is a macro for multiple angles. - \end{NewMacroBox} - -\subsubsection{Multiples angles} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=0.75] - \tkzDefPoint(0,0){B} - \tkzDefPoint(8,0){C} - \tkzDefPoint(0,8){A} - \tkzDefPoint(8,8){D} - \tkzDrawPolygon(B,C,D,A) - \tkzDefTriangle[equilateral](B,C) - \tkzGetPoint{M} - \tkzInterLL(D,M)(A,B) \tkzGetPoint{N} - \tkzDefPointBy[rotation=center N angle -60](D) - \tkzGetPoint{L} - \tkzInterLL(N,L)(M,B) \tkzGetPoint{P} - \tkzInterLL(M,C)(D,L) \tkzGetPoint{Q} - \tkzDrawSegments(D,N N,L L,D B,M M,C) - \tkzDrawPoints(L,N,P,Q,M,A,D) - \tkzLabelPoints[left](N,P,Q) - \tkzLabelPoints[above](M,A,D) - \tkzLabelPoints(L,B,C) - \tkzMarkAngles(C,B,M B,M,C M,C,B% - D,L,N L,N,D N,D,L) - \tkzFillAngles[fill=red!20,opacity=.2](C,B,M% - B,M,C M,C,B D,L,N L,N,D N,D,L) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Mark an angle mark} -More delicate operation because there are many options. The symbols used for marking in addition to those of \TIKZ\ are defined in the file |tkz-lib-marks.tex| and designated by the following characters:\begin{tkzltxexample}[] -|, ||,|||, z, s, x, o, oo -\end{tkzltxexample} - -Their definitions are as follows - -\begin{tkzltxexample}[] -\pgfdeclareplotmark{||} - %double bar -{% - \pgfpathmoveto{\pgfqpoint{2\pgflinewidth}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpoint{-2\pgflinewidth}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{-2\pgflinewidth}{-\pgfplotmarksize}} - \pgfusepathqstroke -} -\end{tkzltxexample} - -\begin{tkzltxexample}[] - %triple bar - \pgfdeclareplotmark{|||} - {% - \pgfpathmoveto{\pgfqpoint{0 pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0 pt}{-\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpoint{-3\pgflinewidth}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{-3\pgflinewidth}{-\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpoint{3\pgflinewidth}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{3\pgflinewidth}{-\pgfplotmarksize}} - \pgfusepathqstroke - } -\end{tkzltxexample} - -\begin{tkzltxexample}[] - % An bar slant - \pgfdeclareplotmark{s|} - {% - \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}% - {-.70710678\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}% - {.70710678\pgfplotmarksize}} - \pgfusepathqstroke - } -\end{tkzltxexample} - - -\begin{tkzltxexample}[] - % An double bar slant - \pgfdeclareplotmark{s||} - {% - \pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}} - \pgfusepathqstroke - } -\end{tkzltxexample} - - -\begin{tkzltxexample}[] - % z - \pgfdeclareplotmark{z} - {% - \pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0.75\pgfplotmarksize}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{\pgfplotmarksize}} - \pgfusepathqstroke - } -\end{tkzltxexample} - -\begin{tkzltxexample}[] - % s - \pgfdeclareplotmark{s} - {% - \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} - \pgfpathcurveto - {\pgfpoint{0pt}{0pt}} - {\pgfpoint{-\pgfplotmarksize}{\pgfplotmarksize}} - {\pgfpoint{\pgfplotmarksize}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} - \pgfpathcurveto - {\pgfpoint{0pt}{0pt}} - {\pgfpoint{\pgfplotmarksize}{-\pgfplotmarksize}} - {\pgfpoint{-\pgfplotmarksize}{-\pgfplotmarksize}} - \pgfusepathqstroke - } -\end{tkzltxexample} - -\begin{tkzltxexample}[] - % infinity - \pgfdeclareplotmark{oo} - {% - \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} - \pgfpathcurveto - {\pgfpoint{0pt}{0pt}} - {\pgfpoint{.5\pgfplotmarksize}{1\pgfplotmarksize}} - {\pgfpoint{\pgfplotmarksize}{0pt}} - \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} - \pgfpathcurveto - {\pgfpoint{0pt}{0pt}} - {\pgfpoint{-.5\pgfplotmarksize}{1\pgfplotmarksize}} - {\pgfpoint{-\pgfplotmarksize}{0pt}} - \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} - \pgfpathcurveto - {\pgfpoint{0pt}{0pt}} - {\pgfpoint{.5\pgfplotmarksize}{-1\pgfplotmarksize}} - {\pgfpoint{\pgfplotmarksize}{0pt}} - \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} - \pgfpathcurveto - {\pgfpoint{0pt}{0pt}} - {\pgfpoint{-.5\pgfplotmarksize}{-1\pgfplotmarksize}} - {\pgfpoint{-\pgfplotmarksize}{0pt}} - \pgfusepathqstroke - } -\end{tkzltxexample} - - - -% \tkzMarkAngle(B, A, C) -% -% Marque d'angle -% arc de cercle (simple/double/triple) et marque d'églité. -% -% Par défaut: -% arc = simple -% mksize = 1cm (rayon de l'arc) -% style traits pleins -% mkpos ? position: 0.5 (position de la marque) -% mark rien du tout (ignoré si type est utilisé) -% -% Paramètres (optionnels) -% arc : l, ll, lll -% mksize : 1cm -% gap : 3pt -% dist : 1? -% style : type de traits -% mkpos : 0.5 -% mark : none , |, ||,|||, z, s, x, o, oo mais tous les -% % symboles de tikz sont permis - -\begin{NewMacroBox}{tkzMarkAngle}{\oarg{local options}\parg{A,O,B}}% -$O$ is the vertex. Attention the arguments vary according to the options. Several markings are possible. You can simply draw an arc or add a mark on this arc. The style of the arc is chosen with the option \tkzname{arc}, the radius of the arc is given by \tkzname{mksize}, the arc can, of course, be colored. - -\medskip - -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{arc}{l}{choice of l, ll and lll (single, double or triple).} -\TOline{size}{1 cm}{arc radius.} -\TOline{mark}{none}{choice of mark.} -\TOline{mksize}{4pt}{symbol size (mark).} -\TOline{mkcolor}{black}{symbol color (mark).} -\TOline{mkpos}{0.5}{position of the symbol on the arc.} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Example with \tkzname{mark = x}} -\begin{tkzexample}[latex=6cm,small] - \begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - \tkzMarkAngle[size = 4cm,mark = x, - arc=ll,mkcolor = red](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) - \end{tikzpicture} -\end{tkzexample} -\DeleteShortVerb{\|} -\subsubsection{Example with \tkzname{mark =||}} -\MakeShortVerb{\|} -\begin{tkzexample}[latex=6cm,small] - \begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - \tkzMarkAngle[size = 4cm,mark = ||, - arc=ll,mkcolor = red](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) - \end{tikzpicture} -\end{tkzexample} - -\begin{NewMacroBox}{tkzMarkAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% -With common options, there is a macro for multiple angles. - \end{NewMacroBox} - - -\subsection{Label at an angle} - -\begin{NewMacroBox}{tkzLabelAngle}{\oarg{local options}\parg{A,O,B}}% -There is only one option, dist (with or without unit), which can be replaced by the TikZ's pos option (without unit for the latter). By default, the value is in centimeters. - -\begin{tabular}{lll}% - \toprule -options & default & definition \\ -\midrule -\TOline{pos}{1}{ or dist, controls the distance from the top to the label.} -\bottomrule -\end{tabular} - -\medskip -It is possible to move the label with all TikZ options : rotate, shift, below, etc. -\end{NewMacroBox} - -\subsubsection{Example with \tkzname{pos}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - \tkzMarkAngle[size = 4cm,mark = ||, - arc=ll,color = red](A,O,B)% - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) - \tkzLabelAngle[pos=2,draw,circle, - fill=blue!10](A,O,B){$\alpha$} -\end{tikzpicture} -\end{tkzexample} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[rotate=30] - \tkzDefPoint(2,1){S} - \tkzDefPoint(7,3){T} - \tkzDefPointBy[rotation=center S angle 60](T) - \tkzGetPoint{P} - \tkzDefLine[bisector,normed](T,S,P) - \tkzGetPoint{s} - \tkzDrawPoints(S,T,P) - \tkzDrawPolygon[color=blue](S,T,P) - \tkzDrawLine[dashed,color=blue,add=0 and 3](S,s) - \tkzLabelPoint[above right](P){$P$} - \tkzLabelPoints(S,T) - \tkzMarkAngle[size = 1.8cm,mark = |,arc=ll, - color = blue](T,S,P) - \tkzMarkAngle[size = 2.1cm,mark = |,arc=l, - color = blue](T,S,s) - \tkzMarkAngle[size = 2.3cm,mark = |,arc=l, - color = blue](s,S,P) - \tkzLabelAngle[pos = 1.5](T,S,P){$60^{\circ}$}% - \tkzLabelAngles[pos = 2.7](T,S,s s,S,P){$30^{\circ}$}% -\end{tikzpicture} -\end{tkzexample} - -\begin{NewMacroBox}{tkzLabelAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% -With common options, there is a macro for multiple angles. -\end{NewMacroBox} - -\subsection{Marking a right angle} - -\begin{NewMacroBox}{tkzMarkRightAngle}{\oarg{local options}\parg{A,O,B}}% -The \tkzname{german} option allows you to change the style of the drawing. The option \tkzname{size} allows to change the size of the drawing. - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{german}{normal}{ german arc with inner point.} -\TOline{size}{0.2}{ side size.} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Example of marking a right angle} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P} - \tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H} - \tkzDrawLines[add=.5 and .5](P,H) - \tkzMarkRightAngle[fill=blue!20,size=.5,draw](A,H,P) - \tkzDrawLines[add=.5 and .5](A,B) - \tkzMarkRightAngle[fill=red!20,size=.8](B,H,P) - \tkzDrawPoints[](A,B,P,H) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example of marking a right angle, german style} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P} - \tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H} - \tkzDrawLines[add=.5 and .5](P,H) - \tkzMarkRightAngle[german,size=.5,draw](A,H,P) - \tkzDrawPoints[](A,B,P,H) - \tkzDrawLines[add=.5 and .5,fill=blue!20](A,B) - \tkzMarkRightAngle[german,size=.8](P,H,B) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Mix of styles} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(2,5){C} - \tkzDefPointBy[projection=onto B--A](C) - \tkzGetPoint{H} - \tkzDrawLine(A,B) - \tkzDrawLine[add = .5 and .2,color=red](C,H) - \tkzMarkRightAngle[,size=1,color=red](C,H,A) - \tkzMarkRightAngle[german,size=.8,color=blue](B,H,C) - \tkzFillAngle[opacity=.2,fill=blue!20,size=.8](B,H,C) - \tkzLabelPoints(A,B,C,H) - \tkzDrawPoints(A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Full example} - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[rotate=-90] -\tkzDefPoint(0,1){A} -\tkzDefPoint(2,4){C} -\tkzDefPointWith[orthogonal normed,K=7](C,A) -\tkzGetPoint{B} -\tkzDrawSegment[green!60!black](A,C) -\tkzDrawSegment[green!60!black](C,B) -\tkzDrawSegment[green!60!black](B,A) -\tkzDrawLine[altitude,dashed,color=magenta](B,C,A) -\tkzGetPoint{P} -\tkzLabelPoint[left](A){$A$} -\tkzLabelPoint[right](B){$B$} -\tkzLabelPoint[above](C){$C$} -\tkzLabelPoint[left](P){$P$} -\tkzLabelSegment[auto](B,A){$c$} -\tkzLabelSegment[auto,swap](B,C){$a$} -\tkzLabelSegment[auto,swap](C,A){$b$} -\tkzMarkAngle[size=1cm,color=cyan,mark=|](C,B,A) -\tkzMarkAngle[size=1cm,color=cyan,mark=|](A,C,P) -\tkzMarkAngle[size=0.75cm,color=orange,mark=||](P,C,B) -\tkzMarkAngle[size=0.75cm,color=orange,mark=||](B,A,C) -\tkzMarkRightAngle[german](A,C,B) -\tkzMarkRightAngle[german](B,P,C) -\end{tikzpicture} -\end{tkzexample} - -\subsection{\tkzcname{tkzMarkRightAngles}} -\begin{NewMacroBox}{tkzMarkRightAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% -With common options, there is a macro for multiple angles. -\end{NewMacroBox} - -\section{Angles tools} +%\section{Angles tools} \subsection{Recovering an angle \tkzcname{tkzGetAngle}} \begin{NewMacroBox}{tkzGetAngle}{\parg{name of macro}}% @@ -446,9 +22,8 @@ arguments & example & explication \\ The point here is that $(AB)$ is the bisector of $\widehat{CAD}$, such that the $AD$ slope is zero. We recover the slope of $(AB)$ and then rotate twice. -\begin{tkzexample}[vbox,small] +\begin{tkzexample}[latex=7cm,small] \begin{tikzpicture} - \tkzInit \tkzDefPoint(1,5){A} \tkzDefPoint(5,2){B} \tkzDrawSegment(A,B) \tkzFindSlopeAngle(A,B)\tkzGetAngle{tkzang} @@ -456,7 +31,7 @@ arguments & example & explication \\ \tkzGetPoint{C} \tkzDefPointBy[rotation= center A angle -\tkzang ](B) \tkzGetPoint{D} - \tkzCompass[length=1,dashed,color=red](A,C) + \tkzCompass[length=1](A,C) \tkzCompass[delta=10,brown](B,C) \tkzDrawPoints(A,B,C,D) \tkzLabelPoints(B,C,D) @@ -483,7 +58,7 @@ arguments & example & explication \\ \end{tabular} \medskip -The result is between -180 degrees and +180 degrees. pt2 is the vertex and \tkzcname{tkzGetAngle} can retrieve the angle. +The result is between -180 degrees and +180 degrees. $pt2$ is the vertex and \tkzcname{tkzGetAngle} can retrieve the angle. \end{NewMacroBox} \subsubsection{Verification of angle measurement} @@ -502,104 +77,61 @@ The result is between -180 degrees and +180 degrees. pt2 is the vertex and \tkzc \tkzLabelPoints(A,B) \tkzLabelPoint[right](C){$C$} \tkzLabelAngle(B,A,C){\angleBAC$^\circ$} - \tkzMarkAngle[size=1.5cm](B,A,C) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Example of the use of \tkzcname{tkzFindAngle} } - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture} - \tkzInit[xmin=-1,ymin=-1,xmax=7,ymax=7] - \tkzClip - \tkzDefPoint (0,0){O} \tkzDefPoint (6,0){A} - \tkzDefPoint (5,5){B} \tkzDefPoint (3,4){M} - \tkzFindAngle (A,O,M) \tkzGetAngle{an} - \tkzDefPointBy[rotation=center O angle \an](A) - \tkzGetPoint{C} - \tkzDrawSector[fill = blue!50,opacity=.5](O,A)(C) - \tkzFindAngle(M,B,A) \tkzGetAngle{am} - \tkzDefPointBy[rotation = center O angle \am](A) - \tkzGetPoint{D} - \tkzDrawSector[fill = red!50,opacity = .5](O,A)(D) - \tkzDrawPoints(O,A,B,M,C,D) - \tkzLabelPoints(O,A,B,M,C,D) - \edef\an{\fpeval{round(\an,2)}}\edef\am{\fpeval{round(\am,2)}} - \tkzDrawSegments(M,B B,A) - \tkzText(4,2){$\widehat{AOC}=\widehat{AOM}=\an^{\circ}$} - \tkzText(1,4){$\widehat{AOD}=\widehat{MBA}=\am^{\circ}$} + \tkzMarkAngle[size=1.5](B,A,C) \end{tikzpicture} \end{tkzexample} \subsubsection{Determination of the three angles of a triangle} \begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture}[scale=1.25,rotate=30] - \tkzDefPoints{0.5/1.5/A, 3.5/4/B, 6/2.5/C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints[below](A,C) - \tkzLabelPoints[above](B) - \tkzMarkAngle[size=1cm](B,C,A) - \tkzFindAngle(B,C,A) - \tkzGetAngle{angleBCA} - \edef\angleBCA{\fpeval{round(\angleBCA,2)}} - \tkzLabelAngle[pos = 1](B,C,A){$\angleBCA^{\circ}$} - \tkzMarkAngle[size=1cm](C,A,B) - \tkzFindAngle(C,A,B) - \tkzGetAngle{angleBAC} - \edef\angleBAC{\fpeval{round(\angleBAC,2)}} - \tkzLabelAngle[pos = 1.8](C,A,B){% - $\angleBAC^{\circ}$} - \tkzMarkAngle[size=1cm](A,B,C) - \tkzFindAngle(A,B,C) - \tkzGetAngle{angleABC} - \edef\angleABC{\fpeval{round(\angleABC,2)}} - \tkzLabelAngle[pos = 1](A,B,C){$\angleABC^{\circ}$} - \end{tikzpicture} +\begin{tikzpicture} +\tkzDefPoints{0/0/a,5/3/b,3/6/c} +\tkzDrawPolygon(a,b,c) +\tkzFindAngle(c,b,a) +\tkzGetAngle{angleCBA} +\pgfmathparse{round(1+\angleCBA)} +\let\angleCBA\pgfmathresult +\tkzFindAngle(a,c,b) +\tkzGetAngle{angleACB} +\pgfmathparse{round(\angleACB)} +\let\angleACB\pgfmathresult +\tkzFindAngle(b,a,c) +\tkzGetAngle{angleBAC} +\pgfmathparse{round(\angleBAC)} +\let\angleBAC\pgfmathresult +\tkzMarkAngle(c,b,a) +\tkzLabelAngle[pos=1.4](c,b,a)% + {\tiny $\angleCBA^\circ$} +\tkzMarkAngle(a,c,b) +\tkzLabelAngle[pos=1.4](a,c,b)% + {\tiny $\angleACB^\circ$} +\tkzMarkAngle(b,a,c) +\tkzLabelAngle[pos=1.4](b,a,c)% + {\tiny $\angleBAC^\circ$} +\end{tikzpicture} \end{tkzexample} - \subsection{Determining a slope} -It is a question of determining whether it exists, the slope of a straight line defined by two points. No verification of the existence is made. - -\begin{NewMacroBox}{tkzFindSlope}{\parg{pt1,pt2}\marg{name of macro}}% -The result is stored in a macro. - -\medskip - -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{(pt1,pt2){pt3}} {\tkzcname{tkzFindSlope}(A,B)\{slope\}}{\tkzcname{slope} will give the result of $\frac{y_B-y_A}{x_B-x_A}$} \\ -\bottomrule -\end{tabular} - -\medskip -\tkzHandBomb\ Careful not to have $x_B=x_A$. -\end{NewMacroBox} - +\subsubsection{Angle between two circles} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzInit[xmax=4,ymax=5]\tkzGrid[sub] - \tkzDefPoint(1,2){A} \tkzDefPoint(3,4){B} - \tkzDefPoint(3,2){C} \tkzDefPoint(3,1){D} - \tkzDrawSegments(A,B A,C A,D) - \tkzDrawPoints[color=red](A,B,C,D) - \tkzLabelPoints(A,B,C,D) - \tkzFindSlope(A,B){SAB} \tkzFindSlope(A,C){SAC} - \tkzFindSlope(A,D){SAD} - \pgfkeys{/pgf/number format/.cd,fixed,precision=2} - \tkzText[fill=Gold!50,draw=brown](1,4)% - {The slope of (AB) is : $\pgfmathprintnumber{\SAB}$} - \tkzText[fill=Gold!50,draw=brown](1,3.5)% - {The slope of (AC) is : $\pgfmathprintnumber{\SAC}$} - \tkzText[fill=Gold!50,draw=brown](1,3)% - {The slope of (AD) is : $\pgfmathprintnumber{\SAD}$} +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[scale=.4] +\pgfkeys{/pgf/number format/.cd,fixed,precision=1} +\tkzDefPoints{0/0/A,6/0/B,4/2/C} +\tkzDrawCircles(A,C B,C) +\tkzDefTangent[at=C](A) \tkzGetPoint{a} +\tkzDefPointsBy[symmetry = center C](a){d} +\tkzDefTangent[at=C](B) \tkzGetPoint{b} +\tkzDrawLines[add=1 and 4](a,C C,b) +\tkzDrawSegments(A,C B,C) +\tkzFindAngle(b,C,d)\tkzGetAngle{bcd} +\tkzMarkAngle[size=3,arc=ll,mark=s](b,C,d) +\tkzFillAngle[fill=teal,opacity=.2,size=2](b,C,d) +\tkzLabelAngle[pos=1.25](b,C,d){% + \tiny $\pgfmathprintnumber{\bcd}^\circ$} \end{tikzpicture} \end{tkzexample} + \subsection{Angle formed by a straight line with the horizontal axis \tkzcname{tkzFindSlopeAngle}} Much more interesting than the last one. The result is between -180 degrees and +180 degrees. @@ -618,55 +150,49 @@ arguments & example & explication \\ \medskip \tkzcname{tkzGetAngle} can retrieve the result. If retrieval is not necessary, you can use \tkzcname{tkzAngleResult}. \end{NewMacroBox} - - \subsubsection{Folding} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tkzDefPoint(1,5){A} - \tkzDefPoint(5,2){B} - \tkzDrawSegment(A,B) - \tkzFindSlopeAngle(A,B) - \tkzGetAngle{tkzang} - \tkzDefPointBy[rotation= center A angle \tkzang ](B) - \tkzGetPoint{C} - \tkzDefPointBy[rotation= center A angle -\tkzang ](B) - \tkzGetPoint{D} - \tkzCompass[orange,length=1](A,C) - \tkzCompass[orange,delta=10](B,C) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(B,C,D) - \tkzLabelPoints[above left](A) - \tkzDrawSegments[style=dashed,color=orange](A,C A,D) -\end{tikzpicture} -\end{tkzexample} -\subsubsection{Example of the use of \tkzcname{tkzFindSlopeAngle}} + +\subsubsection{Use of \tkzcname{tkzFindSlopeAngle} and \tkzcname{tkzGetAngle}} Here is another version of the construction of a mediator \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture} \tkzInit - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,2){B} - \tkzDefLine[mediator](A,B) - \tkzGetPoints{I}{J} - \tkzCalcLength[cm](A,B) - \tkzGetLength{dAB} - \tkzFindSlopeAngle(A,B) - \tkzGetAngle{tkzangle} + \tkzDefPoint(0,0){A} \tkzDefPoint(3,2){B} + \tkzDefLine[mediator](A,B) \tkzGetPoints{I}{J} + \tkzCalcLength(A,B) \tkzGetLength{dAB} + \tkzFindSlopeAngle(A,B) \tkzGetAngle{tkzangle} \begin{scope}[rotate=\tkzangle] - \tikzset{arc/.style={color=gray,delta=10}} - \tkzDrawArc[orange,R,arc](B,3/4*\dAB)(120,240) - \tkzDrawArc[orange,R,arc](A,3/4*\dAB)(-45,60) - \tkzDrawLine(I,J) - \tkzDrawSegment(A,B) + \tkzSetUpArc[color=gray,line width=0.2pt,/tkzcompass/delta=10] + \tkzDrawArc[R,arc](B,3/4*\dAB)(120,240) + \tkzDrawArc[R,arc](A,3/4*\dAB)(-45,60) + \tkzDrawLine(I,J) \tkzDrawSegment(A,B) \end{scope} - \tkzDrawPoints(A,B,I,J) - \tkzLabelPoints(A,B) + \tkzDrawPoints(A,B,I,J) \tkzLabelPoints(A,B) \tkzLabelPoints[right](I,J) \end{tikzpicture} \end{tkzexample} - -\endinput +\subsubsection{Another use of \tkzcname{tkzFindSlopeAngle}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1.5] + \tkzDefPoint(1,2){A} \tkzDefPoint(3,4){B} + \tkzDefPoint(3,2){C} \tkzDefPoint(3,1){D} + \tkzDrawSegments(A,B A,C A,D) + \tkzDrawPoints[color=red](A,B,C,D) + \tkzLabelPoints(A,B,C,D) + \tkzFindSlopeAngle(A,B)\tkzGetAngle{SAB} + \tkzFindSlopeAngle(A,C)\tkzGetAngle{SAC} + \tkzFindSlopeAngle(A,D)\tkzGetAngle{SAD} + \pgfkeys{/pgf/number format/.cd,fixed,precision=2} + \tkzText(1,5){The slope of (AB) is : + $\pgfmathprintnumber{\SAB}$} + \tkzText(1,4.5){The slope of (AC) is : + $\pgfmathprintnumber{\SAC}$} + \tkzText(1,4){The slope of (AD) is : + $\pgfmathprintnumber{\SAD}$} +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-arcs.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-arcs.tex deleted file mode 100644 index 9c802352a1..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-arcs.tex +++ /dev/null @@ -1,178 +0,0 @@ -\section{The arcs} -\begin{NewMacroBox}{tkzDrawArc}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% - -This macro traces the arc of center $O$. Depending on the options, the arguments differ. It is a question of determining a starting point and an end point. Either the starting point is given, which is the simplest, or the radius of the arc is given. In the latter case, it is necessary to have two angles. Either the angles can be given directly, or nodes associated with the center can be given to determine them. The angles are in degrees. - -\medskip - -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{towards}{towards}{$O$ is the center and the arc from $A$ to $(OB)$} -\TOline{rotate} {towards}{the arc starts from $A$ and the angle determines its length} -\TOline{R}{towards}{We give the radius and two angles} -\TOline{R with nodes}{towards}{We give the radius and two points} -\TOline{angles}{towards}{We give the radius and two points} -\TOline{delta}{0}{angle added on each side } -\bottomrule -\end{tabular} - -\medskip -Of course, you have to add all the styles of \TIKZ\ for the tracings... - -\medskip - -\begin{tabular}{lll}% -\toprule -options & arguments & example \\ -\midrule -\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzDrawArc[delta=10](O,A)(B)}} -\TOline{rotate} {\parg{pt,pt}\parg{an}}{\tkzcname{tkzDrawArc[rotate,color=red](O,A)(90)}} -\TOline{R}{\parg{pt,$r$}\parg{an,an}}{\tkzcname{tkzDrawArc[R](O,2 cm)(30,90)}} -\TOline{R with nodes}{\parg{pt,$r$}\parg{pt,pt}}{\tkzcname{tkzDrawArc[R with nodes](O,2 cm)(A,B)}} -\TOline{angles}{\parg{pt,pt}\parg{an,an}}{\tkzcname{tkzDrawArc[angles](O,A)(0,90)}} -\end{tabular} -\end{NewMacroBox} - -Here are a few examples: - -\subsection{Option \tkzname{towards}} -It's useless to put \tkzname{towards}. In this first example the arc starts from $A$ and goes to $B$. The arc going from $B$ to $A$ is different. The salient is obtained by going in the direct direction of the trigonometric circle. -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPointBy[rotation= center O angle 90](A) - \tkzGetPoint{B} - \tkzDrawArc[color=blue,<->](O,A)(B) - \tkzDrawArc(O,B)(A) - \tkzDrawLines[add = 0 and .5](O,A O,B) - \tkzDrawPoints(O,A,B) - \tkzLabelPoints[below](O,A,B) -\end{tikzpicture} -\end{tkzexample} - - -\subsection{Option \tkzname{towards}} -In this one, the arc starts from A but stops on the right (OB). - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(1,1){B} - \tkzDrawArc[color=blue,->](O,A)(B) - \tkzDrawArc[color=gray](O,B)(A) - \tkzDrawArc(O,B)(A) - \tkzDrawLines[add = 0 and .5](O,A O,B) - \tkzDrawPoints(O,A,B) - \tkzLabelPoints[below](O,A,B) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Option \tkzname{rotate}} -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-2){A} - \tkzDefPoint(60:2){B} - \tkzDrawLines[add = 0 and .5](O,A O,B) - \tkzDrawArc[rotate,color=red](O,A)(180) - \tkzDrawPoints(O,A,B) - \tkzLabelPoints[below](O,A,B) -\end{tikzpicture} -\end{tkzexample} - - -\subsection{Option \tkzname{R}} -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzDefPoints{0/0/O} - \tikzset{compass style/.append style={<->}} - \tkzDrawArc[R,color=orange,double](O,3cm)(270,360) - \tkzDrawArc[R,color=blue,double](O,2cm)(0,270) - \tkzDrawPoint(O) - \tkzLabelPoint[below](O){$O$} -\end{tikzpicture} -\end{tkzexample} - -\subsection{Option \tkzname{R with nodes}} -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(1,1){B} - \tkzCalcLength(B,A)\tkzGetLength{radius} - \tkzDrawArc[R with nodes](B,\radius pt)(A,O) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Option \tkzname{delta}} -This option allows a bit like \tkzcname{tkzCompass} to place an arc and overflow on either side. delta is a measure in degrees. - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPointBy[rotation= center A angle 60](B) - \tkzGetPoint{C} - \tkzSetUpLine[color=gray] - \tkzDefPointBy[symmetry= center C](A) - \tkzGetPoint{D} - \tkzDrawSegments(A,B A,D) - \tkzDrawLine(B,D) - \tkzSetUpCompass[color=orange] - \tkzDrawArc[orange,delta=10](A,B)(C) - \tkzDrawArc[orange,delta=10](B,C)(A) - \tkzDrawArc[orange,delta=10](C,D)(D) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(A,B,C,D) - \tkzMarkRightAngle(D,B,A) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Option \tkzname{angles}: example 1} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPoint(2.5,0){O} - \tkzDefPointBy[rotation=center O angle 60](B) - \tkzGetPoint{D} - \tkzDefPointBy[symmetry=center D](O) - \tkzGetPoint{E} - \tkzSetUpLine[color=Maroon] - \tkzDrawArc[angles](O,B)(0,180) - \tkzDrawArc[angles,](B,O)(100,180) - \tkzCompass[delta=20](D,E) - \tkzDrawLines(A,B O,E B,E) - \tkzDrawPoints(A,B,O,D,E) - \tkzLabelPoints(A,B,O,D,E) - \tkzMarkRightAngle(O,B,E) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Option \tkzname{angles}: example 2} - - -\begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(5,0){I} - \tkzDefPoint(0,5){J} - \tkzInterCC(O,I)(I,O)\tkzGetPoints{B}{C} - \tkzInterCC(O,I)(J,O)\tkzGetPoints{D}{A} - \tkzInterCC(I,O)(J,O)\tkzGetPoints{L}{K} - \tkzDrawArc[angles](O,I)(0,90) - \tkzDrawArc[angles,color=gray,style=dashed](I,O)(90,180) - \tkzDrawArc[angles,color=gray,style=dashed](J,O)(-90,0) - \tkzDrawPoints(A,B,K) - \foreach \point in {I,A,B,J,K}{\tkzDrawSegment(O,\point)} - \end{tikzpicture} -\end{tkzexample} - - - \endinput - diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-base.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-base.tex deleted file mode 100644 index 6e250bb49a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-base.tex +++ /dev/null @@ -1,61 +0,0 @@ -\section{Summary of tkz-base} - -\subsection{Utility of \tkzname{tkz-base}} - -First of all, you don't have to deal with \TIKZ\ the size of the bounding box. Early versions of \tkzNamePack{tkz-euclide} did not control the size of the bounding box, now the size of the bounding box is limited. - - However, it is sometimes necessary to control the size of what will be displayed. - To do this, you need to have prepared the bounding box you are going to work in, this is the role of \tkzNamePack{tkz-base} and its main macro \tkzNameMacro{tkzInit}. It is recommended to leave the graphic unit equal to 1 cm. For some drawings, it is interesting to fix the extreme values (xmin,xmax,ymin and ymax) and to "clip" the definition rectangle in order to control the size of the figure as well as possible. - -The two macros in \tkzNamePack{tkz-base} that are useful for \tkzNamePack{tkz-euclide} are: -\begin{itemize} - \item \tkzcname{tkzInit} - \item \tkzcname{tkzClip} -\end{itemize} -\vspace{20pt} - -To this, I added macros directly linked to the bounding box. You can now view it, backup it, restore it (see the documentation of \tkzNamePack{tkz-base} section Bounding Box). - -\subsection{\tkzcname{tkzInit} and \tkzcname{tkzShowBB}} -The rectangle around the figure shows you the bounding box. -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture} - \tkzInit[xmin=-1,xmax=3,ymin=-1, ymax=3] - \tkzGrid - \tkzShowBB[red,line width=2pt] -\end{tikzpicture} -\end{tkzexample} - -\subsection{\tkzcname{tkzClip}} -The role of this macro is to "clip" the initial rectangle so that only the paths contained in this rectangle are drawn. - -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture} - \tkzInit[xmax=4, ymax=3] - \tkzAxeXY - \tkzGrid - \tkzClip - \draw[red] (-1,-1)--(5,2); -\end{tikzpicture} -\end{tkzexample} - -It is possible to add a bit of space -\begin{tkzltxexample}[] - \tkzClip[space=1] -\end{tkzltxexample} - -\subsection{\tkzcname{tkzClip} and the option \tkzname{space}} -This option allows you to add some space around the "clipped" rectangle. -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture} - \tkzInit[xmax=4, ymax=3] - \tkzAxeXY - \tkzGrid - \tkzClip[space=1] - \draw[red] (-1,-1)--(5,2); -\end{tikzpicture} -\end{tkzexample} -The dimensions of the "clipped" rectangle are \tkzname{xmin-1}, \tkzname{ymin-1}, \tkzname{xmax+1} and \tkzname{ymax+1}. - - -\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circleby.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circleby.tex new file mode 100644 index 0000000000..fac856d457 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circleby.tex @@ -0,0 +1,204 @@ +\section{Definition of circle by transformation; \tkzcname{tkzDefCircleBy} } +These transformations are: + +\begin{itemize} + \item translation; + \item homothety; + \item orthogonal reflection or symmetry; + \item central symmetry; + \item orthogonal projection; + \item rotation (degrees); + \item orthogonal from ; + \item orthogonal through; + \item inversion. +\end{itemize} + +The choice of transformations is made through the options. The macro is \tkzcname{tkzDefCircleBy} and the other for the transformation of a list of points \tkzcname{tkzDefCirclesBy}. For example, we'll write: +\begin{tkzltxexample}[] +\tkzDefCircleBy[translation= from A to A'](O,M) +\end{tkzltxexample} +$O$ is the center and $M$ is a point on the circle. +The image is a circle. The new center is |tkzFirstPointResult| and |tkzSecondPointResult| is a point on the new circle. You can get the results with the macro \tkzcname{tkzGetPoints} . +\medskip +\begin{NewMacroBox}{tkzDefCircleBy}{\oarg{local options}\parg{pt1,pt2}}% +The argument is a couple of points. The results is a couple of points. If you want to keep these points then the macro \tkzcname{tkzGetPoints\{O'\}\{M'\}} allows you to assign the name \tkzname{O'} to the center and \tkzname{M'} to the point on the circle. + +\begin{tabular}{lll}% +\toprule +arguments & definition & examples \\ +\midrule +\TAline{pt1,pt2} {existing points} {$(O,M)$} +\bottomrule +\end{tabular} + +\begin{tabular}{lll}% +options & & examples \\ +\midrule +\TOline{translation}{= from \#1 to \#2}{[translation=from A to B](O,M)} +\TOline{homothety} {= center \#1 ratio \#2}{[homothety=center A ratio .5](O,M)} +\TOline{reflection} {= over \#1--\#2}{[reflection=over A--B](O,M)} +\TOline{symmetry } {= center \#1}{[symmetry=center A](O,M)} +\TOline{projection }{= onto \#1--\#2}{[projection=onto A--B](O,M)} +\TOline{rotation } {= center \#1 angle \#2}{[rotation=center O angle 30](O,M)} +\TOline{orthogonal from} {= \#1}{[orthogonal from = A ](O,M)} +\TOline{orthogonal through}{= \#1 and \#2}{[orthogonal through = A and B](O,M)} +\TOline{inversion}{= center \#1 through \#2}{[inversion =center O through A](O,M)} +% \TOline{inversion negative}{= center \#1 through \#2}{[inversion negative =center O through A](O,M)} +\bottomrule +\end{tabular} + +The image is only defined and not drawn. +\end{NewMacroBox} + +\subsection{Examples of transformations} + +\subsubsection{\tkzname{Translation}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[>=latex] + \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B} + \tkzDefPoint(3,2){C} \tkzDefPoint(4,3){D} + \tkzDefCircleBy[translation= from B to A](C,D) + \tkzGetPoints{C'}{D'} + \tkzDrawPoints[teal](A,B,C,D,C',D') + \tkzLabelPoints[color=teal](A,B,C,D,C',D') + \tkzDrawSegments[orange,->](A,B) + \tkzDrawCircles(C,D C',D') +\end{tikzpicture} +\end{tkzexample} + + \subsubsection{\tkzname{Reflection} (orthogonal symmetry)} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[>=latex] + \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B} + \tkzDefPoint(3,2){C} \tkzDefPoint(4,3){D} + \tkzDefCircleBy[reflection = over A--B](C,D) + \tkzGetPoints{C'}{D'} + \tkzDrawPoints[teal](A,B,C,D,C',D') + \tkzLabelPoints[color=teal](A,B,C,D,C',D') + \tkzDrawLine[add =0 and 1][orange](A,B) + \tkzDrawCircles(C,D C',D') +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{\tkzname{Homothety}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1.2] + \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B} + \tkzDefPoint(3,2){C} \tkzDefPoint(4,3){D} + \tkzDefCircleBy[homothety=center A ratio .5](C,D) + \tkzGetPoints{C'}{D'} + \tkzDrawPoints[teal](A,C,D,C',D') + \tkzLabelPoints[color=teal](A,C,D,C',D') + \tkzDrawCircles(C,D C',D') +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{\tkzname{Symmetry}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1] + \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B} + \tkzDefPoint(3,2){C} \tkzDefPoint(4,3){D} + \tkzDefCircleBy[symmetry=center B](C,D) + \tkzGetPoints{C'}{D'} + \tkzDrawPoints[teal](B,C,D,C',D') + \tkzLabelPoints[color=teal](B,C,D,C',D') + \tkzDrawLines[orange](C,C' D,D') + \tkzDrawCircles(C,D C',D') +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzname{Rotation}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=0.5] + \tkzDefPoint(0,0){A} \tkzDefPoint(3,-1){B} + \tkzDefPoint(3,2){C} \tkzDefPoint(4,3){D} + \tkzDefCircleBy[rotation=center B angle 60](C,D) + \tkzGetPoints{C'}{D'} + \tkzDrawPoints[teal](B,C,D,C',D') + \tkzLabelPoints[color=teal](B,C,D,C',D') + \tkzDrawCircles(C,D C',D') +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{\tkzname{Orthogonal from}} +Orthogonal circle of given center. \tkzcname{tkzGetPoints{z1}{z2}} gives two points of the circle. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/O,1/0/A} + \tkzDefPoints{1.5/1.25/B,-2/-3/C} + \tkzDefCircleBy[orthogonal from=B](O,A) + \tkzGetPoints{z1}{z2} + \tkzDefCircleBy[orthogonal from=C](O,A) + \tkzGetPoints{t1}{t2} + \tkzDrawCircle(O,A) + \tkzDrawCircles[new](B,z1 C,t1) + \tkzDrawPoints(t1,t2,C) + \tkzDrawPoints(z1,z2,O,A,B) + \tkzLabelPoints(O,A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzname{Orthogonal from} : Right angle between circles} +We are looking for a circle orthogonal to the given circle. + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] +\tkzDefPoints{0/0/A,6/0/B,4/2/D} +\tkzDefCircleBy[orthogonal from=B](A,D) +\tkzGetFirstPoint{C} +\tkzDrawCircles(A,C B,C) +\tkzDefTangent[at=C](A) \tkzGetPoint{a} +\tkzDefPointsBy[symmetry = center C](a){d} +\tkzDefTangent[at=C](B) \tkzGetPoint{b} +\tkzDrawLines[add=1 and 4](a,C C,b) +\tkzDrawSegments(A,C B,C) +\tkzMarkAngle[size=2.5](b,C,d) +\tkzFillAngle[fill=teal,opacity=.2,size=3](b,C,d) +\end{tikzpicture} +\end{tkzexample} + + \subsubsection{\tkzname{Orthogonal through}} +Orthogonal circle passing through two given points. +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=1] + \tkzDefPoint(0,0){O} + \tkzDefPoint(1,0){A} + \tkzDrawCircle(O,A) + \tkzDefPoint(-1.5,-1.5){z1} + \tkzDefPoint(1.5,-1.25){z2} + \tkzDefCircleBy[orthogonal through=z1 and z2](O,A) + \tkzGetPoint{c} + \tkzDrawCircle[new](tkzPointResult,z1) + \tkzDrawPoints[new](O,A,z1,z2,c) + \tkzLabelPoints(O,A,z1,z2,c) +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{\tkzname{Inversion}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1.5] +\tkzSetUpPoint[size=4,color=red,fill=red!20] +\tkzSetUpStyle[color=purple,ultra thin]{st1} +\tkzSetUpStyle[color=cyan,ultra thin]{st2} +\tkzDefPoint(2,0){A} \tkzDefPoint(3,0){B} +\tkzDefPoint(3,2){C} \tkzDefPoint(4,2){D} +\tkzDefCircleBy[inversion = center B through A](C,D) +\tkzGetPoints{C'}{D'} +\tkzDrawPoints(A,B,C,D,C',D') +\tkzLabelPoints(A,B,C,D,C',D') +\tkzDrawCircles(B,A) +\tkzDrawCircles[st1](C,D) +\tkzDrawCircles[st2](C',D') +\end{tikzpicture} +\end{tkzexample} + + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circles.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circles.tex index 7b58f6dffd..f0cdae595e 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circles.tex @@ -20,7 +20,7 @@ Among the following macros, one will allow you to draw a circle, which is not a This macro allows you to retrieve the characteristics (center and radius) of certain circles. \begin{NewMacroBox}{tkzDefCircle}{\oarg{local options}\parg{A,B} or \parg{A,B,C}}% -\tkzHandBomb\ Attention the arguments are lists of two or three points. This macro is either used in partnership with \tkzcname{tkzGetPoint} and/or \tkzcname{tkzGetLength} to obtain the center and the radius of the circle, or by using \tkzname{tkzPointResult} and \tkzname{tkzLengthResult} if it is not necessary to keep the results. +\tkzHandBomb\ Attention the arguments are lists of two or three points. This macro is either used in partnership with \\ \tkzcname{tkzGetPoint} and/or \tkzcname{tkzGetLength} to obtain the center and the radius of the circle, or by using \\ \tkzname{tkzPointResult} and \tkzname{tkzLengthResult} if it is not necessary to keep the results. \medskip \begin{tabular}{lll}% @@ -44,8 +44,6 @@ options & default & definition \\ \TOline{euler or nine}{through}{Euler's Circle} \TOline{spieker} {through}{Spieker Circle} \TOline{apollonius} {through}{circle of Apollonius} -\TOline{orthogonal} {through}{circle of given centre orthogonal to another circle} -\TOline{orthogonal through}{through}{circle orthogonal circle passing through 2 points} \TOline{K} {1}{coefficient used for a circle of Apollonius} \bottomrule \end{tabular} @@ -56,24 +54,24 @@ options & default & definition \\ \subsubsection{Example with a random point and option \tkzname{through}} \begin{tkzexample}[latex=7 cm,small] - \begin{tikzpicture}[scale=1] - \tkzDefPoint(0,4){A} - \tkzDefPoint(2,2){B} - \tkzDefMidPoint(A,B) \tkzGetPoint{I} - \tkzDefRandPointOn[segment = I--B] +\begin{tikzpicture}[scale=1] + \tkzDefPoint(0,4){A} + \tkzDefPoint(2,2){B} + \tkzDefMidPoint(A,B) \tkzGetPoint{I} + \tkzDefRandPointOn[segment = I--B] \tkzGetPoint{C} - \tkzDefCircle[through](A,C) - \tkzGetLength{rACpt} - \tkzpttocm(\rACpt){rACcm} - \tkzDrawCircle(A,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B,C) - \tkzLabelCircle[draw,fill=orange, - text width=3cm,text centered, - font=\scriptsize](A,C)(-90)% - {The radius measurement is: - \rACpt pt i.e. \rACcm cm} - \end{tikzpicture} + \tkzDefCircle[through](A,C) + \tkzGetLength{rACcm} + \tkzcmtopt(\rACcm){rACpt} + \tkzDrawCircle(A,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B,C) + \tkzLabelCircle[draw, + text width=3cm,text centered, + font=\scriptsize,below=1cm](A,C)(-90)% + {The radius measurement is: + \rACcm cm i.e. \rACpt pt} +\end{tikzpicture} \end{tkzexample} \subsubsection{Example with option \tkzname{diameter}} @@ -84,32 +82,28 @@ options & default & definition \\ \tkzDefPoint(2,2){B} \tkzDefCircle[diameter](A,B) \tkzGetPoint{O} - \tkzDrawCircle[blue,fill=blue!20](O,B) + \tkzDrawCircle(O,B) \tkzDrawSegment(A,B) \tkzDrawPoints(A,B,O) \tkzLabelPoints(A,B,O) \end{tikzpicture} \end{tkzexample} - \subsubsection{Circles inscribed and circumscribed for a given triangle} - You can also obtain the center of the inscribed circle and its projection on one side of the triangle with \tkzcname{tkzGetFirstPoint{I}} and \tkzcname{tkzGetSecondPoint{Ib}}. - + \subsubsection{Circles inscribed and circumscribed for a given triangle} \begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoint(2,2){A} - \tkzDefPoint(5,-2){B} - \tkzDefPoint(1,-2){C} - \tkzDefCircle[in](A,B,C) - \tkzGetPoint{I} \tkzGetLength{rIN} - \tkzDefCircle[circum](A,B,C) - \tkzGetPoint{K} \tkzGetLength{rCI} - \tkzDrawPoints(A,B,C,I,K) - \tkzDrawCircle[R,blue](I,\rIN pt) - \tkzDrawCircle[R,red](K,\rCI pt) - \tkzLabelPoints[below](B,C) - \tkzLabelPoints[above left](A,I,K) - \tkzDrawPolygon(A,B,C) +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(2,2){A} \tkzDefPoint(5,-2){B} + \tkzDefPoint(1,-2){C} + \tkzDefCircle[in](A,B,C) + \tkzGetPoint{I} \tkzGetLength{rIN} + \tkzDefCircle[circum](A,B,C) + \tkzGetPoint{K} \tkzGetLength{rCI} + \tkzDrawCircles[R,new](I,{\rIN} K,{\rCI}) + \tkzLabelPoints[below](B,C) + \tkzLabelPoints[above left](A,I,K) + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C,I,K) \end{tikzpicture} \end{tkzexample} @@ -118,36 +112,38 @@ We want to define an excircle of a triangle relatively to point $C$ \begin{tkzexample}[latex=8cm,small] \begin{tikzpicture}[scale=.75] - \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C} - \tkzDefCircle[ex](B,C,A) + \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C} + \tkzDefCircle[ex](B,C,A) \tkzGetPoint{J_c} \tkzGetLength{rc} - \tkzDefPointBy[projection=onto A--C ](J_c) + \tkzDefPointBy[projection=onto A--C ](J_c) \tkzGetPoint{X_c} - \tkzDefPointBy[projection=onto A--B ](J_c) - \tkzGetPoint{Y_c} - \tkzGetPoint{I} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawCircle[R,color=lightgray](J_c,\rc pt) + \tkzDefPointBy[projection=onto A--B ](J_c) + \tkzGetPoint{Y_c} + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle[R,color=lightgray](J_c,\rc) % possible \tkzDrawCircle[ex](A,B,C) - \tkzDrawCircle[in,color=red](A,B,C) \tkzGetPoint{I} - \tkzDefPointBy[projection=onto A--C ](I) + \tkzDrawCircle[in,new](A,B,C) + \tkzGetPoint{I} + \tkzDefPointBy[projection=onto A--C ](I) \tkzGetPoint{F} - \tkzDefPointBy[projection=onto A--B ](I) + \tkzDefPointBy[projection=onto A--B ](I) \tkzGetPoint{D} - \tkzDrawLines[add=0 and 2.2,dashed](C,A C,B) - \tkzDrawSegments[dashed](J_c,X_c I,D I,F J_c,Y_c) - \tkzMarkRightAngles(A,F,I B,D,I J_c,X_c,A J_c,Y_c,B) - \tkzDrawPoints(B,C,A,I,D,F,X_c,J_c,Y_c) - \tkzLabelPoints(B,A,J_c,I,D,X_c,Y_c) - \tkzLabelPoints[above left](C) - \tkzLabelPoints[left](F) + \tkzDrawLines[add=0 and 2.2,dashed](C,A C,B) + \tkzDrawSegments[dashed](J_c,X_c I,D I,F% + J_c,Y_c) + \tkzMarkRightAngles(A,F,I B,D,I J_c,X_c,A% + J_c,Y_c,B) + \tkzDrawPoints(B,C,A,I,D,F,X_c,J_c,Y_c) + \tkzLabelPoints(B,A,J_c,I,D,X_c,Y_c) + \tkzLabelPoints[above left](C) + \tkzLabelPoints[left](F) \end{tikzpicture} \end{tkzexample} \subsubsection{Euler's circle for a given triangle with option \tkzname{euler}} We verify that this circle passes through the middle of each side. -\begin{tkzexample}[latex=8cm,small] +\begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=.75] \tkzDefPoint(5,3.5){A} \tkzDefPoint(0,0){B} \tkzDefPoint(7,0){C} @@ -155,7 +151,7 @@ We verify that this circle passes through the middle of each side. \tkzGetPoint{E} \tkzGetLength{rEuler} \tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c} \tkzDrawPoints(A,B,C,E,M_a,M_b,M_c) - \tkzDrawCircle[R,blue](E,\rEuler pt) + \tkzDrawCircle[R](E,\rEuler) \tkzDrawPolygon(A,B,C) \tkzLabelPoints[below](B,C) \tkzLabelPoints[left](A,E) @@ -171,12 +167,12 @@ We verify that this circle passes through the middle of each side. \tkzDefCircle[apollonius,K=2](A,B) \tkzGetPoint{K1} \tkzGetLength{rAp} - \tkzDrawCircle[R,color = blue!50!black, - fill=blue!20,opacity=.4](K1,\rAp pt) + \tkzDrawCircle[R,color = teal!50!black, + fill=teal!20,opacity=.4](K1,\rAp) \tkzDefCircle[apollonius,K=3](A,B) \tkzGetPoint{K2} \tkzGetLength{rAp} - \tkzDrawCircle[R,color=red!50!black, - fill=red!20,opacity=.4](K2,\rAp pt) + \tkzDrawCircle[R,color=orange!50, + fill=orange!20,opacity=.4](K2,\rAp) \tkzLabelPoints[below](A,B,K1,K2) \tkzDrawPoints(A,B,K1,K2) \tkzDrawLine[add=.2 and 1](A,B) @@ -205,10 +201,11 @@ We verify that this circle passes through the middle of each side. \tkzDrawPoints(I,J,K) \tkzDrawPolygon(A,B,C) \tkzDrawPolygon[dashed](I,J,K) - \tkzDrawCircle[R,blue!50!black](O,\rO) + \tkzDrawCircle[R,teal](O,\rO) \tkzDrawSegments[dashed](A,K B,J C,I) \tkzDrawPoints(A,B,C) - \tkzDrawCircles[R](J,{\rJ} I,{\rI} K,{\rK}) + \tkzDrawCircles[R,new](J,{\rJ} I,{\rI}% + K,{\rK}) \tkzLabelPoints(A,B,C,I,J,K) \end{tikzpicture} \end{tkzexample} @@ -216,366 +213,119 @@ We verify that this circle passes through the middle of each side. \subsubsection{Spieker circle with option \tkzname{spieker}} The incircle of the medial triangle $M_aM_bM_c$ is the Spieker circle: -\begin{tkzexample}[latex=8cm, small] + +\begin{tkzexample}[latex=6cm, small] \begin{tikzpicture}[scale=1] \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C} \tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c} \tkzDefTriangleCenter[spieker](A,B,C) \tkzGetPoint{S_p} - \tkzDrawPolygon[blue](A,B,C) - \tkzDrawPolygon[red](M_a,M_b,M_c) - \tkzDrawPoints[blue](B,C,A) - \tkzDrawPoints[red](M_a,M_b,M_c,S_p) - \tkzDrawCircle[in,red](M_a,M_b,M_c) + \tkzDrawPolygon(A,B,C) + \tkzDrawPolygon[cyan](M_a,M_b,M_c) + \tkzDrawPoints(B,C,A) + \tkzDrawPoints[new](M_a,M_b,M_c,S_p) + \tkzDrawCircle[in,new](M_a,M_b,M_c) \tkzAutoLabelPoints[center=S_p,dist=.3](M_a,M_b,M_c) - \tkzLabelPoints[blue,right](S_p) + \tkzLabelPoints[right](S_p) \tkzAutoLabelPoints[center=S_p](A,B,C) \end{tikzpicture} \end{tkzexample} - - \subsubsection{Orthogonal circle passing through two given points, option \tkzname{orthogonal through}} - -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){A} - \tkzDrawCircle(O,A) - \tkzDefPoint(-1.5,-1.5){z1} - \tkzDefPoint(1.5,-1.25){z2} - \tkzDefCircle[orthogonal through=z1 and z2](O,A) - \tkzGetPoint{c} - \tkzDrawCircle[thick,color=red](tkzPointResult,z1) - \tkzDrawPoints[fill=red,color=black, - size=4](O,A,z1,z2,c) - \tkzLabelPoints(O,A,z1,z2,c) + \subsubsection{Examples from js bibra tex.stackexchange.com} + +\begin{tikzpicture}[scale=0.4] +\tkzDefPoint(6,4){A} +\tkzDefPoint(6,-4){B} +\tkzDefMidPoint(B,A)\tkzGetPoint{P} +\tkzDefLine[orthogonal =through P](A,B)\tkzGetPoint{X} +\tkzDefCircle[through](X,P) +\tkzCalcLength(X,P)\tkzGetLength{rXP} +\tkzDefShiftPoint[X](180:\rXP*2){y} +\tkzDefPointWith[linear,K=0.3](y,P) \tkzGetPoint{x} +\tkzDrawPoints(X,x) +\tkzDrawCircles(x,P X,P) +\tkzLabelLine[pos=0.5,above](x,P){r1} +\tkzDefShiftPoint[X](-60:\rXP){X'} +\tkzDrawSegments[<->, >=triangle 45](X,X' P,x) +\tkzLabelLine[pos=0.5,above, sloped](X,X'){r} +\tkzLabelPoints[above](x) +\tkzLabelPoints[above](X) \end{tikzpicture} -\end{tkzexample} -\subsubsection{Orthogonal circle of given center} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,1/0/A} - \tkzDefPoints{1.5/1.25/B,-2/-3/C} - \tkzDefCircle[orthogonal from=B](O,A) - \tkzGetPoints{z1}{z2} - \tkzDefCircle[orthogonal from=C](O,A) - \tkzGetPoints{t1}{t2} - \tkzDrawCircle(O,A) - \tkzDrawCircle[thick,color=red](B,z1) - \tkzDrawCircle[thick,color=red](C,t1) - \tkzDrawPoints(t1,t2,C) - \tkzDrawPoints(z1,z2,O,A,B) - \tkzLabelPoints(O,A,B,C) +\begin{tkzexample}[code only, small] +\begin{tikzpicture}[scale=0.4] +\tkzDefPoint(6,4){A} +\tkzDefPoint(6,-4){B} +\tkzDefMidPoint(B,A)\tkzGetPoint{P} +\tkzDefLine[orthogonal =through P](A,B) +\tkzGetPoint{X} +\tkzDefCircle[through](X,P) +\tkzCalcLength(X,P)\tkzGetLength{rXP} +\tkzDefShiftPoint[X](180:\rXP*2){y} +\tkzDefPointWith[linear,K=0.3](y,P) + \tkzGetPoint{x} +\tkzDrawPoints(X,x) +\tkzDrawCircles(x,P X,P) +\tkzLabelLine[pos=0.5,above](x,P){r1} +\tkzDefShiftPoint[X](-60:\rXP){X'} +\tkzDrawSegments[<->, >=triangle 45](X,X' P,x) +\tkzLabelLine[pos=0.5,above, sloped](X,X'){r} +\tkzLabelPoints[above](x) +\tkzLabelPoints[above](X) \end{tikzpicture} \end{tkzexample} -%<----------------------------------------------------------------------------> - -\section{Draw, Label the Circles} -\begin{itemize} - \item I created a first macro \tkzcname{tkzDrawCircle}, - - \item then a macro that allows you to color a disc, but without drawing the circle. \tkzcname{tkzFillCircle}, - - \item sometimes, it is necessary for a drawing to be contained in a disc,this is the role assigned to \tkzcname{tkzClipCircle}, - - - \item It finally remains to be able to give a label to designate a circle and if several possibilities are offered, we will see here \tkzcname{tkzLabelCircle}. -\end{itemize} - -\subsection{Draw a circle} -\begin{NewMacroBox}{tkzDrawCircle}{\oarg{local options}\parg{A,B}}% -\tkzHandBomb\ Attention you need only two points to define a radius or a diameter. An additional option \tkzname{R} is available to give a measure directly. - -\medskip -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2}}{\parg{A,B}} {two points to define a radius or a diameter} -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{through}{through}{circle with two points defining a radius} -\TOline{diameter}{through}{circle with two points defining a diameter} -\TOline{R} {through}{circle characterized by a point and the measurement of a radius} - \bottomrule -\end{tabular} - -\medskip -Of course, you have to add all the styles of \TIKZ\ for the tracings... -\end{NewMacroBox} - - \subsubsection{Circles and styles, draw a circle and color the disc} - We'll see that it's possible to colour in a disc while tracing the circle. - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(3,0){A} - % circle with centre O and passing through A - \tkzDrawCircle[color=blue](O,A) - % diameter circle $[OA]$ - \tkzDrawCircle[diameter,color=red,% - line width=2pt,fill=red!40,% - opacity=.5](O,A) - % circle with centre O and radius = exp(1) cm - \edef\rayon{\fpeval{0.25*exp(1)}} - \tkzDrawCircle[R,color=orange](O,\rayon cm) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Drawing circles} -\begin{NewMacroBox}{tkzDrawCircles}{\oarg{local options}\parg{A,B C,D}}% -\tkzHandBomb\ Attention, the arguments are lists of two points. The circles that can be drawn are the same as in the previous macro. An additional option \tkzname{R} is available to give a measure directly. - -\medskip -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2 pt3,pt4 ...}}{\parg{A,B C,D}} {List of two points} -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{through}{through}{circle with two points defining a radius} -\TOline{diameter}{through}{circle with two points defining a diameter} -\TOline{R} {through}{circle characterized by a point and the measurement of a radius} - \bottomrule -\end{tabular} - -\medskip -Of course, you have to add all the styles of \TIKZ\ for the tracings... -\end{NewMacroBox} - - \subsubsection{Circles defined by a triangle.} - -\begin{tkzexample}[latex=9cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,0){B} - \tkzDefPoint(3,2){C} - \tkzDrawPolygon(A,B,C) - \tkzDrawCircles(A,B B,C C,A) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B,C) -\end{tikzpicture} -\end{tkzexample} - - \subsubsection{Concentric circles.} - -\begin{tkzexample}[latex=7cm,small] \begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDrawCircles[R](A,1cm A,2cm A,3cm) - \tkzDrawPoint(A) - \tkzLabelPoints(A) -\end{tikzpicture} -\end{tkzexample} - - \subsubsection{Exinscribed circles.} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1] -\tkzDefPoints{0/0/A,4/0/B,1/2.5/C} -\tkzDrawPolygon(A,B,C) -\tkzDefCircle[ex](B,C,A) -\tkzGetPoint{J_c} \tkzGetSecondPoint{T_c} -\tkzGetLength{rJc} -\tkzDrawCircle[R](J_c,{\rJc pt}) -\tkzDrawLines[add=0 and 1](C,A C,B) -\tkzDrawSegment(J_c,T_c) -\tkzMarkRightAngle(J_c,T_c,B) -\tkzDrawPoints(A,B,C,J_c,T_c) + \tkzDefPoint(0,4){A} + \tkzDefPoint(2,2){B} + \tkzDefMidPoint(B,A)\tkzGetPoint{P} + \tkzDefLine[orthogonal =through P](B,A) + \tkzGetPoint{X} + \tkzDefCircle[through](X,P) + \tkzGetLength{rXPpt} + \tkzpttocm(\rXPpt){rXPcm} + \tkzDefPointWith[linear,K=0.3](X,P) + \tkzGetPoint{x} + \tkzDefCircle[through](x,P) + \tkzGetLength{rxPpt} + \tkzpttocm(\rxPpt){rxPcm} + \tkzDrawCircles(X,P x,P) + \tkzDrawPoints(X,x) + \tkzDrawSegment[<->, >=triangle 45](x,P) + \tkzDrawSegment(P,X) + \tkzLabelPoints(X,x) + \tkzLabelLine[pos=0.5,left](x,P){r} + \tkzCalcLength[cm](X,P)\tkzGetLength{rXP} + \tkzDefShiftPoint[X](-90:\rXP){y} + \tkzDrawSegments[<->, >=triangle 45](X,y) + \tkzLabelLine[pos=0.5,left](X,y){R} \end{tikzpicture} -\end{tkzexample} - -\subsubsection{Cardioid} -Based on an idea by O. Reboux made with pst-eucl (Pstricks module) by D. Rodriguez. - - Its name comes from the Greek \textit{kardia (heart)}, in reference to its shape, and was given to it by Johan Castillon (Wikipedia). - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,0){A} - \foreach \ang in {5,10,...,360}{% - \tkzDefPoint(\ang:2){M} - \tkzDrawCircle(M,A) - } -\end{tikzpicture} -\end{tkzexample} - -\subsection{Draw a semicircle} -\begin{NewMacroBox}{tkzDrawSemiCircle}{\oarg{local options}\parg{A,B}}% - -\medskip -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2}}{\parg{O,A} or\parg{A,B}} {radius or diameter} -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{through} {through}{circle characterized by two points defining a radius} -\TOline{diameter} {through}{circle characterized by two points defining a diameter} -\end{tabular} -\end{NewMacroBox} -\subsubsection{Use of \tkzcname{tkzDrawSemiCircle}} - -\begin{tkzexample}[latex=6cm,small] - \begin{tikzpicture} - \tkzDefPoint(0,0){A} \tkzDefPoint(6,0){B} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzDrawPolygon(B,C,D,A) - \tkzDefPoint(3,6){F} - \tkzDefTriangle[equilateral](C,D) \tkzGetPoint{I} - \tkzDefPointBy[projection=onto B--C](I) \tkzGetPoint{J} - \tkzInterLL(D,B)(I,J) \tkzGetPoint{K} - \tkzDefPointBy[symmetry=center K](B) \tkzGetPoint{M} - \tkzDrawCircle(M,I) - \tkzCalcLength(M,I) \tkzGetLength{dMI} - \tkzFillPolygon[color = red!50](A,B,C,D) - \tkzFillCircle[R,color = yellow](M,\dMI pt) - \tkzDrawSemiCircle[fill = blue!50!black](F,D)% - \end{tikzpicture} -\end{tkzexample} - - -\subsection{Colouring a disc} -This was possible with the previous macro, but disk tracing was mandatory, this is no longer the case. - -\begin{NewMacroBox}{tkzFillCircle}{\oarg{local options}\parg{A,B}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{radius} {radius}{two points define a radius} -\TOline{R} {radius}{a point and the measurement of a radius } -\bottomrule -\end{tabular} - -\medskip -You don't need to put \tkzname{radius} because that's the default option. Of course, you have to add all the styles of \TIKZ\ for the plots. -\end{NewMacroBox} - - \subsubsection{Example from a sangaku} - -\begin{tkzexample}[latex=7cm,small] +\begin{tkzexample}[code only, small] \begin{tikzpicture} - \tkzInit[xmin=0,xmax = 6,ymin=0,ymax=6] - \tkzDefPoint(0,0){B} \tkzDefPoint(6,0){C}% - \tkzDefSquare(B,C) \tkzGetPoints{D}{A} - \tkzClipPolygon(B,C,D,A) - \tkzDefMidPoint(A,D) \tkzGetPoint{F} - \tkzDefMidPoint(B,C) \tkzGetPoint{E} - \tkzDefMidPoint(B,D) \tkzGetPoint{Q} - \tkzDefTangent[from = B](F,A) \tkzGetPoints{G}{H} - \tkzInterLL(F,G)(C,D) \tkzGetPoint{J} - \tkzInterLL(A,J)(F,E) \tkzGetPoint{K} - \tkzDefPointBy[projection=onto B--A](K) - \tkzGetPoint{M} - \tkzFillPolygon[color = green](A,B,C,D) - \tkzFillCircle[color = orange](B,A) - \tkzFillCircle[color = blue!50!black](M,A) - \tkzFillCircle[color = purple](E,B) - \tkzFillCircle[color = yellow](K,Q) + \tkzDefPoint(0,4){A} + \tkzDefPoint(2,2){B} + \tkzDefMidPoint(B,A)\tkzGetPoint{P} + \tkzDefLine[orthogonal =through P](B,A) + \tkzGetPoint{X} + \tkzDefCircle[through](X,P) + \tkzGetLength{rXPpt} + \tkzpttocm(\rXPpt){rXPcm} + \tkzDefPointWith[linear,K=0.3](X,P) + \tkzGetPoint{x} + \tkzDefCircle[through](x,P) + \tkzGetLength{rxPpt} + \tkzpttocm(\rxPpt){rxPcm} + \tkzDrawCircles(X,P x,P) + \tkzDrawPoints(X,x) + \tkzDrawSegment[<->, >=triangle 45](x,P) + \tkzDrawSegment(P,X) + \tkzLabelPoints(X,x) + \tkzLabelLine[pos=0.5,left](x,P){r} + \tkzCalcLength[cm](X,P)\tkzGetLength{rXP} + \tkzDefShiftPoint[X](-90:\rXP){y} + \tkzDrawSegments[<->, >=triangle 45](X,y) + \tkzLabelLine[pos=0.5,left](X,y){R} \end{tikzpicture} -\end{tkzexample} - -\subsection{Clipping a disc} - -\begin{NewMacroBox}{tkzClipCircle}{\oarg{local options}\parg{A,B} or \parg{A,r}}% -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{A,B} or \parg{A,r}}{\parg{A,B} or \parg{A,2cm}} {AB radius or diameter } -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{radius} {radius}{circle characterized by two points defining a radius} -\TOline{R} {radius}{circle characterized by a point and the measurement of a radius } -\bottomrule -\end{tabular} - -\medskip -It is not necessary to put \tkzname{radius} because that is the default option. -\end{NewMacroBox} - - \subsubsection{Example} -\begin{tkzexample}[latex=6cm,small] - \begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] - \tkzGrid \tkzClip - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,2){O} - \tkzDefPoint(4,4){B} - \tkzDefPoint(6,6){C} - \tkzDrawPoints(O,A,B,C) - \tkzLabelPoints(O,A,B,C) - \tkzDrawCircle(O,A) - \tkzClipCircle(O,A) - \tkzDrawLine(A,C) - \tkzDrawCircle[fill=red!20,opacity=.5](C,O) -\end{tikzpicture} \end{tkzexample} - - -\subsection{Giving a label to a circle} -\begin{NewMacroBox}{tkzLabelCircle}{\oarg{local options}\parg{A,B}\parg{angle}\marg{label}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{radius} {radius}{circle characterized by two points defining a radius} -\TOline{R} {radius}{circle characterized by a point and the measurement of a radius } -\bottomrule -\end{tabular} - -\medskip -You don't need to put \tkzname{radius} because that's the default option. We can use the styles from \TIKZ. The label is created and therefore "passed" between braces. -\end{NewMacroBox} - -\subsubsection{Example} -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){O} \tkzDefPoint(2,0){N} - \tkzDefPointBy[rotation=center O angle 50](N) - \tkzGetPoint{M} - \tkzDefPointBy[rotation=center O angle -20](N) - \tkzGetPoint{P} - \tkzDefPointBy[rotation=center O angle 125](N) - \tkzGetPoint{P'} - \tkzLabelCircle[above=4pt](O,N)(120){$\mathcal{C}$} - \tkzDrawCircle(O,M) - \tkzFillCircle[color=blue!20,opacity=.4](O,M) - \tkzLabelCircle[R,draw,fill=orange,% - text width=2cm,text centered](O,3 cm)(-60)% - {The circle\\ $\mathcal{C}$} - \tkzDrawPoints(M,P)\tkzLabelPoints[right](M,P) -\end{tikzpicture} -\end{tkzexample} - -\endinput +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-clipping.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-clipping.tex new file mode 100644 index 0000000000..e7e96e461c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-clipping.tex @@ -0,0 +1,435 @@ +\section{Controlling Bounding Box} +From the \tkzimp{PgfManual} :"When you add the clip option, the current path is used for clipping subsequent drawings. Clipping never enlarges the clipping area. Thus, when you clip against a certain path and then clip again against another path, you clip against the intersection of both. +The only way to enlarge the clipping path is to end the {pgfscope} in which the clipping was done. At the end of a {pgfscope} the clipping path that was in force at the beginning of the scope is reinstalled." + + +First of all, you don't have to deal with \TIKZ\ the size of the bounding box. Early versions of \tkzNamePack{tkz-euclide} did not control the size of the bounding box, now with \tkzNamePack{\tkznameofpack} 4 the size of the bounding box is limited. + +The initial bounding box after using the macro \tkzcname{tkzInit} is defined by the rectangle based on the points $(0,0)$ and $(10,10)$. The \tkzcname{tkzInit} macro allows this initial bounding box to be modified using the arguments (\tkzname{xmin}, \tkzname{xmax}, \tkzname{ymin}, and \tkzname{ymax}). Of course any external trace modifies the bounding box. \TIKZ\ maintains that bounding box. It is possible to influence this behavior either directly with commands or options in \TIKZ\ such as a command like \tkzcname{useasboundingbox} or the option \tkzname{use as bounding box}. A possible consequence is to reserve a box for a figure but the figure may overflow the box and spread over the main text. +The following command \tkzcname{pgfresetboundingbox} clears a bounding box and establishes a new one. + +\subsection{Utility of \tkzcname{tkzInit}} + However, it is sometimes necessary to control the size of what will be displayed. + To do this, you need to have prepared the bounding box you are going to work in, this is the role of the macro \tkzNameMacro{tkzInit}. For some drawings, it is interesting to fix the extreme values (xmin,xmax,ymin and ymax) and to "clip" the definition rectangle in order to control the size of the figure as well as possible. + +The two macros that are useful for controlling the bounding box: +\begin{itemize} + \item \tkzcname{tkzInit} + \item \tkzcname{tkzClip} +\end{itemize} +\vspace{20pt} + +To this, I added macros directly linked to the bounding box. You can now view it, backup it, restore it (see the section Bounding Box). + +\subsection{\tkzcname{tkzInit}} + +\begin{NewMacroBox}{tkzInit}{\oarg{local options}}\hypertarget{init}{}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{xmin} {0} {minimum value of the abscissae in cm} +\TOline{xmax} {10} {maximum value of the abscissae in cm} +\TOline{xstep}{1} {difference between two graduations in $x$} +\TOline{ymin} {0} {minimum y-axis value in cm } +\TOline{ymax} {10} {maximum y-axis value in cm} +\TOline{ystep}{1} {difference between two graduations in $y$} +\bottomrule +\end{tabular} + +\medskip + +The role of \tkzcname{tkzInit} is to define a \textcolor{red}{orthogonal} coordinates system and a rectangular part of the plane in which you will place your drawings using Cartesian coordinates. +This macro allows you to define your working environment as with a calculator. With \tkzname{\tkznameofpack} 4 \tkzcname{xstep} and \tkzcname{ystep} are always 1. Logically it is no longer useful to use \tkzcname{tkzInit}, except for an action like "Clipping Out". +\end{NewMacroBox} + + +\subsection{\tkzcname{tkzClip}} + +\begin{NewMacroBox}{tkzClip}{\oarg{local options}} +The role of this macro is to make invisible what is outside the rectangle defined by (xmin~;~ymin) and (xmax~;~ymax). + +\medskip +\begin{tabular}{lll} +\hline +options & default & definition \\ +\midrule +\TOline{space} {1} {added value on the right, left, bottom and top of the background} +\bottomrule +\end{tabular} + +\medskip + +The role of the \tkzname{space} option is to enlarge the visible part of the drawing. This part becomes the rectangle defined by (xmin-space~;~ymin-space) and (xmax+space~;~ymax+space). \tkzname{space} can be negative! The unit is cm and should not be specified. +\end{NewMacroBox} + + + +The role of this macro is to "clip" the initial rectangle so that only the paths contained in this rectangle are drawn. + +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture} + \tkzInit[xmax=4, ymax=3] + \tkzDefPoints{-1/-1/A,5/2/B} + \tkzDrawX \tkzDrawY + \tkzGrid + \tkzClip + \tkzDrawSegment(A,B) +\end{tikzpicture} +\end{tkzexample} + +It is possible to add a bit of space +\begin{tkzltxexample}[] + \tkzClip[space=1] +\end{tkzltxexample} + +\subsection{\tkzcname{tkzClip} and the option \tkzname{space}} +This option allows you to add some space around the "clipped" rectangle. +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture} + \tkzInit[xmax=4, ymax=3] + \tkzDefPoints{-1/-1/A,5/2/B} + \tkzDrawX \tkzDrawY + \tkzGrid + \tkzClip[space=1] + \tkzDrawSegment(A,B) +\end{tikzpicture} +\end{tkzexample} +The dimensions of the "clipped" rectangle are \tkzname{xmin-1}, \tkzname{ymin-1}, \tkzname{xmax+1} and \tkzname{ymax+1}. + +%<---------------------------------------------------------------------------> +% tkzShowBB +%<---------------------------------------------------------------------------> +\subsection{tkzShowBB} +The simplest macro. +\begin{NewMacroBox}{tkzShowBB}{\oarg{local options}}% +This macro displays the bounding box. A rectangular frame surrounds the bounding box. This macro accepts \TIKZ\ options. +\end{NewMacroBox} + + +\subsubsection{Example with \tkzcname{tkzShowBB}} +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}[scale=.5] + \tkzInit[ymax=5,xmax=8] + \tkzGrid + \tkzDefPoint(3,0){A} + \begin{scope} + \tkzClipBB + \tkzDrawCircle[R](A,5) + \tkzShowBB[line width = 4pt,fill=teal!10,opacity=.4] + \end{scope} +\tkzDrawCircle[R,red](A,4) +\end{tikzpicture} +\end{tkzexample} +%<---------------------------------------------------------------------------> +% tkzClipBB +%<---------------------------------------------------------------------------> +\subsection{tkzClipBB} +\begin{NewMacroBox}{tkzClipBB}{}% +The idea is to limit future constructions to the current bounding box. +\end{NewMacroBox} + +\subsubsection{Example with \tkzcname{tkzClipBB} and the bisectors} + +\begin{tkzexample}[latex=6cm,small] + \begin{tikzpicture} + \tkzInit[xmin=-3,xmax=6, ymin=-1,ymax=6] + \tkzDefPoint(0,0){O}\tkzDefPoint(3,1){I} + \tkzDefPoint(1,4){J} + \tkzDefLine[bisector](I,O,J) \tkzGetPoint{i} + \tkzDefLine[bisector out](I,O,J) \tkzGetPoint{j} + \tkzDrawPoints(O,I,J,i,j) + \tkzClipBB + \tkzDrawLines[add = 1 and 2,color=orange](O,I O,J) + \tkzDrawLines[add = 1 and 2](O,i O,j) + \tkzShowBB + \end{tikzpicture} +\end{tkzexample} + + +\newpage + +\section{Clipping different objects} + +\subsection{Clipping a polygon} + \begin{NewMacroBox}{tkzClipPolygon}{\oarg{local options}\parg{points list}}% +This macro makes it possible to contain the different plots in the designated polygon. + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2,pt3,\dots}}{\parg{A,B,C}}{} +\midrule +options & default & definition \\ +\midrule +\TOline{out} {} {allows to clip the outside of the object} + \end{tabular} +\end{NewMacroBox} + +\subsubsection{\tkzcname{tkzClipPolygon}} + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture}[scale=1.25] + \tkzDefPoint(0,0){A} + \tkzDefPoint(4,0){B} + \tkzDefPoint(1,3){C} + \tkzDrawPolygon(A,B,C) + \tkzDefPoint(0,2){D} + \tkzDefPoint(2,0){E} + \tkzDrawPoints(D,E) + \tkzLabelPoints(D,E) + \tkzClipPolygon(A,B,C) + \tkzDrawLine[new](D,E) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzcname{tkzClipPolygon[out]}} + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture}[scale=1] + \tkzDefPoint(0,0){P1} + \tkzDefPoint(4,0){P2} + \tkzDefPoint(4,4){P3} + \tkzDefPoint(0,4){P4} + \tkzDefPoint(1,1){Q1} + \tkzDefPoint(3,1){Q2} + \tkzDefPoint(3,3){Q3} + \tkzDefPoint(1,3){Q4} + \tkzDrawPolygon(P1,P2,P3,P4) + \begin{scope} + \tkzClipPolygon[out](Q1,Q2,Q3,Q4) + \tkzFillPolygon[teal!20](P1,P2,P3,P4) + \end{scope} + \tkzDrawPolygon(Q1,Q2,Q3,Q4) + \end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example: use of "Clip" for Sangaku in a square} +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzDefPoint(4,8){F} + \tkzDefTriangle[equilateral](C,D) + \tkzGetPoint{I} + \tkzDefPointBy[projection=onto B--C](I) + \tkzGetPoint{J} + \tkzInterLL(D,B)(I,J) \tkzGetPoint{K} + \tkzDefPointBy[symmetry=center K](B) + \tkzGetPoint{M} + \tkzClipPolygon(B,C,D,A) + \tkzCalcLength(M,I) \tkzGetLength{dMI} + \tkzFillPolygon[color = orange](A,B,C,D) + \tkzFillCircle[R,color = yellow](M,\dMI) + \tkzFillCircle[R,color = blue!50!black](F,4) +\end{tikzpicture} +\end{tkzexample} + + + +\subsection{Clipping a disc} + +\begin{NewMacroBox}{tkzClipCircle}{\oarg{local options}\parg{A,B} or \parg{A,r}}% +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{A,B} or \parg{A,r}}{\parg{A,B} or \parg{A,2cm}} {AB radius or diameter } +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{radius} {radius}{circle characterized by two points defining a radius} +\TOline{R} {radius}{circle characterized by a point and the measurement of a radius } +\TOline{out} {} {allows to clip the outside of the object} + \bottomrule +\end{tabular} + +\medskip +It is not necessary to put \tkzname{radius} because that is the default option. +\end{NewMacroBox} + + \subsubsection{Simple clip} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint(0,0){A} \tkzDefPoint(2,2){O} + \tkzDefPoint(4,4){B} \tkzDefPoint(5,5){C} + \tkzDrawPoints(O,A,B,C) + \tkzLabelPoints(O,A,B,C) + \tkzDrawCircle(O,A) + \tkzClipCircle(O,A) + \tkzDrawLine(A,C) + \tkzDrawCircle[fill=teal!10,opacity=.5](C,O) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Clip out} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} + \tkzInit[xmin=-3,ymin=-2,xmax=4,ymax=3] + \tkzDefPoint(0,0){O} + \tkzDefPoint(-4,-2){A} + \tkzDefPoint(3,1){B} + \tkzDrawCircle[R](O,2) + \tkzDrawPoints(A,B) % to have a good bounding box + \begin{scope} + \tkzClipCircle[out,R](O,2) + \tkzDrawLines(A,B) + \end{scope} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Intersection of disks} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} +\tkzDefPoints{0/0/O,4/0/A,0/4/B} +\tkzDrawPolygon[fill=teal](O,A,B) +\tkzClipPolygon(O,A,B) +\tkzClipCircle(A,O) +\tkzClipCircle(B,O) +\tkzFillPolygon[white](O,A,B) +\end{tikzpicture} +\end{tkzexample} + + +see a more complex example about clipping here : \ref{About clipping circles} + + + +\subsection{Clipping a sector} +\tkzHandBomb\ Attention the arguments vary according to the options. +\begin{NewMacroBox}{tkzClipSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{towards}{towards}{$O$ is the centre and the sector starts from $A$ to $(OB)$} +\TOline{rotate} {towards}{The sector starts from $A$ and the angle determines its amplitude. } +\TOline{R}{towards}{We give the radius and two angles} +\bottomrule +\end{tabular} + +\medskip +You have to add, of course, all the styles of \TIKZ\ for tracings... + +\medskip +\begin{tabular}{lll}% +\toprule +options & arguments & example \\ +\midrule +\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzClipSector(O,A)(B)}} +\TOline{rotate} {\parg{pt,pt}\parg{angle}}{\tkzcname{tkzClipSector[rotate](O,A)(90)}} +\TOline{R}{\parg{pt,$r$}\parg{angle 1,angle 2}}{\tkzcname{tkzClipSector[R](O,2)(30,90)}} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Example 1} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=0.5] +\tkzDefPoint(0,0){a} +\tkzDefPoint(12,0){b} +\tkzDefPoint(4,10){c} +\tkzInterCC[R](a,6)(b,8) +\tkzGetFirstPoint{AB1} \tkzGetSecondPoint{AB2} +\tkzInterCC[R](a,6)(c,6) +\tkzGetFirstPoint{AC1} \tkzGetSecondPoint{AC2} +\tkzInterCC[R](b,8)(c,6) +\tkzGetFirstPoint{BC1} \tkzGetSecondPoint{BC2} +\tkzDrawArc(a,AB2)(AB1) +\tkzDrawArc(b,AB1)(AB2) +\tkzDrawArc(a,AC2)(AC1) +\tkzDrawArc(c,AC1)(AC2) +\tkzDrawArc(b,BC2)(BC1) +\tkzDrawArc(c,BC1)(BC2) +\begin{scope} +\tkzClipSector(b,BC2)(BC1) +\tkzFillSector[teal!40!white](c,BC1)(BC2) +\end{scope} +\begin{scope} +\tkzClipSector(a,AB2)(AB1) +\tkzFillSector[teal!40!white](b,AB1)(AB2) +\end{scope} +\begin{scope} +\tkzClipSector(a,AC2)(AC1) +\tkzFillSector[teal!40!white](c,AC1)(AC2) +\end{scope} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example 2} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1.5] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,-1){A} + \tkzDefPoint(1,1){B} + \tkzDrawSector[new,dashed](O,A)(B) + \tkzDrawSector[new](O,B)(A) +\begin{scope} +\tkzClipSector(O,B)(A) +\tkzDrawSquare[color=teal,fill=teal!20](O,B) +\end{scope} +\tkzDrawPoints(A,B,O) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Options from \TIKZ: trim left or right} +See the \tkzimp{pgfmanual} + +\subsection{\TIKZ\ Controls \tkzcname{pgfinterruptboundingbox} and \tkzcname{endpgfinterruptboundingbox}} +This command temporarily interrupts the calculation of the box and configures a new box. +See the \tkzimp{pgfmanual} + +\subsubsection{Example about contolling the bouding box} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\tkzDefPoint(0,5){A}\tkzDefPoint(5,4){B} +\tkzDefPoint(0,0){C}\tkzDefPoint(5,1){D} +\tkzDrawSegments(A,B C,D A,C) +\pgfinterruptboundingbox + \tkzInterLL(A,B)(C,D)\tkzGetPoint{I} +\endpgfinterruptboundingbox +\tkzClipBB +\tkzDrawCircle(I,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Reverse clip: tkzreverseclip} + +In order to use this option, a bounding box must be defined. + +\begin{tkzltxexample}[] + \tikzset{tkzreverseclip/.style={insert path={ + (current bounding box.south west) --(current bounding box.north west) + --(current bounding box.north east) -- (current bounding box.south east) + -- cycle} }} +\end{tkzltxexample} + + +\subsubsection{Example with \tkzcname{tkzClipPolygon[out]}} +\tkzcname{tkzClipPolygon[out]}, \tkzcname{tkzClipCircle[out]} use this option. +\begin{tkzexample}[vbox,small] +\fbox{\begin{tikzpicture}[scale=1] +\tkzInit[xmin=-5,xmax=5,ymin=-4,ymax=6] +\tkzClip + \tkzDefPoints{-.5/0/P1,.5/0/P2} + \foreach \i [count=\j from 3] in {2,...,7}{% + \tkzDefShiftPoint[P\i]({45*(\i-1)}:1){P\j}} + \tkzClipPolygon[out](P1,P...,P8) + \tkzCalcLength(P1,P5)\tkzGetLength{r} + \begin{scope}[blend group=screen] + \foreach \i in {1,...,8}{% + \pgfmathparse{100-5*\i} + \tkzFillCircle[R,color=teal!% + \pgfmathresult](P\i,\r)} + \end{scope} +\end{tikzpicture}} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-compass.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-compass.tex index a66e7809a1..08fd38950e 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-compass.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-compass.tex @@ -21,11 +21,11 @@ options & default & definition \\ \begin{tikzpicture} \tkzDefPoint(1,1){A} \tkzDefPoint(6,1){B} - \tkzInterCC[R](A,4cm)(B,3cm) + \tkzInterCC[R](A,4)(B,3) \tkzGetPoints{C}{D} \tkzDrawPoint(C) - \tkzCompass[color=red,length=1.5](A,C) - \tkzCompass[color=red](B,C) + \tkzCompass[length=1.5](A,C) + \tkzCompass(B,C) \tkzDrawSegments(A,B A,C B,C) \end{tikzpicture} \end{tkzexample} @@ -35,11 +35,11 @@ options & default & definition \\ \begin{tikzpicture} \tkzDefPoint(0,0){A} \tkzDefPoint(5,0){B} - \tkzInterCC[R](A,4cm)(B,3cm) + \tkzInterCC[R](A,4)(B,3) \tkzGetPoints{C}{D} \tkzDrawPoints(A,B,C) - \tkzCompass[color=red,delta=20](A,C) - \tkzCompass[color=red,delta=20](B,C) + \tkzCompass[delta=20](A,C) + \tkzCompass[delta=20](B,C) \tkzDrawPolygon(A,B,C) \tkzMarkAngle(A,C,B) \end{tikzpicture} @@ -63,52 +63,19 @@ options & default & definition \\ \begin{tikzpicture}[scale=.75] \tkzDefPoint(2,2){A} \tkzDefPoint(5,-2){B} \tkzDefPoint(3,4){C} \tkzDrawPoints(A,B) - \tkzDrawPoint[color=red,shape=cross out](C) - \tkzCompasss[color=orange](A,B A,C B,C C,B) - \tkzShowLine[mediator,color=red, - dashed,length = 2](A,B) + \tkzDrawPoint[shape=cross out](C) + \tkzCompasss[new](A,B A,C B,C C,B) + \tkzShowLine[mediator,new,dashed,length = 2](A,B) \tkzShowLine[parallel = through C, - color=blue,length=2](A,B) - \tkzDefLine[mediator](A,B) \tkzGetPoints{i}{j} - \tkzDefLine[parallel=through C](A,B) \tkzGetPoint{D} + color=purple,length=2](A,B) + \tkzDefLine[mediator](A,B) + \tkzGetPoints{i}{j} + \tkzDefLine[parallel=through C](A,B) + \tkzGetPoint{D} \tkzDrawLines[add=.6 and .6](C,D A,C B,D) \tkzDrawLines(i,j) \tkzDrawPoints(A,B,C,i,j,D) \tkzLabelPoints(A,B,C,i,j,D) \end{tikzpicture} \end{tkzexample} - -\subsection{Configuration macro \tkzcname{tkzSetUpCompass}} - -\begin{NewMacroBox}{tkzSetUpCompass}{\oarg{local options}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{line width} {0.4pt}{line thickness} -\TOline{color} {black!50}{line colour} -\TOline{style} {solid}{solid line style, dashed,dotted,...} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Use of \tkzcname{tkzSetUpCompass}} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.75, - showbi/.style={bisector,size=2,gap=3}] - \tkzSetUpCompass[color=blue,line width=.3 pt] - \tkzDefPoints{0/1/A, 8/3/B, 3/6/C} - \tkzDrawPolygon(A,B,C) - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzShowLine[showbi](B,A,C) - \tkzShowLine[showbi](C,B,A) - \tkzInterLL(A,a)(B,b) \tkzGetPoint{I} - \tkzDefPointBy[projection= onto A--B](I) - \tkzGetPoint{H} - \tkzDrawCircle[radius,color=gray](I,H) - \tkzDrawSegments[color=gray!50](I,H) - \tkzDrawLines[add=0 and -.2,color=blue!50 ](A,a B,b) - \tkzShowBB -\end{tikzpicture} -\end{tkzexample} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-config.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-config.tex deleted file mode 100644 index c4bdaa1a22..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-config.tex +++ /dev/null @@ -1,196 +0,0 @@ -\section{Customization} - -\subsection{Use of \tkzcname{tkzSetUpLine}} \label{tkzsetupline} -It is a macro that allows you to define the style of all the lines. - -\begin{NewMacroBox}{tkzSetUpLine}{\oarg{local options}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{color}{black}{colour of the construction lines} -\TOline{line width}{0.4pt}{thickness of the construction lines} -\TOline{style}{solid}{style of construction lines} -\TOline{add}{.2 and .2}{changing the length of a line segment} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Example 1: change line width} -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture} - \tkzSetUpLine[color=blue,line width=1pt] -\begin{scope}[rotate=-90] - \tkzDefPoint(10,6){C} - \tkzDefPoint( 0,6){A} - \tkzDefPoint(10,0){B} - \tkzDefPointBy[projection = onto B--A](C) - \tkzGetPoint{H} - \tkzDrawPolygon(A,B,C) - \tkzMarkRightAngle[size=.4,fill=blue!20](B,C,A) - \tkzMarkRightAngle[size=.4,fill=red!20](B,H,C) - \tkzDrawSegment[color=red](C,H) -\end{scope} - \tkzLabelSegment[below](C,B){$a$} - \tkzLabelSegment[right](A,C){$b$} - \tkzLabelSegment[left](A,B){$c$} - \tkzLabelSegment[color=red](C,H){$h$} - \tkzDrawPoints(A,B,C) - \tkzLabelPoints[above left](H) - \tkzLabelPoints(B,C) - \tkzLabelPoints[above](A) -\end{tikzpicture} -\end{tkzexample} - - - - -\subsubsection{Example 2: change style of line} - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(1,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,1){C} \tkzDefPoint(5,1){D} - \tkzDefPoint(1,2){E} \tkzDefPoint(6,2){F} - \tkzDefPoint(0,4){A'}\tkzDefPoint(3,4){B'} - \tkzCalcLength[cm](C,D) \tkzGetLength{rCD} - \tkzCalcLength[cm](E,F) \tkzGetLength{rEF} - \tkzInterCC[R](A',\rCD cm)(B',\rEF cm) - \tkzGetPoints{I}{J} - \tkzSetUpLine[style=dashed,color=gray] - \tkzDrawLine(A',B') - \tkzCompass(A',B') - \tkzDrawSegments(A,B C,D E,F) - \tkzDrawCircle[R](A',\rCD cm) - \tkzDrawCircle[R](B',\rEF cm) - \tkzSetUpLine[color=red] - \tkzDrawSegments(A',I B',I) - \tkzDrawPoints(A,B,C,D,E,F,A',B',I,J) - \tkzLabelPoints(A,B,C,D,E,F,A',B',I,J) -\end{tikzpicture} -\end{tkzexample} - - -\subsubsection{Example 3: extend lines} -\begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture} - \tkzSetUpLine[add=.5 and .5] - \tkzDefPoints{0/0/A,4/0/B,1/3/C} - \tkzDrawLines(A,B B,C A,C) - \end{tikzpicture} -\end{tkzexample} - - -\subsection{Points style} -\begin{NewMacroBox}{tkzSetUpPoint}{\oarg{local options}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{color}{black}{point color} -\TOline{size}{3pt}{point size} -\TOline{fill}{black!50}{inside point color} -\TOline{shape}{circle}{point shape circle or cross} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Use of \tkzcname{tkzSetUpPoint}} -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture} - \tkzSetUpPoint[shape = cross out,color=blue] - \tkzInit[xmax=100,xstep=20,ymax=.5] - \tkzDefPoint(20,1){A} - \tkzDefPoint(80,0){B} - \tkzDrawLine(A,B) - \tkzDrawPoints(A,B) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Use of \tkzcname{tkzSetUpPoint} inside a group} -\begin{tkzexample}[latex=8cm,small] - \begin{tikzpicture} - \tkzInit[ymin=-0.5,ymax=3,xmin=-0.5,xmax=7] - \tkzDefPoint(0,0){A} - \tkzDefPoint(02.25,04.25){B} - \tkzDefPoint(4,0){C} - \tkzDefPoint(3,2){D} - \tkzDrawSegments(A,B A,C A,D) - {\tkzSetUpPoint[shape=cross out, - fill= teal!50, - size=4,color=teal] - \tkzDrawPoints(A,B)} - \tkzSetUpPoint[fill= teal!50,size=4, - color=teal] - \tkzDrawPoints(C,D) - \tkzLabelPoints(A,B,C,D) - \end{tikzpicture} -\end{tkzexample} - - - -\subsection{Use of \tkzcname{tkzSetUpCompass}} - -\begin{NewMacroBox}{tkzSetUpCompass}{\oarg{local options}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{color}{black}{color of construction arcs} -\TOline{line width}{0.4pt}{thickness of construction arcs} -\TOline{style}{solid}{style of the building arcs} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Use of \tkzcname{tkzSetUpCompass} with bisector} -\begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture}[scale=0.75] - \tkzDefPoints{0/1/A, 8/3/B, 3/6/C} - \tkzDrawPolygon(A,B,C) - \tkzSetUpCompass[color=red,line width=.2 pt] - \tkzDefLine[bisector](A,C,B) \tkzGetPoint{c} - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzShowLine[bisector,size=2,gap=3](A,C,B) - \tkzShowLine[bisector,size=2,gap=3](B,A,C) - \tkzShowLine[bisector,size=1,gap=2](C,B,A) - \tkzDrawLines[add=0 and 0 ](B,b) - \tkzDrawLines[add=0 and -.4 ](A,a C,c) - \tkzLabelPoints(A,B) \tkzLabelPoints[above](C) - \end{tikzpicture} - \end{tkzexample} - -\subsubsection{Another example of of\tkzcname{tkzSetUpCompass}} -\begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture}[scale=1,rotate=90] - \tkzDefPoints{0/1/A, 8/3/B, 3/6/C} - \tkzDrawPolygon(A,B,C) - \tkzSetUpCompass[color=brown, - line width=.3 pt,style=tkzdotted] - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzInterLL(A,a)(B,b) \tkzGetPoint{I} - \tkzDefPointBy[projection= onto A--B](I) - \tkzGetPoint{H} - \tkzMarkRightAngle(I,H,A) - \tkzDrawCircle[radius,color=red](I,H) - \tkzDrawSegments[color=red](I,H) - \tkzDrawLines[add=0 and -.5,,color=red](A,a) - \tkzDrawLines[add=0 and 0,color=red](B,b) - \tkzShowLine[bisector,size=2,gap=3](B,A,C) - \tkzShowLine[bisector,size=1,gap=3](C,B,A) - \tkzLabelPoints(A,B)\tkzLabelPoints[left](C) - \end{tikzpicture} -\end{tkzexample} - -\subsection{Own style} -You can set the normal style with |tkzSetUpPoint| and your own style - -\begin{tkzexample}[latex=2cm,small] -\tkzSetUpPoint[color=blue!50!white, fill=gray!20!red!50!white] -\tikzset{/tikz/mystyle/.style={color=blue!20!black,fill=blue!20}} - \begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(0,1){A} - \tkzDrawPoints(O) % general style - \tkzDrawPoints[mystyle,size=4](A) % my style - \tkzLabelPoints(O,A) - \end{tikzpicture} -\end{tkzexample} - -\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-drawing.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-drawing.tex new file mode 100644 index 0000000000..e4d08474d0 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-drawing.tex @@ -0,0 +1,987 @@ +\section{Drawing} +\tkzname{\tkznameofpack} can draw 5 types of objects : point, line or line segment, circle, arc and sector. + +%<----------------------------------------------------------------------------> +% POINT(S) +%<----------------------------------------------------------------------------> +\subsection{Draw a point or some points} +There are two possibilities : \tkzcname{tkzDrawPoint} for a single point or \tkzcname{tkzDrawPoints} for one or more points. + +\subsubsection{Drawing points \tkzcname{tkzDrawPoint}} \hypertarget{tdrp}{} + +\begin{NewMacroBox}{tkzDrawPoint}{\oarg{local options}\parg{name}}% +\begin{tabular}{lll}% +arguments & default & definition \\ +\midrule +\TAline{name of point} {no default} {Only one point name is accepted} +\bottomrule +\end{tabular} + +\medskip +The argument is required. The disc takes the color of the circle, but lighter. It is possible to change everything. The point is a node and therefore it is invariant if the drawing is modified by scaling. + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{\TIKZ\ options}{}{all \TIKZ\ options are valid.} +\TOline{shape} {circle}{Possible \tkzname{cross} or \tkzname{cross out}} +\TOline{size} {6}{$6 \times$ \tkzcname{pgflinewidth}} +\TOline{color} {black}{the default color can be changed } +\bottomrule +\end{tabular} + +\medskip +{We can create other forms such as \tkzname{cross}} +\end{NewMacroBox} + +By default, \tkzname{point style } is defined like this : + +\begin{tkzltxexample}[] + \tikzset{point style/.style = {% + draw = black, + inner sep = 0pt, + shape = circle, + minimum size = 3 pt, + fill = black + } + } +\end{tkzltxexample} + +\subsubsection{Example of point drawings} +Note that \tkzname{scale} does not affect the shape of the dots. Which is normal. Most of the time, we are satisfied with a single point shape that we can define from the beginning, either with a macro or by modifying a configuration file. + +\begin{tkzexample}[latex=5cm,small] + \begin{tikzpicture}[scale=.5] + \tkzDefPoint(1,3){A} + \tkzDefPoint(4,1){B} + \tkzDefPoint(0,0){O} + \tkzDrawPoint[color=red](A) + \tkzDrawPoint[fill=blue!20,draw=blue](B) + \tkzDrawPoint[shape=cross,size=8pt,color=teal](O) + \end{tikzpicture} +\end{tkzexample} + +It is possible to draw several points at once but this macro is a little slower than the previous one. Moreover, we have to make do with the same options for all the points. +\newpage +\hypertarget{tdrps}{} +\begin{NewMacroBox}{tkzDrawPoints}{\oarg{local options}\parg{liste}}% +\begin{tabular}{lll}% +arguments & default & definition \\ +\midrule +\TAline{points list}{no default}{example \tkzcname{tkzDrawPoints(A,B,C)}} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{shape} {circle}{Possible \tkzname{cross} or \tkzname{cross out}} +\TOline{size} {6}{$6 \times$ \tkzcname{pgflinewidth}} +\TOline{color} {black}{the default color can be changed } +\bottomrule +\end{tabular} + +\medskip +\tkzHandBomb\ Beware of the final "s", an oversight leads to cascading errors if you try to draw multiple points. The options are the same as for the previous macro. +\end{NewMacroBox} + + +\subsubsection{Example} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\tkzDefPoints{1/3/A,4/1/B,0/0/C} +\tkzDrawPoints[size=3,color=red,fill=red!50](A,B,C) +\end{tikzpicture} +\end{tkzexample} + + +%<----------------------------------------------------------------------------> +% LINE(S) +%<----------------------------------------------------------------------------> + +\section{Drawing the lines} +The following macros are simply used to draw, name lines. +\subsection{Draw a straight line} +To draw a normal straight line, just give a couple of points. You can use the \tkzname{add} option to extend the line (This option is due to \tkzimp{Mark Wibrow}, see the code below). + + +The style of a line is by default : + +\begin{tkzltxexample}[] + \tikzset{line style/.style = {% + line width = 0.6pt, + color = black, + style = solid, + add = {.2} and {.2}% + }} +\end{tkzltxexample} +with + +\begin{tkzltxexample}[] + \tikzset{% + add/.style args={#1 and #2}{ + to path={% + ($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)% + \tikztonodes}}} +\end{tkzltxexample} + +You can modify this style with \tkzcname{tkzSetUpLine} see \ref{tkzsetupline} + +\newpage +\begin{NewMacroBox}{tkzDrawLine}{\oarg{local options}\parg{pt1,pt2} }% +The arguments are a list of two points or three points. It would be possible, as for a half line, to create a style with \tkzcname{add}. + +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{\TIKZ\ options}{}{all \TIKZ\ options are valid.} +\TOline{add}{0.2 and 0.2}{add = $kl$ and $kr$, \dots} +\TOline{\dots}{\dots}{allows the segment to be extended to the left and right. } +\bottomrule +\end{tabular} + +\tkzname{add} defines the length of the line passing through the points pt1 and pt2. Both numbers are percentages. The styles of \TIKZ\ are accessible for plots. +\end{NewMacroBox} + +\subsubsection{Examples with \tkzname{add}} +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture} + \tkzInit[xmin=-2,xmax=3,ymin=-2.25,ymax=2.25] + \tkzClip[space=.25] + \tkzDefPoint(0,0){A} \tkzDefPoint(2,0.5){B} + \tkzDefPoint(0,-1){C}\tkzDefPoint(2,-0.5){D} + \tkzDefPoint(0,1){E} \tkzDefPoint(2,1.5){F} + \tkzDefPoint(0,-2){G} \tkzDefPoint(2,-1.5){H} + \tkzDrawLine(A,B) \tkzDrawLine[add = 0 and .5](C,D) + \tkzDrawLine[add = 1 and 0](E,F) + \tkzDrawLine[add = 0 and 0](G,H) + \tkzDrawPoints(A,B,C,D,E,F,G,H) + \tkzLabelPoints(A,B,C,D,E,F,G,H) +\end{tikzpicture} +\end{tkzexample} + +It is possible to draw several lines, but with the same options. +\begin{NewMacroBox}{tkzDrawLines}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% +Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for the draws. +\end{NewMacroBox} + +\subsubsection{Example with \tkzcname{tkzDrawLines}} + +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDefPoint(2,0){B} + \tkzDefPoint(1,2){C} + \tkzDefPoint(3,2){D} + \tkzDrawLines(A,B C,D A,C B,D) + \tkzLabelPoints(A,B,C,D) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example with the option \tkzname{add}} +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint(0,0){O} + \tkzDefPoint(3,1){I} + \tkzDefPoint(1,4){J} + \tkzDefLine[bisector](I,O,J) + \tkzGetPoint{i} + \tkzDefLine[bisector out](I,O,J) + \tkzGetPoint{j} + \tkzDrawLines[add = 1 and .5](O,I O,J) + \tkzDrawLines[add = 1 and .5,new](O,i O,j) +\end{tikzpicture} +\end{tkzexample} +%<----------------------------------------------------------------------------> +% SEGMENT(S) +%<----------------------------------------------------------------------------> + +\section{Drawing a segment} +There is, of course, a macro to simply draw a segment. + +\subsection{Draw a segment \tkzcname{tkzDrawSegment}} +\begin{NewMacroBox}{tkzDrawSegment}{\oarg{local options}\parg{pt1,pt2}}% +The arguments are a list of two points. The styles of \TIKZ\ are available for the drawings. + +\medskip +\begin{tabular}{lll}% +argument & example & definition \\ +\midrule +\TAline{(pt1,pt2)}{(A,B)}{draw the segment $[A,B]$} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +options & example & definition \\ +\midrule +\TOline{\TIKZ\ options}{}{all \TIKZ\ options are valid.} +\TOline{dim}{no default}{dim = \{label,dim,option\}, \dots} +\TOline{\dots}{\dots}{allows you to add dimensions to a figure.} +\bottomrule +\end{tabular} + +This is of course equivalent to \tkzcname{draw (A)--(B);}. You can also use the option \tkzname{add}. +\end{NewMacroBox} + +\subsubsection{Example with point references} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=1.5] + \tkzDefPoint(0,0){A} + \tkzDefPoint(2,1){B} + \tkzDrawSegment[color=red,thin](A,B) + \tkzDrawPoints(A,B) + \tkzLabelPoints(A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example of extending an segment with option \tkzname{add}} + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture} + \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} + \tkzDefTriangleCenter[euler](A,B,C) + \tkzGetPoint{E} + \tkzDrawCircle[euler,red](A,B,C) + \tkzDrawLines[add=.5 and .5](A,B A,C B,C) + \tkzDrawPoints(A,B,C,E) + \tkzLabelPoints(A,B,C,E) + \end{tikzpicture} +\end{tkzexample} + +\subsubsection{Adding dimensions with option \tkzname{dim} partI} +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[scale=4] + \pgfkeys{/pgf/number format/.cd,fixed,precision=2} + % Define the first two points + \tkzDefPoint(0,0){A} + \tkzDefPoint(3,0){B} + \tkzDefPoint(1,1){C} + % Draw the triangle and the points + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) + % Label the sides + \tkzCalcLength(A,B)\tkzGetLength{ABl} + \tkzCalcLength(B,C)\tkzGetLength{BCl} + \tkzCalcLength(A,C)\tkzGetLength{ACl} + % add dim + \tkzDrawSegment[dim={\pgfmathprintnumber\BCl,6pt,transform shape}](C,B) + \tkzDrawSegment[dim={\pgfmathprintnumber\ACl,6pt,transform shape}](A,C) + \tkzDrawSegment[dim={\pgfmathprintnumber\ABl,-6pt,transform shape}](A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Adding dimensions with option \tkzname{dim} part II} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/O,-2/0/A,2/0/B, + -2/4/C,2/4/D,2/-4/E,-2/-4/F} + \tkzDrawPolygon(C,...,F) + \tkzDrawSegments(A,B) + \tkzDrawPoints(A,...,F,O) + \tkzLabelPoints(A,...,F,O) + \tkzDrawSegment[dim={ $\sqrt{5}$,2cm,}](C,E) + \tkzDrawSegment[dim={ $\frac{\sqrt{5}}{2}$,1cm,}](O,E) + \tkzDrawSegment[dim={ $2$,2cm,left=8pt}](F,C) + \tkzDrawSegment[dim={ $1$,1cm,left=8pt}](F,A) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Drawing segments \tkzcname{tkzDrawSegments}} +If the options are the same we can plot several segments with the same macro. + +\begin{NewMacroBox}{tkzDrawSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% +The arguments are a two-point couple list. The styles of \TIKZ\ are available for the plots. +\end{NewMacroBox} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} + \tkzInit[xmin=-1,xmax=3,ymin=-1,ymax=2] + \tkzClip[space=1] + \tkzDefPoint(0,0){A} + \tkzDefPoint(2,1){B} + \tkzDefPoint(3,0){C} + \tkzDrawSegments(A,B B,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,C) + \tkzLabelPoints[above](B) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Place an arrow on segment} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} +\tkzSetUpStyle[postaction=decorate, + decoration={markings, + mark=at position .5 with {\arrow[thick]{#1}} + }]{myarrow} + \tkzDefPoint(0,0){A} + \tkzDefPoint(4,-4){B} + \tkzDrawSegments[myarrow=stealth](A,B) + \tkzDrawPoints(A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Drawing line segment of a triangle} + +\subsubsection{How to draw \tkzname{Altitude} } +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture}[rotate=-90] + \tkzDefPoint(0,1){A} + \tkzDefPoint(2,4){C} + \tkzDefPointWith[orthogonal normed,K=7](C,A) + \tkzGetPoint{B} + \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c} + \tkzDrawLine[dashed,color=magenta](C,Hc) + \tkzDrawSegment[green!60!black](A,C) + \tkzDrawSegment[green!60!black](C,B) + \tkzDrawSegment[green!60!black](B,A) + \tkzLabelPoint[left](A){$A$} + \tkzLabelPoint[right](B){$B$} + \tkzLabelPoint[above](C){$C$} + \tkzLabelPoint[left](Hc){$Hc$} + \tkzLabelSegment[auto](B,A){$c$} + \tkzLabelSegment[auto,swap](B,C){$a$} + \tkzLabelSegment[auto,swap](C,A){$b$} + \tkzMarkAngle[size=1,color=cyan,mark=|](C,B,A) + \tkzMarkAngle[size=1,color=cyan,mark=|](A,C,Hc) + \tkzMarkAngle[size=0.75, + color=orange,mark=||](Hc,C,B) + \tkzMarkAngle[size=0.75, + color=orange,mark=||](B,A,C) + \tkzMarkRightAngle(A,C,B) + \tkzMarkRightAngle(B,Hc,C) + \end{tikzpicture} +\end{tkzexample} + +\subsection{Drawing a polygon} + \begin{NewMacroBox}{tkzDrawPolygon}{\oarg{local options}\parg{points list}}% +Just give a list of points and the macro plots the polygon using the \TIKZ\ options present. You can replace $(A,B,C,D,E)$ by $(A,...,E)$ and $(P_1,P_2,P_3,P_4,P_5)$ by $(P_1,P...,P_5)$ + +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2,pt3,...}}{|\BS tkzDrawPolygon[gray,dashed](A,B,C)|}{Drawing a triangle} + \end{tabular} + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & example \\ +\midrule +\TOline{Options TikZ}{...}{|\BS tkzDrawPolygon[red,line width=2pt](A,B,C)|} + \end{tabular} +\end{NewMacroBox} + +\subsubsection{\tkzcname{tkzDrawPolygon}} + +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} [rotate=18,scale=1] + \tkzDefPoints{0/0/A,2.25/0.2/B,2.5/2.75/C,-0.75/2/D} + \tkzDrawPolygon(A,B,C,D) + \tkzDrawSegments[style=dashed](A,C B,D) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Option \tkzname{two angles}} +\begin{tkzexample}[latex=6 cm,small] +\begin{tikzpicture} +\tkzDefPoint(0,0){A} +\tkzDefPoint(6,0){B} +\tkzDefTriangle[two angles = 50 and 70](A,B) \tkzGetPoint{C} +\tkzLabelAngle[pos=1.4](B,A,C){$50^\circ$} +\tkzLabelAngle[pos=0.8](C,B,A){$70^\circ$} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Style of line} +\begin{tkzexample}[latex=8 cm,small] +\begin{tikzpicture}[scale=.6] +\tkzSetUpLine[line width=5mm,color=teal] +\tkzDefPoint(0,0){O} +\foreach \i in {0,...,5}{% + \tkzDefPoint({30+60*\i}:4){p\i}} +\tkzDefMidPoint(p1,p3) \tkzGetPoint{m1} +\tkzDefMidPoint(p3,p5) \tkzGetPoint{m3} +\tkzDefMidPoint(p5,p1) \tkzGetPoint{m5} +\tkzDrawPolygon[line join=round](p1,p3,p5) +\tkzDrawPolygon[teal!80, +line join=round](p0,p2,p4) +\tkzDrawSegments(m1,p3 m3,p5 m5,p1) +\tkzDrawCircle[teal,R](O,4.8) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Drawing a polygonal chain} + \begin{NewMacroBox}{tkzDrawPolySeg}{\oarg{local options}\parg{points list}}% +Just give a list of points and the macro plots the polygonal chain using the \TIKZ\ options present. + +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2,pt3,...}}{|\BS tkzDrawPolySeg[gray,dashed](A,B,C)|}{Drawing a triangle} + \end{tabular} + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & example \\ +\midrule +\TOline{Options TikZ}{...}{|\BS tkzDrawPolySeg[red,line width=2pt](A,B,C)|} + \end{tabular} +\end{NewMacroBox} + +\subsubsection{Polygonal chain} + +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,6/0/B,3/4/C,2/2/D} + \tkzDrawPolySeg(A,...,D) + \tkzDrawPoints(A,...,D) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{The idea is to inscribe two squares in a semi-circle.} +A Sangaku look! It is a question of proving that one can inscribe in a half-disc, two squares, and to determine the length of their respective sides according to the radius. + +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/A,8/0/B,4/0/I} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzInterLC(I,C)(I,B) \tkzGetPoints{E'}{E} + \tkzInterLC(I,D)(I,B) \tkzGetPoints{F'}{F} + \tkzDefPointsBy[projection=onto A--B](E,F){H,G} + \tkzDefPointsBy[symmetry = center H](I){J} + \tkzDefSquare(H,J) \tkzGetPoints{K}{L} + \tkzDrawSector(I,B)(A) + \tkzDrawPolySeg(H,E,F,G) + \tkzDrawPolySeg(J,K,L) + \tkzDrawPoints(E,G,H,F,J,K,L) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Polygonal chain: index notation} + +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} +\foreach \pt in {1,2,...,8} {% +\tkzDefPoint(\pt*20:3){P_\pt}} +\tkzDrawPolySeg(P_1,P_...,P_8) +\tkzDrawPoints(P_1,P_...,P_8) +\end{tikzpicture} +\end{tkzexample} + +%<----------------------------------------------------------------------------> +% CIRCLE +%<----------------------------------------------------------------------------> + +\section{Draw a circle with \tkzcname{tkzDrawCircle}} + +\subsection{Draw one circle} +\begin{NewMacroBox}{tkzDrawCircle}{\oarg{local options}\parg{A,B}}% +\tkzHandBomb\ Attention you need only two points to define a radius or a diameter. An additional option \tkzname{R} is available to give a measure directly. + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2}}{\parg{A,B}} {two points to define a radius or a diameter} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{through}{through}{circle with two points defining a radius} +\TOline{diameter}{through}{circle with two points defining a diameter} +\TOline{R}{through}{circle characterized by a point and the measurement of a radius} + \bottomrule +\end{tabular} + +\medskip +Of course, you have to add all the styles of \TIKZ\ for the tracings... +\end{NewMacroBox} + + \subsubsection{Circles and styles, draw a circle and color the disc} + We'll see that it's possible to colour in a disc while tracing the circle. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){O} + \tkzDefPoint(3,0){A} + % circle with centre O and passing through A + \tkzDrawCircle(O,A) + % diameter circle $[OA]$ + \tkzDrawCircle[diameter,new,% + line width=.4pt,fill=orange!10,% + opacity=.5](O,A) + % circle with centre O and radius = exp(1) cm + \edef\rayon{\fpeval{0.25*exp(1)}} + \tkzDrawCircle[R,color=orange](O,\rayon) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Drawing circles} +\begin{NewMacroBox}{tkzDrawCircles}{\oarg{local options}\parg{A,B C,D \dots}}% +\tkzHandBomb\ Attention, the arguments are lists of two points. The circles that can be drawn are the same as in the previous macro. An additional option \tkzname{R} is available to give a measure directly. + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2 pt3,pt4 ...}}{\parg{A,B C,D}} {List of two points} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{through}{through}{circle with two points defining a radius} +\TOline{diameter}{through}{circle with two points defining a diameter} +\TOline{R} {through}{circle characterized by a point and the measurement of a radius} + \bottomrule +\end{tabular} + +\medskip +Of course, you have to add all the styles of \TIKZ\ for the tracings... +\end{NewMacroBox} + + \subsubsection{Circles defined by a triangle.} + +\begin{tkzexample}[latex=9cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,2/0/B,3/2/C} + \tkzDrawPolygon(A,B,C) + \tkzDrawCircles(A,B B,C C,A) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B,C) +\end{tikzpicture} +\end{tkzexample} + + \subsubsection{Concentric circles.} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDrawCircles[R](A,1 A,2 A,3) + \tkzDrawPoint(A) + \tkzLabelPoints(A) +\end{tikzpicture} +\end{tkzexample} + + \subsubsection{Exinscribed circles.} + +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}[scale=1] +\tkzDefPoints{0/0/A,4/0/B,1/2.5/C} +\tkzDrawPolygon(A,B,C) +\tkzDefCircle[ex](B,C,A) +\tkzGetPoint{J_c} \tkzGetSecondPoint{T_c} +\tkzGetLength{rJc} +\tkzDrawCircle[R](J_c,{\rJc pt}) +\tkzDrawLines[add=0 and 1](C,A C,B) +\tkzDrawSegment(J_c,T_c) +\tkzMarkRightAngle(J_c,T_c,B) +\tkzDrawPoints(A,B,C,J_c,T_c) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Cardioid} +Based on an idea by O. Reboux made with pst-eucl (Pstricks module) by D. Rodriguez. + + Its name comes from the Greek \textit{kardia (heart)}, in reference to its shape, and was given to it by Johan Castillon (Wikipedia). + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,0){A} + \foreach \ang in {5,10,...,360}{% + \tkzDefPoint(\ang:2){M} + \tkzDrawCircle(M,A) + } +\end{tikzpicture} +\end{tkzexample} + +\newpage + +\subsection{Drawing semicircle} +\begin{NewMacroBox}{tkzDrawSemiCircle}{\oarg{local options}\parg{A,B}}% + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2}}{\parg{O,A} or\parg{A,B}} {radius or diameter} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{through} {through}{circle characterized by two points defining a radius} +\TOline{diameter} {through}{circle characterized by two points defining a diameter} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Use of \tkzcname{tkzDrawSemiCircle}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} \tkzDefPoint(6,0){B} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzDrawPolygon(B,C,D,A) + \tkzDefPoint(3,6){F} + \tkzDefTriangle[equilateral](C,D) + \tkzGetPoint{I} + \tkzDefPointBy[projection=onto B--C](I) + \tkzGetPoint{J} + \tkzInterLL(D,B)(I,J) \tkzGetPoint{K} + \tkzDefPointBy[symmetry=center K](B) + \tkzGetPoint{M} + \tkzDrawCircle(M,I) + \tkzCalcLength(M,I) \tkzGetLength{dMI} + \tkzDrawPolygon(A,B,C,D) + \tkzDrawCircle[R](M,\dMI) + \tkzDrawSemiCircle(F,D) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Drawing semicircles} + +\begin{NewMacroBox}{tkzDrawSemiCircles}{\oarg{local options}\parg{A,B C,D \dots}}% + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2 pt3,pt4 ...}}{\parg{A,B C,D}} {List of two points} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{through}{through}{circle with two points defining a radius} +\TOline{diameter}{through}{circle with two points defining a diameter} + \bottomrule +\end{tabular} +\end{NewMacroBox} + +%<----------------------------------------------------------------------------> +% ARC +%<----------------------------------------------------------------------------> + +\section{Drawing arcs} +\begin{NewMacroBox}{tkzDrawArc}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% +This macro traces the arc of center $O$. Depending on the options, the arguments differ. It is a question of determining a starting point and an end point. Either the starting point is given, which is the simplest, or the radius of the arc is given. In the latter case, it is necessary to have two angles. Either the angles can be given directly, or nodes associated with the center can be given to determine them. The angles are in degrees. + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{towards}{towards}{$O$ is the center and the arc from $A$ to $(OB)$} +\TOline{rotate} {towards}{the arc starts from $A$ and the angle determines its length} +\TOline{R}{towards}{We give the radius and two angles} +\TOline{R with nodes}{towards}{We give the radius and two points} +\TOline{angles}{towards}{We give the radius and two points} +\TOline{delta}{0}{angle added on each side } +\bottomrule +\end{tabular} + +\medskip +Of course, you have to add all the styles of \TIKZ\ for the tracings... + +\medskip + +\begin{tabular}{lll}% +\toprule +options & arguments & example \\ +\midrule +\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzDrawArc[delta=10](O,A)(B)}} +\TOline{rotate} {\parg{pt,pt}\parg{an}}{\tkzcname{tkzDrawArc[rotate,color=red](O,A)(90)}} +\TOline{R}{\parg{pt,$r$}\parg{an,an}}{\tkzcname{tkzDrawArc[R](O,2)(30,90)}} +\TOline{R with nodes}{\parg{pt,$r$}\parg{pt,pt}}{\tkzcname{tkzDrawArc[R with nodes](O,2)(A,B)}} +\TOline{angles}{\parg{pt,pt}\parg{an,an}}{\tkzcname{tkzDrawArc[angles](O,A)(0,90)}} +\end{tabular} +\end{NewMacroBox} + +Here are a few examples: + +\subsection{Option \tkzname{towards}} +It's useless to put \tkzname{towards}. In this first example the arc starts from $A$ and goes to $B$. The arc going from $B$ to $A$ is different. The salient is obtained by going in the direct direction of the trigonometric circle. +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,-1){A} + \tkzDefPointBy[rotation= center O angle 90](A) + \tkzGetPoint{B} + \tkzDrawArc[color=orange,<->](O,A)(B) + \tkzDrawArc(O,B)(A) + \tkzDrawLines[add = 0 and .5](O,A O,B) + \tkzDrawPoints(O,A,B) + \tkzLabelPoints[below](O,A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{towards}} +In this one, the arc starts from A but stops on the right (OB). + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=0.75] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,-1){A} + \tkzDefPoint(1,1){B} + \tkzDrawArc[color=blue,->](O,A)(B) + \tkzDrawArc[color=gray](O,B)(A) + \tkzDrawArc(O,B)(A) + \tkzDrawLines[add = 0 and .5](O,A O,B) + \tkzDrawPoints(O,A,B) + \tkzLabelPoints[below](O,A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{rotate}} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=0.75] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,-2){A} + \tkzDefPoint(60:2){B} + \tkzDrawLines[add = 0 and .5](O,A O,B) + \tkzDrawArc[rotate,color=red](O,A)(180) + \tkzDrawPoints(O,A,B) + \tkzLabelPoints[below](O,A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{R}} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=0.75] + \tkzDefPoints{0/0/O} + \tkzSetUpCompass[<->] + \tkzDrawArc[R,color=teal,double](O,3)(270,360) + \tkzDrawArc[R,color=orange,double](O,2)(0,270) + \tkzDrawPoint(O) + \tkzLabelPoint[below](O){$O$} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{R with nodes}} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=0.75] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,-1){A} + \tkzDefPoint(1,1){B} + \tkzCalcLength(B,A)\tkzGetLength{radius} + \tkzDrawArc[R with nodes](B,\radius)(A,O) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{delta}} +This option allows a bit like \tkzcname{tkzCompass} to place an arc and overflow on either side. delta is a measure in degrees. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDefPoint(3,0){B} + \tkzDefPointBy[rotation= center A angle 60](B) + \tkzGetPoint{C} + \begin{scope}% style only local + \tkzDefPointBy[symmetry= center C](A) + \tkzGetPoint{D} + \tkzDrawSegments(A,B A,D) + \tkzDrawLine(B,D) + \tkzSetUpCompass[color=orange] + \tkzDrawArc[orange,delta=10](A,B)(C) + \tkzDrawArc[orange,delta=10](B,C)(A) + \tkzDrawArc[orange,delta=10](C,D)(D) + \end{scope} + + \tkzDrawPoints(A,B,C,D) + \tkzLabelPoints(A,B,C,D) + \tkzMarkRightAngle(D,B,A) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{angles}: example 1} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){A} + \tkzDefPoint(5,0){B} + \tkzDefPoint(2.5,0){O} + \tkzDefPointBy[rotation=center O angle 60](B) + \tkzGetPoint{D} + \tkzDefPointBy[symmetry=center D](O) + \tkzGetPoint{E} + \begin{scope} + \tkzDrawArc[angles](O,B)(0,180) + \tkzDrawArc[angles,](B,O)(100,180) + \tkzCompass[delta=20](D,E) + \tkzDrawLines(A,B O,E B,E) + \tkzDrawPoints(A,B,O,D,E) + \end{scope} + \tkzLabelPoints(A,B,O,D,E) + \tkzMarkRightAngle(O,B,E) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{angles}: example 2} + +\begin{tkzexample}[latex=6cm,small] + \begin{tikzpicture} + \tkzDefPoint(0,0){O} + \tkzDefPoint(5,0){I} + \tkzDefPoint(0,5){J} + \tkzInterCC(O,I)(I,O)\tkzGetPoints{B}{C} + \tkzInterCC(O,I)(J,O)\tkzGetPoints{D}{A} + \tkzInterCC(I,O)(J,O)\tkzGetPoints{L}{K} + \tkzDrawArc[angles](O,I)(0,90) + \tkzDrawArc[angles,color=gray, + style=dashed](I,O)(90,180) + \tkzDrawArc[angles,color=gray, + style=dashed](J,O)(-90,0) + \tkzDrawPoints(A,B,K) + \foreach \point in {I,A,B,J,K}{% + \tkzDrawSegment(O,\point)} + \end{tikzpicture} +\end{tkzexample} + +%<----------------------------------------------------------------------------> +% SECTOR +%<----------------------------------------------------------------------------> + +\section{Drawing a sector or sectors} +\subsection{\tkzcname{tkzDrawSector}} +\tkzHandBomb\ Attention the arguments vary according to the options. +\begin{NewMacroBox}{tkzDrawSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{towards}{towards}{$O$ is the center and the arc from $A$ to $(OB)$} +\TOline{rotate} {towards}{the arc starts from $A$ and the angle determines its length } +\TOline{R}{towards}{We give the radius and two angles} +\TOline{R with nodes}{towards}{We give the radius and two points} +\bottomrule +\end{tabular} + +You have to add, of course, all the styles of \TIKZ\ for tracings... + +\begin{tabular}{lll}% +\toprule +options & arguments & example \\ +\midrule +\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzDrawSector(O,A)(B)}} +\TOline{rotate} {\parg{pt,pt}\parg{an}}{\tkzcname{tkzDrawSector[rotate,color=red](O,A)(90)}} +\TOline{R}{\parg{pt,$r$}\parg{an,an}}{\tkzcname{tkzDrawSector[R,color=teal](O,2)(30,90)}} +\TOline{R with nodes}{\parg{pt,$r$}\parg{pt,pt}}{\tkzcname{tkzDrawSector[R with nodes](O,2)(A,B)}} +\end{tabular} +\end{NewMacroBox} + +Here are a few examples: + +\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{towards}} +There's no need to put \tkzname{towards}. You can use \tkzname{fill} as an option. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){O} + \tkzDefPoint(-30:3){A} + \tkzDefPointBy[rotation = center O angle -60](A) + \tkzDrawSector(O,A)(tkzPointResult) + \begin{scope}[shift={(-60:1)}] + \tkzDefPoint(0,0){O} + \tkzDefPoint(-30:3){A} + \tkzDefPointBy[rotation = center O angle -60](A) + \tkzDrawSector(O,tkzPointResult)(A) + \end{scope} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{rotate}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=2] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,2){A} + \tkzDrawSector[rotate,draw=orange!50!black](O,A)(30) + \tkzDrawSector[rotate,draw=teal!50!black](O,A)(-30) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{R}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1.25] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2,-1){A} + \tkzDrawSector[R](O,2)(30,90) + \tkzDrawSector[R](O,2)(90,180) + \tkzDrawSector[R](O,2)(180,270) + \tkzDrawSector[R](O,2)(270,360) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{R}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1.25] + \tkzDefPoint(0,0){O} + \tkzDefPoint(4,-2){A} + \tkzDefPoint(4,1){B} + \tkzDefPoint(3,3){C} + \tkzDrawSector[R with nodes,% + fill=teal!20](O,1)(B,C) + \tkzDrawSector[R with nodes,% + fill=orange!20](O,1.25)(A,B) +\tkzDrawSegments(O,A O,B O,C) +\tkzDrawPoints(O,A,B,C) +\tkzLabelPoints(A,B,C) +\tkzLabelPoints[left](O) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{R with nodes}} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} [scale=.4] + \tkzDefPoints{-1/-2/A,1/3/B} + \tkzDefRegPolygon[side,sides=6](A,B) + \tkzGetPoint{O} + \tkzDrawPolygon[fill=black!10, draw=blue](P1,P...,P6) + \tkzLabelRegPolygon[sep=1.05](O){A,...,F} + \tkzDrawCircle[dashed](O,A) + \tkzLabelSegment[above,sloped, + midway](A,B){\(A B = 16m\)} + \foreach \i [count=\xi from 1] in {2,...,6,1} + {% + \tkzDefMidPoint(P\xi,P\i) + \path (O) to [pos=1.1] node {\xi} (tkzPointResult) ; + } + \tkzDefRandPointOn[segment = P3--P5] + \tkzGetPoint{S} + \tkzDrawSegments[thick,dashed,red](A,S S,B) + \tkzDrawPoints(P1,P...,P6,S) + \tkzLabelPoint[left,above](S){$S$} + \tkzDrawSector[R with nodes,fill=red!20](S,2)(A,B) + \tkzLabelAngle[pos=1.5](A,S,B){$\alpha$} +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-elements.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-elements.tex new file mode 100644 index 0000000000..c2ab8f9bf2 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-elements.tex @@ -0,0 +1,166 @@ + +\section{The Elements of tkz code} + +To work with my package, you need to have notions of \LATEX\ as well as \TIKZ. + +In this paragraph, we start looking at the "rules" and "symbols" used to create a figure with \tkzname{\tkznameofpack}. + +\subsection{Objects and language} + + The primitive objects are points. You can refer to a point at any time using the name given when defining it. (it is possible to assign a different name later on). + +To get new points you will use macros. \tkzname{\tkznameofpack} macros have a name beginning with tkz. There are four main categories starting with: +|\tkzDef...| |\tkzDraw...| |\tkzMark...| and |\tkzLabel...|. +The used points are passed as parameters between parentheses while the created points are between braces. + +Le code des figures est placés dans un environnement \tkzimp{tikzpicture} + +\begin{tkzltxexample}[] + \begin{tikzpicture} + code ... + \end{tikzpicture} + \end{tkzltxexample} + + Contrary to \TIKZ, you should not end a macro with ";". We thus lose the important notion which is the \tkzimp{path}. However, it is possible to place some code between the macros \tkzname{\tkznameofpack}. + + +Among the first category, |\tkzDefPoint| allows you to define fixed points. It will be studied in detail later. Here we will see in detail the macro |\tkzDefTriangle|. + +This macro makes it possible to associate to a pair of points a third point in order to define a certain triangle |\tkzDefTriangle(A,B)|. The obtained point is referenced |tkzPointResult| and it is possible to choose another reference with |\tkzGetPoint{C}| for example. + +|\tkzDefTriangle[euclid](A,B) \tkzGetPoint{C}| + +Parentheses are used to pass arguments. In |(A,B)| $A$ and $B$ are the points with which a third will be defined. However, in |{C}| we use braces to retrieve the new point. + +In order to choose a certain type of triangle among the following choices: + |equilateral|, |isosceles right|, |half|, |pythagoras|, |school|, |golden or sublime|, |euclid|, |gold|, |cheops|... + and |two angles| you just have to choose between hooks, for example: + + + +\begin{minipage}{0.5\textwidth} + \begin{tikzpicture}[scale=.5] + \tkzDefPoints{0/0/A,8/0/B} + \foreach \tr in {euclid, gold} + {\tkzDefTriangle[\tr](A,B) \tkzGetPoint{C} + \tkzDrawPoint(C) + \tkzLabelPoint[right](C){\tr} + \tkzDrawSegments(A,C C,B)} + \tkzDrawPoints(A,B) + \tkzDrawSegments(A,B) + \tkzLabelPoints(A,B) + \end{tikzpicture} +\end{minipage} +\begin{minipage}{0.5\textwidth} + \begin{tkzexample}[code only,small] + \begin{tikzpicture}[scale=.5] + \tkzDefPoints{0/0/A,8/0/B} + \foreach \tr in {euclid,gold} + {\tkzDefTriangle[\tr](A,B) \tkzGetPoint{C} + \tkzDrawPoint(C) + \tkzLabelPoint[right](C){\tr} + \tkzDrawSegments(A,C C,B)} + \tkzDrawPoints(A,B) + \tkzDrawSegments(A,B) + \tkzLabelPoints(A,B) + \end{tikzpicture} + \end{tkzexample} +\end{minipage} + + +\subsection{Notations and conventions} + +I deliberately chose to use the geometric French and personal conventions to describe the geometric objects represented. The objects defined and represented by \tkzname{\tkznameofpack} are points, lines and circles located in a plane. They are the primary objects of Euclidean geometry from which we will construct figures. + +According to \tkzimp{Euclid}, these figures will only illustrate pure ideas produced by our brain. +Thus a point has no dimension and therefore no real existence. In the same way the line has no width and therefore no existence in the real world. The objects that we are going to consider are only representations of ideal mathematical objects. \tkzname{\tkznameofpack} will follow the steps of the ancient Greeks to obtain geometrical constructions using the ruler and the compass. + +Here are the notations that will be used: + + +\begin{itemize} +\item The points are represented geometrically either by a small disc or by the intersection of two lines (two straight lines, a straight line and a circle or two circles). In this case, the point is represented by a cross. + +\begin{tkzexample}[latex=6cm, small] + \begin{tikzpicture} + \tkzDefPoints{0/0/A,4/2/B} + \tkzDrawPoints(A,B) + \tkzLabelPoints(A,B) + \end{tikzpicture} +\end{tkzexample} + +or else + +\begin{tkzexample}[latex=6cm, small] + \begin{tikzpicture} + \tkzSetUpPoint[shape=cross, color=red] + \tkzDefPoints{0/0/A,4/2/B} + \tkzDrawPoints(A,B) + \tkzLabelPoints(A,B) + \end{tikzpicture} + \end{tkzexample} + +The existence of a point being established, we can give it a label which will be a capital letter (with some exceptions) of the Latin alphabet such as $A$, $B$ or $C$. For example: +\begin{itemize} +\item $O$ is a center for a circle, a rotation, etc.; +\item $M$ defined a midpoint; +\item $H$ defined the foot of an altitude; +\item $P'$ is the image of $P$ by a transformation ; +\end{itemize} + +It is important to note that the reference name of a point in the code may be different from the label to designate it in the text. So we can define a point A and give it as label $P$. In particular the style will be different, point A will be labeled $A$. + +\begin{tkzexample}[latex=6cm, small] + \begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDrawPoints(A) + \tkzLabelPoint(A){$P$} + \end{tikzpicture} +\end{tkzexample} + +Exceptions: some points such as the middle of the sides of a triangle share a characteristic, so it is normal that their names also share a common character. We will designate these points by $M_a$, $M_b$ and $M_c$ or $M_A$, $M_B$ and $M_C$. + +In the code, these points will be referred to as: M\_A, M\_B and M\_C. + +Another exception relates to intermediate construction points which will not be labelled. They will often be designated by a lowercase letter in the code. + +\item The line segments are designated by two points representing their ends in square brackets: $[AB]$. + +\item The straight lines are in Euclidean geometry defined by two points so $A$ and $B$ define the straight line $(AB)$. We can also designate this stright line using the Greek alphabet and name it $(\delta)$ or $(\Delta)$. It is also possible to designate the straight line with lowercase letters such as $d$ and $d'$. + +\item The semi-straight line is designated as follows $[AB)$. + + +\item Relation between the straight lines. Two perpendicular $(AB)$ and $(CD)$ lines will be written $(AB) \perp (CD)$ and if they are parallel we will write $(AB) \parallelslant (CD)$. + +\item The lengths of the sides of triangle ABC are $AB$, $AC$ and $BC$. The numbers are also designated by a lowercase letter so we will write: $AB=c$, $AC=b$ and $BC=a$. The letter $a$ is also used to represent an angle, and $r$ is frequently used to represent a radius, $d$ a diameter, $l$ a length, $d$ a distance. + +\item Polygons are designated afterwards by their vertices so $ABC$ is a triangle, $EFGH$ a quadrilateral. + +\item Angles are generally measured in degrees (ex $60^\circ$) and in an equilateral $ABC$ triangle we will write $\widehat{ABC}=\widehat{B}=60^\circ$. + +\item The arcs are designated by their extremities. For example if $A$ and $B$ are two points of the same circle then $\widearc{AB}$. + + +\item Circles are noted either $\mathcal{C}$ if there is no possible confusion or $\mathcal{C}$ $(O~;~A)$ for a circle with center $O$ and passing through the point $A$ or $\mathcal{C}$ $(O~;~1)$ for a circle with center O and radius 1 cm. + +\item Name of the particular lines of a triangle: I used the terms bisector, bisector out, mediator (sometimes called perpendicular bisectors), altitude, median and symmedian. + +\item ($x_1$,$y_1$) coordinates of the point $A_1$, ($x_A$,$y_A$) coordinates of the point $A$. + +\end{itemize} + + +\subsection{\tkzname{Set, Calculate, Draw, Mark, Label}} +The title could have been: \texttt{Separation of Calculus and Drawings} + +When a document is prepared using the \LATEX\ system, the source code of the document can be divided into two parts: the document body and the preamble. +Under this methodology, publications can be structured, styled and typeset with minimal effort. +I propose a similar methodology for creating figures with \tkzname{\tkznameofpack}. + +The first part defines the fixed points, the second part allows the creation of new points. \tkzname{Set and Calculate} are the two main parts. All that is left to do is to draw (or fill), mark and label. It is possible that \tkzname{\tkznameofpack} is insufficient for some of these latter actions but you can use \TIKZ + +One last remark that I think is important, it is best to avoid introducing coordinates within a code as much as possible. I think that the coordinates should appear at the beginning of the code with the fixed points. Then the use of references is recommended. Most macros have the option \tkzname{nodes} or \tkzname{with nodes}. + +I also think it's best to define the styles of the different objects from the beginning. +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-examples.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-examples.tex new file mode 100644 index 0000000000..79b340b5db --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-examples.tex @@ -0,0 +1,1327 @@ + +\section{Some interesting examples} + +\subsection{Square root of the integers} +\begin{tikzpicture} +\node [mybox,title={Square root of the integers}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{How to get $1$, $\sqrt{2}$, $\sqrt{3}$ with a rule and a compass. +}} +\end{minipage} +}; +\end{tikzpicture} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){O} + \tkzDefPoint(1,0){a0} + \tkzDrawSegment(O,a0) + \foreach \i [count=\j] in {0,...,16}{% + \tkzDefPointWith[orthogonal normed](a\i,O) + \tkzGetPoint{a\j} + \pgfmathsetmacro{\c}{5*\i} + \tkzDrawPolySeg[fill=teal!\c](a\i,a\j,O)} + \end{tikzpicture} +\end{tkzexample} + +\subsection{About right triangle} +\begin{tikzpicture} +\node [mybox,title={About right triangle}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{We have a segment $[AB]$ and we want to determine a point $C$ such that $AC=8$~cm and $ABC$ is a right triangle in $B$. +}} +\end{minipage} +}; +\end{tikzpicture} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint["$A$" left](2,1){A} + \tkzDefPoint["$B$" right](6,4){B} + \tkzDefPointWith[orthogonal,K=-1](B,A) + \tkzDrawLine[add = .5 and .5](B,tkzPointResult) + \tkzInterLC[R](B,tkzPointResult)(A,8) + \tkzGetPoints{C}{J} + \tkzDrawSegment(A,B) + \tkzDrawPoints(A,B,C) + \tkzCompass(A,C) + \tkzMarkRightAngle(A,B,C) + \tkzDrawLine[color=gray,style=dashed](A,C) + \tkzLabelPoint[above](C){$C$} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Archimedes} +\begin{tikzpicture} +\node [mybox,title={Archimedes}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{This is an ancient problem proved by the great Greek mathematician Archimedes . +The figure below shows a semicircle, with diameter $AB$. A tangent line is drawn and touches the semicircle at $B$. An other tangent line at a point, $C$, on the semicircle is drawn. We project the point $C$ on the line segment $[AB]$ on a point $D$. The two tangent lines intersect at the point $T$. Prove that the line $(AT)$ bisects $(CD)$ +}} +\end{minipage} +}; +\end{tikzpicture} + +\begin{tkzexample}[] +\begin{tikzpicture}[scale=1] + \tkzDefPoint(0,0){A}\tkzDefPoint(6,0){D} + \tkzDefPoint(8,0){B}\tkzDefPoint(4,0){I} + \tkzDefLine[orthogonal=through D](A,D) + \tkzInterLC[R](D,tkzPointResult)(I,4) \tkzGetFirstPoint{C} + \tkzDefLine[orthogonal=through C](I,C) \tkzGetPoint{c} + \tkzDefLine[orthogonal=through B](A,B) \tkzGetPoint{b} + \tkzInterLL(C,c)(B,b) \tkzGetPoint{T} + \tkzInterLL(A,T)(C,D) \tkzGetPoint{P} + \tkzDrawArc(I,B)(A) + \tkzDrawSegments(A,B A,T C,D I,C) \tkzDrawSegment[new](I,C) + \tkzDrawLine[add = 1 and 0](C,T) \tkzDrawLine[add = 0 and 1](B,T) + \tkzMarkRightAngle(I,C,T) + \tkzDrawPoints(A,B,I,D,C,T) + \tkzLabelPoints(A,B,I,D) \tkzLabelPoints[above right](C,T) + \tkzMarkSegment[pos=.25,mark=s|](C,D) \tkzMarkSegment[pos=.75,mark=s|](C,D) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsubsection{Square and rectangle of same area; Golden section} + +\begin{tikzpicture} +\node [mybox,title={Book II, proposition XI \_Euclid's Elements\_}] (box){% + \begin{minipage}{0.90\textwidth} +{\emph{To construct Square and rectangle of same area.} +} + \end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){D} \tkzDefPoint(8,0){A} + \tkzDefSquare(D,A) \tkzGetPoints{B}{C} + \tkzDefMidPoint(D,A) \tkzGetPoint{E} + \tkzInterLC(D,A)(E,B)\tkzGetSecondPoint{F} + \tkzInterLC(A,B)(A,F)\tkzGetSecondPoint{G} + \tkzDefSquare(A,F)\tkzGetFirstPoint{H} + \tkzInterLL(C,D)(H,G)\tkzGetPoint{I} + \tkzFillPolygon[teal!10](I,G,B,C) + \tkzFillPolygon[teal!10](A,F,H,G) + \tkzDrawArc[angles](E,B)(0,120) + \tkzDrawSemiCircle(A,F) + \tkzDrawSegments(A,F E,B H,I F,H) + \tkzDrawPolygons(A,B,C,D) + \tkzDrawPoints(A,...,I) + \tkzLabelPoints(A,...,I) +\end{tikzpicture} +\end{tkzexample} + +\newpage + +\subsubsection{Steiner Line and Simson Line} + +\begin{tikzpicture} +\node [mybox,title={Steiner Line and Simson Line}] (box){% + \begin{minipage}{0.90\textwidth} +{\emph{Consider the triangle ABC and a point M on its circumcircle. The projections of M on the sides of the triangle are on a line (Steiner Line), The three closest points to M on lines AB, AC, and BC are collinear. It's the Simson Line. +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75,rotate=-20] + \tkzDefPoint(0,0){B} + \tkzDefPoint(2,4){A} \tkzDefPoint(7,0){C} + \tkzDefCircle[circum](A,B,C) + \tkzGetPoint{O} + \tkzDrawCircle(O,A) + \tkzCalcLength(O,A) + \tkzGetLength{rOA} + \tkzDefShiftPoint[O](40:\rOA){M} + \tkzDefShiftPoint[O](60:\rOA){N} + \tkzDefTriangleCenter[orthic](A,B,C) + \tkzGetPoint{H} + \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c} + \tkzDefPointsBy[reflection=over A--B](M,N){P,P'} + \tkzDefPointsBy[reflection=over A--C](M,N){Q,Q'} + \tkzDefPointsBy[reflection=over C--B](M,N){R,R'} + \tkzDefMidPoint(M,P)\tkzGetPoint{I} + \tkzDefMidPoint(M,Q)\tkzGetPoint{J} + \tkzDefMidPoint(M,R)\tkzGetPoint{K} + \tkzDrawSegments[new](P,R M,P M,Q M,R N,P'% + N,Q' N,R' P',R' I,K) + \tkzDrawPolygons(A,B,C) + \tkzDrawPoints(A,B,C,H,M,N,P,Q,R,P',Q',R',I,J,K) + \tkzLabelPoints(A,B,C,H,M,N,P,Q,R,P',Q',R',I,J,K) +\end{tikzpicture} + +\end{tkzexample} + + +\newpage +\subsection{Lune of Hippocrates} + +\begin{tikzpicture} +\node [mybox,title={Lune of Hippocrates}] (box){% +\begin{minipage}{0.90\textwidth} + { \emph{From wikipedia : In geometry, the lune of Hippocrates, named after Hippocrates of Chios, is a lune bounded by arcs of two circles, the smaller of which has as its diameter a chord spanning a right angle on the larger circle.In the first figure, the area of the lune is equal to the area of the triangle ABC. Hippocrates of Chios (ancient Greek mathematician,) +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzInit[xmin=-2,xmax=5,ymin=-1,ymax=6] + \tkzClip % allows you to define a bounding box + % large enough + \tkzDefPoint(0,0){A}\tkzDefPoint(4,0){B} + \tkzDefSquare(A,B) + \tkzGetFirstPoint{C} + \tkzDrawPolygon[fill=green!5](A,B,C) + \begin{scope} + \tkzClipCircle[out](B,A) + \tkzDrawSemiCircle[diameter,fill=teal!5](A,C) + \end{scope} + \tkzDrawArc[delta=0](B,C)(A) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Lunes of Hasan Ibn al-Haytham} + +\begin{tikzpicture} +\node [mybox,title={Lune of Hippocrates}] (box){% +\begin{minipage}{0.90\textwidth} + { \emph{From wikipedia : the Arab mathematician Hasan Ibn al-Haytham (Latinized name Alhazen) showed that two lunes, formed on the two sides of a right triangle, whose outer boundaries are semicircles and whose inner boundaries are formed by the circumcircle of the triangle, then the areas of these two lunes added together are equal to the area of the triangle. The lunes formed in this way from a right triangle are known as the lunes of Alhazen. +}} +\end{minipage}}; +\end{tikzpicture}% + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5,rotate=180] + \tkzInit[xmin=-1,xmax=11,ymin=-4,ymax=7] + \tkzClip + \tkzDefPoints{0/0/A,8/0/B} + \tkzDefTriangle[pythagore](A,B) + \tkzGetPoint{C} + \tkzDrawPolygon[fill=green!5](A,B,C) + \tkzDefMidPoint(C,A) \tkzGetPoint{I} + \begin{scope} + \tkzClipCircle[out](I,A) + \tkzDrawSemiCircle[diameter,fill=teal!5](B,A) + \tkzDrawSemiCircle[diameter,fill=teal!5](C,B) + \end{scope} + \tkzSetUpCompass[/tkzcompass/delta=0] + \tkzDrawSemiCircle[diameter](C,A) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{About clipping circles}\label{About clipping circles} +\begin{tikzpicture} +\node [mybox,title={About clipping circles}] (box){% +\begin{minipage}{0.90\textwidth} + { \emph{The problem is the management of the bounding box. First you have to define a rectangle in which the figure will be inserted. This is done with the first two lines. +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzInit[xmin=0,xmax=6,ymin=0,ymax=6] + \tkzClip + \tkzDefPoints{0/0/A, 6/0/B} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzDefMidPoint(A,B) \tkzGetPoint{M} + \tkzDefMidPoint(A,D) \tkzGetPoint{N} + \tkzDefMidPoint(B,C) \tkzGetPoint{O} + \tkzDefMidPoint(C,D) \tkzGetPoint{P} + \begin{scope} + \tkzClipCircle[out](M,B) \tkzClipCircle[out](P,D) + \tkzFillPolygon[teal!20](M,N,P,O) + \end{scope} + \begin{scope} + \tkzClipCircle[out](N,A) \tkzClipCircle[out](O,C) + \tkzFillPolygon[teal!20](M,N,P,O) + \end{scope} + \begin{scope} + \tkzClipCircle(P,C) \tkzClipCircle(N,A) + \tkzFillPolygon[teal!20](N,P,D) + \end{scope} + \begin{scope} + \tkzClipCircle(O,C) \tkzClipCircle(P,C) + \tkzFillPolygon[teal!20](P,C,O) + \end{scope} + \begin{scope} + \tkzClipCircle(M,B) \tkzClipCircle(O,B) + \tkzFillPolygon[teal!20](O,B,M) + \end{scope} + \begin{scope} + \tkzClipCircle(N,A) \tkzClipCircle(M,A) + \tkzFillPolygon[teal!20](A,M,N) + \end{scope} + \tkzDrawSemiCircles(M,B N,A O,C P,D) + \tkzDrawPolygons(A,B,C,D M,N,P,O) + \end{tikzpicture} + \end{tkzexample} + + + + +\newpage +\subsection{Similar isosceles triangles} + +\begin{tikzpicture} +\node [mybox,title={Similar isosceles triangles}] (box){% +\begin{minipage}{0.90\textwidth} + { \emph{The following is from the excellent site \textbf{Descartes et les Mathématiques}. I did not modify the text and I am only the author of the programming of the figures. +\url{http://debart.pagesperso-orange.fr/seconde/triangle.html} +}} +\end{minipage} +}; +\end{tikzpicture}% + + + +The following is from the excellent site \textbf{Descartes et les Mathématiques}. I did not modify the text and I am only the author of the programming of the figures. + +\url{http://debart.pagesperso-orange.fr/seconde/triangle.html} + +Bibliography: + +\begin{itemize} + +\item Géométrie au Bac - Tangente, special issue no. 8 - Exercise 11, page 11 + + +\item Elisabeth Busser and Gilles Cohen: 200 nouveaux problèmes du "Monde" - POLE 2007 (200 new problems of "Le Monde") + + +\item Affaire de logique n° 364 - Le Monde February 17, 2004 +\end{itemize} + + +Two statements were proposed, one by the magazine \textit{Tangente} and the other by \textit{Le Monde}. + +\vspace*{2cm} +\emph{Editor of the magazine "Tangente"}: \textcolor{orange}{Two similar isosceles triangles $AXB$ and $BYC$ are constructed with main vertices $X$ and $Y$, such that $A$, $B$ and $C$ are aligned and that these triangles are "indirect". Let $\alpha$ be the angle at vertex $\widehat{AXB}$ = $\widehat{BYC}$. We then construct a third isosceles triangle $XZY$ similar to the first two, with main vertex $Z$ and "indirect". +We ask to demonstrate that point $Z$ belongs to the straight line $(AC)$.} + +\vspace*{2cm} +\emph{Editor of "Le Monde"}: \textcolor{orange}{We construct two similar isosceles triangles $AXB$ and $BYC$ with principal vertices $X$ and $Y$, such that $A$, $B$ and $C$ are aligned and that these triangles are "indirect". Let $\alpha$ be the angle at vertex $\widehat{AXB}$ = $\widehat{BYC}$. The point Z of the line segment $[AC]$ is equidistant from the two vertices $X$ and $Y$.\\ +At what angle does he see these two vertices?} + +\vspace*{2cm} The constructions and their associated codes are on the next two pages, but you can search before looking. The programming respects (it seems to me ...) my reasoning in both cases. + + \subsection{Revised version of "Tangente"} +\begin{tkzexample}[] +\begin{tikzpicture}[scale=.8,rotate=60] + \tkzDefPoint(6,0){X} \tkzDefPoint(3,3){Y} + \tkzDefShiftPoint[X](-110:6){A} \tkzDefShiftPoint[X](-70:6){B} + \tkzDefShiftPoint[Y](-110:4.2){A'} \tkzDefShiftPoint[Y](-70:4.2){B'} + \tkzDefPointBy[translation= from A' to B ](Y) \tkzGetPoint{Y} + \tkzDefPointBy[translation= from A' to B ](B') \tkzGetPoint{C} + \tkzInterLL(A,B)(X,Y) \tkzGetPoint{O} + \tkzDefMidPoint(X,Y) \tkzGetPoint{I} + \tkzDefPointWith[orthogonal](I,Y) + \tkzInterLL(I,tkzPointResult)(A,B) \tkzGetPoint{Z} + \tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O} + \tkzDrawCircle(O,X) + \tkzDrawLines[add = 0 and 1.5](A,C) \tkzDrawLines[add = 0 and 3](X,Y) + \tkzDrawSegments(A,X B,X B,Y C,Y) \tkzDrawSegments[color=red](X,Z Y,Z) + \tkzDrawPoints(A,B,C,X,Y,O,Z) + \tkzLabelPoints(A,B,C,Z) \tkzLabelPoints[above right](X,Y,O) +\end{tikzpicture} +\end{tkzexample} + +\subsection{"Le Monde" version} + +\begin{tkzexample}[] +\begin{tikzpicture}[scale=1.25] + \tkzDefPoint(0,0){A} + \tkzDefPoint(3,0){B} + \tkzDefPoint(9,0){C} + \tkzDefPoint(1.5,2){X} + \tkzDefPoint(6,4){Y} + \tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O} + \tkzDefMidPoint(X,Y) \tkzGetPoint{I} + \tkzDefPointWith[orthogonal](I,Y) \tkzGetPoint{i} + \tkzDrawLines[add = 2 and 1,color=orange](I,i) + \tkzInterLL(I,i)(A,B) \tkzGetPoint{Z} + \tkzInterLC(I,i)(O,B) \tkzGetSecondPoint{M} + \tkzDefPointWith[orthogonal](B,Z) \tkzGetPoint{b} + \tkzDrawCircle(O,B) + \tkzDrawLines[add = 0 and 2,color=orange](B,b) + \tkzDrawSegments(A,X B,X B,Y C,Y A,C X,Y) + \tkzDrawSegments[color=red](X,Z Y,Z) + \tkzDrawPoints(A,B,C,X,Y,Z,M,I) + \tkzLabelPoints(A,B,C,Z) + \tkzLabelPoints[above right](X,Y,M,I) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Triangle altitudes} + +\begin{tikzpicture} +\node [mybox,title={Triangle altitudes}] (box){% +\begin{minipage}{0.90\textwidth} + { \emph{From Wikipedia : The following is again from the excellent site \textbf{Descartes et les Mathématiques} (Descartes and the Mathematics). +\url{http://debart.pagesperso-orange.fr/geoplan/geometrie_triangle.html}. +The three altitudes of a triangle intersect at the same H-point. +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[vbox,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){C} \tkzDefPoint(7,0){B} + \tkzDefPoint(5,6){A} + \tkzDefMidPoint(C,B) \tkzGetPoint{I} + \tkzInterLC(A,C)(I,B) + \tkzGetSecondPoint{B'} + \tkzInterLC(A,B)(I,B) + \tkzGetFirstPoint{C'} + \tkzInterLL(B,B')(C,C') \tkzGetPoint{H} + \tkzInterLL(A,H)(C,B) \tkzGetPoint{A'} + \tkzDefCircle[circum](A,B',C') \tkzGetPoint{O} + \tkzDrawArc(I,B)(C) + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle[color=red](O,A) + \tkzDrawSegments[color=orange](B,B' C,C' A,A') + \tkzMarkRightAngles(C,B',B B,C',C C,A',A) + \tkzDrawPoints(A,B,C,A',B',C',H) + \tkzLabelPoints(A,B,C,A',B',C',H) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Altitudes - other construction} + +\begin{tkzexample}[vbox,small] +\begin{tikzpicture} +\tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B} +\tkzDefPoint(5,6){C} +\tkzDefMidPoint(A,B)\tkzGetPoint{O} +\tkzDefPointBy[projection=onto A--B](C) \tkzGetPoint{P} +\tkzInterLC(C,A)(O,A) +\tkzGetSecondPoint{M} +\tkzInterLC(C,B)(O,A) +\tkzGetFirstPoint{N} +\tkzInterLL(B,M)(A,N)\tkzGetPoint{I} +\tkzDrawCircles[diameter](A,B I,C) +\tkzDrawSegments(C,A C,B A,B B,M A,N) +\tkzMarkRightAngles[fill=brown!20](A,M,B A,N,B A,P,C) +\tkzDrawSegment[style=dashed,color=orange](C,P) +\tkzLabelPoints(O,A,B,P) +\tkzLabelPoint[left](M){$M$} +\tkzLabelPoint[right](N){$N$} +\tkzLabelPoint[above](C){$C$} +\tkzLabelPoint[above right](I){$I$} +\tkzDrawPoints[color=red](M,N,P,I) +\tkzDrawPoints[color=brown](O,A,B,C) +\end{tikzpicture} +\end{tkzexample} + + +\newpage +\subsection{Three circles in an Equilateral Triangle } +\begin{tikzpicture} +\node [mybox,title={Three circles in an Equilateral Triangle}] (box){% +\begin{minipage}{0.90\textwidth} + { \emph{From Wikipedia : In geometry, the Malfatti circles are three circles inside a given triangle such that each circle is tangent to the other two and to two sides of the triangle. They are named after Gian Francesco Malfatti, who made early studies of the problem of constructing these circles in the mistaken belief that they would have the largest possible total area of any three disjoint circles within the triangle. Below is a study of a particular case with an equilateral triangle and three identical circles. +}} +\end{minipage} +}; +\end{tikzpicture}% +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.8] + \tkzDefPoints{0/0/A,8/0/B,0/4/a,8/4/b,8/8/c} + \tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C} + \tkzDefMidPoint(A,B) \tkzGetPoint{M} + \tkzDefMidPoint(B,C) \tkzGetPoint{N} + \tkzDefMidPoint(A,C) \tkzGetPoint{P} + \tkzInterLL(A,N)(M,a) \tkzGetPoint{Ia} + \tkzDefPointBy[projection = onto A--B](Ia) + \tkzGetPoint{ha} + \tkzInterLL(B,P)(M,b) \tkzGetPoint{Ib} + \tkzDefPointBy[projection = onto A--B](Ib) + \tkzGetPoint{hb} + \tkzInterLL(A,c)(M,C) \tkzGetPoint{Ic} + \tkzDefPointBy[projection = onto A--C](Ic) + \tkzGetPoint{hc} + \tkzInterLL(A,Ia)(B,Ib) \tkzGetPoint{G} + \tkzDefSquare(A,B) \tkzGetPoints{D}{E} + \tkzDrawPolygon(A,B,C) + \tkzClipBB + \tkzDrawSemiCircles[gray,dashed](M,B A,M + A,B B,A G,Ia) + \tkzDrawCircles[gray](Ia,ha Ib,hb Ic,hc) + \tkzDrawPolySeg(A,E,D,B) + \tkzDrawPoints(A,B,C,G,Ia,Ib,Ic) + \tkzDrawSegments[gray,dashed](C,M A,N B,P + M,a M,b A,a a,b b,B A,D Ia,ha) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Law of sines} +\begin{tikzpicture} +\node [mybox,title={Law of sines}] (box){% +\begin{minipage}{0.90\textwidth} + {From wikipedia : \emph{In trigonometry, the law of sines, sine law, sine formula, or sine rule is an equation relating the lengths of the sides of a triangle (any shape) to the sines of its angles. +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture} + \tkzDefPoints{0/0/A,5/1/B,2/6/C} + \tkzDefTriangleCenter[circum](A,B,C) + \tkzGetPoint{O} + \tkzDefPointBy[symmetry= center O](B) + \tkzGetPoint{D} + \tkzDrawPolygon[color=brown](A,B,C) + \tkzDrawCircle(O,A) + \tkzDrawPoints(A,B,C,D,O) + \tkzDrawSegments[dashed](B,D A,D) + \tkzLabelPoint[left](D){$D$} + \tkzLabelPoint[below](A){$A$} + \tkzLabelPoint[above](C){$C$} + \tkzLabelPoint[right](B){$B$} + \tkzLabelPoint[below](O){$O$} + \tkzLabelSegment(B,C){$a$} + \tkzLabelSegment[left](A,C){$b$} + \tkzLabelSegment(A,B){$c$} + \end{tikzpicture} +\end{tkzexample} + + +In the triangle $ABC$ + +\begin{equation} +\frac{a}{\sin A} = \frac{b}{\sin B} =\frac{c}{\sin C} +\end{equation} + +\[\widehat{C} = \widehat{D}\] +\begin{equation} +\frac{c}{2R} = \sin D = \sin C +\end{equation} + +Then \[ \frac{c}{\sin C} = 2R\] + +\newpage +\subsection{Flower of Life} +\begin{tikzpicture} +\node [mybox,title={Book IV, proposition XI \_Euclid's Elements\_}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{Sacred geometry can be described as a belief system attributing a religious or cultural value to many of the fundamental forms of space and time. According to this belief system, the basic patterns of existence are perceived as sacred because in contemplating them one is contemplating the origin of all things. By studying the nature of these forms and their relationship to each other, one may seek to gain insight into the scientific, philosophical, psychological, aesthetic and mystical laws of the universe. +The Flower of Life is considered to be a symbol of sacred geometry, said to contain ancient, religious value depicting the fundamental forms of space and time. In this sense, it is a visual expression of the connections life weaves through all mankind, believed by some to contain a type of Akashic Record of basic information of all living things. +}} +\end{minipage} +}; +\end{tikzpicture}% + +One of the beautiful arrangements of circles found at the Temple of Osiris at Abydos, Egypt (Rawles 1997). \\ +Weisstein, Eric W. "Flower of Life." From MathWorld--A Wolfram Web Resource.\\ \url{http://mathworld.wolfram.com/FlowerofLife.html} + +\begin{tkzexample}[vbox,small] + \begin{tikzpicture}[scale=.75] + \tkzSetUpLine[line width=2pt,color=teal!80!black] + \tkzSetUpCompass[line width=2pt,color=teal!80!black] + \tkzDefPoint(0,0){O} \tkzDefPoint(2.25,0){A} + \tkzDrawCircle(O,A) + \foreach \i in {0,...,5}{ + \tkzDefPointBy[rotation= center O angle 30+60*\i](A)\tkzGetPoint{a\i} + \tkzDefPointBy[rotation= center {a\i} angle 120](O)\tkzGetPoint{b\i} + \tkzDefPointBy[rotation= center {a\i} angle 180](O)\tkzGetPoint{c\i} + \tkzDefPointBy[rotation= center {c\i} angle 120](a\i)\tkzGetPoint{d\i} + \tkzDefPointBy[rotation= center {c\i} angle 60](d\i)\tkzGetPoint{f\i} + \tkzDefPointBy[rotation= center {d\i} angle 60](b\i)\tkzGetPoint{e\i} + \tkzDefPointBy[rotation= center {f\i} angle 60](d\i)\tkzGetPoint{g\i} + \tkzDefPointBy[rotation= center {d\i} angle 60](e\i)\tkzGetPoint{h\i} + \tkzDefPointBy[rotation= center {e\i} angle 180](b\i)\tkzGetPoint{k\i} + \tkzDrawCircle(a\i,O) + \tkzDrawCircle(b\i,a\i) + \tkzDrawCircle(c\i,a\i) + \tkzDrawArc[rotate](f\i,d\i)(-120) + \tkzDrawArc[rotate](e\i,d\i)(180) + \tkzDrawArc[rotate](d\i,f\i)(180) + \tkzDrawArc[rotate](g\i,f\i)(60) + \tkzDrawArc[rotate](h\i,d\i)(60) + \tkzDrawArc[rotate](k\i,e\i)(60) + } + \tkzClipCircle(O,f0) + \end{tikzpicture} +\end{tkzexample} + + +\newpage +\subsection{Pentagon in a circle} +\begin{tikzpicture} +\node [mybox,title={Book IV, proposition XI \_Euclid's Elements\_}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{To inscribe an equilateral and equiangular pentagon in a given circle. +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[code only, small] +\begin{tikzpicture} + \tkzDefPoint(0,0){O} \tkzDefPoint(5,0){A} + \tkzDefPoint(0,5){B} \tkzDefPoint(-5,0){C} + \tkzDefPoint(0,-5){D} + \tkzDefMidPoint(A,O) \tkzGetPoint{I} + \tkzInterLC(I,B)(I,A) \tkzGetPoints{F}{E} + \tkzInterCC(O,C)(B,E) \tkzGetPoints{D3}{D2} + \tkzInterCC(O,C)(B,F) \tkzGetPoints{D4}{D1} + \tkzDrawArc[angles](B,E)(180,360) + \tkzDrawArc[angles](B,F)(220,340) + \tkzDrawLine[add=.5 and .5](B,I) + \tkzDrawCircle(O,A) + \tkzDrawCircle[diameter](O,A) + \tkzDrawSegments(B,D C,A) + \tkzDrawPolygon[new](D,D1,D2,D3,D4) + \tkzDrawPoints(A,...,D,O) + \tkzDrawPoints[new](E,F,I,D1,D2,D4,D3) + \tkzLabelPoints(A,...,D,O) + \tkzLabelPoints[new](I,E,F,D1,D2,D4,D3) + \end{tikzpicture} +\end{tkzexample} + +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){O} + \tkzDefPoint(5,0){A} + \tkzDefPoint(0,5){B} + \tkzDefPoint(-5,0){C} + \tkzDefPoint(0,-5){D} + \tkzDefMidPoint(A,O) \tkzGetPoint{I} + \tkzInterLC(I,B)(I,A) \tkzGetPoints{F}{E} + \tkzInterCC(O,C)(B,E) \tkzGetPoints{D3}{D2} + \tkzInterCC(O,C)(B,F) \tkzGetPoints{D4}{D1} + \tkzDrawArc[angles](B,E)(180,360) + \tkzDrawArc[angles](B,F)(220,340) + \tkzDrawLine[add=.5 and .5](B,I) + \tkzDrawCircle(O,A) + \tkzDrawCircle[diameter](O,A) + \tkzDrawSegments(B,D C,A) + \tkzDrawPolygon[new](D,D1,D2,D3,D4) + \tkzDrawPoints(A,...,D,O) + \tkzDrawPoints[new](E,F,I,D1,D2,D4,D3) + \tkzLabelPoints(A,...,D,O) + \tkzLabelPoints[new](I,E,F,D1,D2,D4,D3) +\end{tikzpicture} + + \newpage + \subsection{Pentagon in a square} + \begin{tikzpicture} + \node [mybox,title={Pentagon in a square}] (box){% + \begin{minipage}{0.90\textwidth} + {: \emph{To inscribe an equilateral and equiangular pentagon in a given square. + }} + \end{minipage} + }; + \end{tikzpicture}% + +\begin{tkzexample}[code only, small] + \begin{tikzpicture} + \tkzDefPoint(-5,-5){A} \tkzDefPoint(0,0){O} + \tkzDefPoint(+5,-5){B} \tkzDefPoint(0,-5){F} + \tkzDefPoint(+5,0){F'} \tkzDefPoint(0,+5){E} \tkzDefPoint(-5,0){K} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzInterLC(D,C)(E,B) \tkzGetSecondPoint{T} + \tkzDefMidPoint(D,T) \tkzGetPoint{I} + \tkzInterCC[with nodes](O,D,I)(E,D,I) \tkzGetSecondPoint{H} + \tkzInterLC(O,H)(O,E) \tkzGetSecondPoint{M} + \tkzInterCC(O,E)(E,M) \tkzGetFirstPoint{Q} + \tkzInterCC[with nodes](O,O,E)(Q,E,M) \tkzGetFirstPoint{P} + \tkzInterCC[with nodes](O,O,E)(P,E,M) \tkzGetFirstPoint{N} + \tkzCompass(O,H) + \tkzCompass(E,H) + \tkzDrawArc(E,B)(T) + \tkzDrawPolygon(A,B,C,D) + \tkzDrawCircle(O,E) + \tkzDrawSegments[new](T,I O,H E,H E,F F',K) + \tkzDrawPoints(T,M,Q,P,N,I) + \tkzDrawPolygon[new](M,E,Q,P,N) + \tkzLabelPoints(A,B,O,N,P,Q,M,H) + \tkzLabelPoints[above right](C,D,E,I,T) +\end{tikzpicture} +\end{tkzexample} + + \begin{tikzpicture}[scale=.5] + \tkzDefPoint(-5,-5){A} + \tkzDefPoint(0,0){O} + \tkzDefPoint(+5,-5){B} + \tkzDefPoint(0,-5){F} + \tkzDefPoint(+5,0){F'} + \tkzDefPoint(0,+5){E} + \tkzDefPoint(-5,0){K} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzInterLC(D,C)(E,B) \tkzGetSecondPoint{T} + \tkzDefMidPoint(D,T) \tkzGetPoint{I} + \tkzInterCC[with nodes](O,D,I)(E,D,I) \tkzGetSecondPoint{H} + \tkzInterLC(O,H)(O,E) \tkzGetSecondPoint{M} + \tkzInterCC(O,E)(E,M) \tkzGetFirstPoint{Q} + \tkzInterCC[with nodes](O,O,E)(Q,E,M) \tkzGetFirstPoint{P} + \tkzInterCC[with nodes](O,O,E)(P,E,M) \tkzGetFirstPoint{N} + \tkzCompass(O,H) + \tkzCompass(E,H) + \tkzDrawArc(E,B)(T) + \tkzDrawPolygon(A,B,C,D) + \tkzDrawCircle(O,E) + \tkzDrawSegments(T,I O,H E,H) + \tkzDrawSegments(E,F F',K) + \tkzDrawPoints(T,M,Q,P,N,I) + \tkzDrawPolygon[color=purple](M,E,Q,P,N) + \tkzLabelPoints(A,B,O,N,P,Q,M,H) + \tkzLabelPoints[above right](C,D,E,I,T) +\end{tikzpicture} + +\newpage + \subsection{Hexagon Inscribed} + \begin{tikzpicture} + \node [mybox,title={Hexagon Inscribed}] (box){% + \begin{minipage}{0.90\textwidth} + {\emph{To inscribe a regular hexagon in a given equilateral triangle perfectly inside it (no boarders). + }} + \end{minipage} + }; + \end{tikzpicture}% + + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture}[scale=.5] + \pgfmathsetmacro{\c}{6} + \tkzDefPoints{0/0/A,\c/0/B} + \tkzDefTriangle[equilateral](A,B)\tkzGetPoint{C} + \tkzDefTriangleCenter[centroid](A,B,C) + \tkzGetPoint{I} + \tkzDefPointBy[homothety=center A ratio 1./3](B) + \tkzGetPoint{c1} + \tkzInterLC(B,C)(I,c1) \tkzGetPoints{a1}{a2} + \tkzInterLC(A,C)(I,c1) \tkzGetPoints{b1}{b2} + \tkzInterLC(A,B)(I,c1) \tkzGetPoints{c1}{c2} + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle[thin,orange](I,c1) + \tkzDrawPolygon[red,thick](a2,a1,b2,b1,c2,c1) + \end{tikzpicture} +\end{tkzexample} + +Another solution +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \pgfmathsetmacro{\c}{6} + \tkzDefPoints{0/0/A,\c/0/B} + \tkzDefTriangle[equilateral](A,B)\tkzGetPoint{C} + \tkzDefTriangleCenter[centroid](A,B,C) + \tkzGetPoint{I} + \tkzDefPointsBy[rotation= center I% + angle 60](A,B,C){a,b,c} + \tkzDrawPolygon[fill=teal!20,opacity=.5](A,B,C) + \tkzDrawPolygon[fill=purple!20,opacity=.5](a,b,c) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Power of a point with respect to a circle} + +\begin{tikzpicture} +\node [mybox,title={Power of a point with respect to a circle}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{$\overline{MA} \times \overline{MB}={MT}^2={MO}^2-{OT}^2$} } +\end{minipage} +}; +\end{tikzpicture}% +\begin{tkzexample}[vbox,small] +\begin{tikzpicture} + \pgfmathsetmacro{\r}{2}% + \pgfmathsetmacro{\xO}{6}% + \pgfmathsetmacro{\xE}{\xO-\r}% + \tkzDefPoints{0/0/M,\xO/0/O,\xE/0/E} + \tkzDefCircle[diameter](M,O) + \tkzGetPoint{I} + \tkzInterCC(I,O)(O,E) \tkzGetPoints{T}{T'} + \tkzDefShiftPoint[O](45:2){B} + \tkzInterLC(M,B)(O,E) \tkzGetPoints{A}{B} + \tkzDrawCircle(O,E) + \tkzDrawSemiCircle[dashed](I,O) + \tkzDrawLine(M,O) + \tkzDrawLines(M,T O,T M,B) + \tkzDrawPoints(A,B,T) + \tkzLabelPoints[above](A,B,O,M,T) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Radical axis of two non-concentric circles} +\begin{tikzpicture} +\node [mybox,title={Radical axis of two non-concentric circles}] (box){% +\begin{minipage}{0.90\textwidth} + {From Wikipedia : \emph{In geometry, the radical axis of two non-concentric circles is the set of points whose power with respect to the circles are equal. For this reason the radical axis is also called the power line or power bisector of the two circles. The notation radical axis was used by the French mathematician M. Chasles as axe radical. +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tikzpicture} +\tkzDefPoints{0/0/A,4/2/B,2/3/K} +\tkzDrawCircle[R](A,1)\tkzDrawCircle[R](B,2) +\tkzDrawCircle[R,dashed,new](K,3) +\tkzInterCC[R](A,1)(K,3) \tkzGetPoints{a}{a'} +\tkzInterCC[R](B,2)(K,3) \tkzGetPoints{b}{b'} +\tkzDrawLines[new,add=2 and 2](a,a') +\tkzDrawLines[new,add=1 and 1](b,b') +\tkzInterLL(a,a')(b,b') \tkzGetPoint{X} +\tkzDefPointBy[projection= onto A--B](X) \tkzGetPoint{H} +\tkzDrawPoints(A,B,H,X,a,b,a',b') +\tkzDrawLine(A,B) +\tkzDrawLine[add= 1 and 2,new](X,H) +\tkzLabelPoints(A,B,H,X,a,b,a',b') +\end{tikzpicture} + +\begin{tkzexample}[code only,small] + \begin{tikzpicture} + \tkzDefPoints{0/0/A,4/2/B,2/3/K} + \tkzInterCC[R](A,1)(K,3) \tkzGetPoints{a}{a'} + \tkzInterCC[R](B,2)(K,3) \tkzGetPoints{b}{b'} + \tkzDrawLines[color=red,add=2 and 2](a,a') + \tkzDrawLines[color=red,add=1 and 1](b,b') + \tkzInterLL(a,a')(b,b') \tkzGetPoint{X} + \tkzDefPointBy[projection= onto A--B](X) \tkzGetPoint{H} + \tkzDrawCircle[R](A,1)\tkzDrawCircle[R](B,2) + \tkzDrawCircle[R,dashed,orange](K,3) + \tkzDrawPoints(A,B,H,X,a,b,a',b') + \tkzDrawLine(A,B) + \tkzDrawLine[add= 1 and 2](X,H) + \tkzLabelPoints(A,B,H,X,a,b,a',b') + \end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{External homothetic center} +\begin{tikzpicture} +\node [mybox,title={External homothetic center}] (box){% +\begin{minipage}{0.90\textwidth} + {From Wikipedia : \emph{ Given two nonconcentric circles, draw radii parallel and in the same direction. Then the line joining the extremities of the radii passes through a fixed point on the line of centers which divides that line externally in the ratio of radii. This point is called the external homothetic center, or external center of similitude (Johnson 1929, pp. 19-20 and 41). +}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tikzpicture} +\tkzDefPoints{0/0/A,4/2/B,2/3/K} +\tkzDrawCircle[R](A,1)\tkzDrawCircle[R](B,2) +\tkzDrawLine(A,B) +\tkzDefShiftPoint[A](60:1){M} +\tkzDefShiftPoint[B](60:2){M'} +\tkzInterLL(A,B)(M,M') \tkzGetPoint{O} +\tkzDefTangent[from = O](B,M') \tkzGetPoints{X}{T'} +\tkzDefTangent[from = O](A,M) \tkzGetPoints{X}{T} +\tkzDrawPoints(A,B,O,T,T',M,M') +\tkzDrawLines[new](O,B O,T' O,M') +\tkzDrawSegments[new](A,M B,M') +\tkzLabelPoints(A,B,O,T,T',M,M') +\end{tikzpicture} + + +\begin{tkzexample}[code only,small] + \begin{tikzpicture} + \tkzDefPoints{0/0/A,4/2/B,2/3/K} + \tkzDefShiftPoint[A](60:1){M} + \tkzDefShiftPoint[B](60:2){M'} + \tkzInterLL(A,B)(M,M') \tkzGetPoint{O} + \tkzDefTangent[from = O](B,M') \tkzGetPoints{X}{T'} + \tkzDefTangent[from = O](A,M) \tkzGetPoints{X}{T} + \tkzDrawCircle[R](A,1)\tkzDrawCircle[R](B,2) + \tkzDrawLine(A,B) + \tkzDrawPoints(A,B,O,T,T',M,M') + \tkzDrawLines[new](O,B O,T' O,M') + \tkzDrawSegments[new](A,M B,M') + \tkzLabelPoints(A,B,O,T,T',M,M') + \end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Tangent lines to two circles} + +\begin{tikzpicture} +\node [mybox,title={Tangent lines to two circles}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{For two circles, there are generally four distinct lines that are tangent to both if the two circles are outside each other. For two of these, the external tangent lines, the circles fall on the same side of the line; the external tangent lines intersect in the external homothetic center}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tikzpicture} + \pgfmathsetmacro{\r}{1}% + \pgfmathsetmacro{\R}{2}% + \pgfmathsetmacro{\rt}{\R-\r}% + \tkzDefPoints{0/0/A,4/2/B,2/3/K} + \tkzDefMidPoint(A,B) \tkzGetPoint{I} + \tkzInterLC[R](A,B)(B,\rt) \tkzGetPoints{E}{F} + \tkzInterCC(I,B)(B,F) \tkzGetPoints{a}{a'} + \tkzInterLC[R](B,a)(B,\R) \tkzGetPoints{X'}{T'} + \tkzDefTangent[at=T'](B) \tkzGetPoint{h} + \tkzInterLL(T',h)(A,B) \tkzGetPoint{O} + \tkzInterLC[R](O,T')(A,\r) \tkzGetPoints{T}{T} + \tkzDrawCircle[R](A,\r) \tkzDrawCircle[R](B,\R) + \tkzDrawCircle[R,orange](B,\rt) \tkzDrawCircle[orange,dashed](I,B) + \tkzDrawPoints(O,A,B,a,a',E,F,T',T) + \tkzDrawLines(O,B A,a B,T' A,T) + \tkzDrawLines[add= 1 and 8](T',h) + \tkzLabelPoints(O,A,B,a,a',E,F,T,T') +\end{tikzpicture} + +\begin{tkzexample}[code only,small] + \begin{tikzpicture} + \pgfmathsetmacro{\r}{1}% + \pgfmathsetmacro{\R}{2}% + \pgfmathsetmacro{\rt}{\R-\r}% + \tkzDefPoints{0/0/A,4/2/B,2/3/K} + \tkzDefMidPoint(A,B) \tkzGetPoint{I} + \tkzInterLC[R](A,B)(B,\rt) \tkzGetPoints{E}{F} + \tkzInterCC(I,B)(B,F) \tkzGetPoints{a}{a'} + \tkzInterLC[R](B,a)(B,\R) \tkzGetPoints{X'}{T'} + \tkzDefTangent[at=T'](B) \tkzGetPoint{h} + \tkzInterLL(T',h)(A,B) \tkzGetPoint{O} + \tkzInterLC[R](O,T')(A,\r) \tkzGetPoints{T}{T} + \tkzDrawCircle[R](A,\r) \tkzDrawCircle[R](B,\R) + \tkzDrawCircle[R,orange](B,\rt) \tkzDrawCircle[orange,dashed](I,B) + \tkzDrawPoints(O,A,B,a,a',E,F,T',T) + \tkzDrawLines(O,B A,a B,T' A,T) + \tkzDrawLines[add= 1 and 8](T',h) + \tkzLabelPoints(O,A,B,a,a',E,F,T,T') + \end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Tangent lines to two circles with radical axis} + +\begin{tikzpicture} +\node [mybox,title={Tangent lines to two circles with radical axis}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{As soon as two circles are not concentric, we can construct their radical axis, the set of points of equal power with respect to the two circles. We know that the radical axis is a line orthogonal to the line of the centers. Note that if we specify $P$ and $Q$ as the points of contact of one of the common exterior tangents with the two circles and $D$ and $E$ as the points of the circles outside [AB], then (DP) and (EQ) intersect on the radical axis of the two circles. We will show that this property is always true and that it allows us to construct common tangents, even when the circles have the same radius. }} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tikzpicture} +\tkzDefPoints{0/0/A,4/2/B,2/3/K} +\tkzDrawCircle[R](A,1)\tkzDrawCircle[R](B,3) +\tkzInterCC[R](A,1)(K,3) \tkzGetPoints{a}{a'} +\tkzInterCC[R](B,3)(K,3) \tkzGetPoints{b}{b'} +\tkzInterLL(a,a')(b,b') \tkzGetPoint{X} +\tkzDefPointBy[projection= onto A--B](X) \tkzGetPoint{H} +\tkzGetPoint{C} +\tkzInterLC[R](A,B)(B,3) \tkzGetPoints{b1}{E} +\tkzInterLC[R](A,B)(A,1) \tkzGetPoints{D}{a2} +\tkzDefMidPoint(D,E) \tkzGetPoint{I} +\tkzDrawCircle[orange](I,D) +\tkzInterLC(X,H)(I,D) \tkzGetPoints{M'}{M} +\tkzInterLC(M,D)(A,D) \tkzGetPoints{P'}{P} +\tkzInterLC(M,E)(B,E) \tkzGetPoints{Q}{Q'} +\tkzInterLL(P,Q)(A,B) \tkzGetPoint{O} +\tkzDrawSegments[orange](A,P I,M B,Q) +\tkzDrawPoints(A,B,D,E,M,I,O,P,Q,X,H) +\tkzDrawLines(O,E M,D M,E O,Q) +\tkzDrawLine[add= 3 and 4,orange](X,H) +\tkzLabelPoints(A,B,D,E,M,I,O,P,Q,X,H) +\end{tikzpicture} + +\begin{tkzexample}[code only,small] + \begin{tikzpicture} + \tkzDefPoints{0/0/A,4/2/B,2/3/K} + \tkzDrawCircle[R](A,1)\tkzDrawCircle[R](B,3) + \tkzInterCC[R](A,1)(K,3) \tkzGetPoints{a}{a'} + \tkzInterCC[R](B,3)(K,3) \tkzGetPoints{b}{b'} + \tkzInterLL(a,a')(b,b') \tkzGetPoint{X} + \tkzDefPointBy[projection= onto A--B](X) \tkzGetPoint{H} + \tkzGetPoint{C} + \tkzInterLC[R](A,B)(B,3) \tkzGetPoints{b1}{E} + \tkzInterLC[R](A,B)(A,1) \tkzGetPoints{D}{a2} + \tkzDefMidPoint(D,E) \tkzGetPoint{I} + \tkzDrawCircle[orange](I,D) + \tkzInterLC(X,H)(I,D) \tkzGetPoints{M'}{M} + \tkzInterLC(M,D)(A,D) \tkzGetPoints{P'}{P} + \tkzInterLC(M,E)(B,E) \tkzGetPoints{Q}{Q'} + \tkzInterLL(P,Q)(A,B) \tkzGetPoint{O} + \tkzDrawSegments[orange](A,P I,M B,Q) + \tkzDrawPoints(A,B,D,E,M,I,O,P,Q,X,H) + \tkzDrawLines(O,E M,D M,E O,Q) + \tkzDrawLine[add= 3 and 4,orange](X,H) + \tkzLabelPoints(A,B,D,E,M,I,O,P,Q,X,H) + \end{tikzpicture} +\end{tkzexample} + + +\newpage + +\subsection{Definition of a circle \_Apollonius\_} + +\begin{tikzpicture} +\node [mybox,title={Definition of a circle \_Apollonius\_}] (box){% +\begin{minipage}{0.90\textwidth} + {From Wikipedia : \emph{Apollonius showed that a circle can be defined as the set of points in a plane that have a specified ratio of distances to two fixed points, known as foci. This Apollonian circle is the basis of the Apollonius pursuit problem. ... The solutions to this problem are sometimes called the circles of Apollonius.}} +\end{minipage} +}; +\end{tikzpicture}% + +Explanation + +A circle is the set of points in a plane that are equidistant from a given point O. The distance r from the center is called the radius, and the point O is called the center. It is the simplest definition but it is not the only one. Apollonius of Perga gives another definition : +The set of all points whose distances from two fixed points are in a constant ratio is a circle. + +With \pkg{tkz-euclide} is easy to show you the last definition + +\subsubsection*{The code and the analyse} + +\begin{tkzexample}[code only, small] +\documentclass{standalone} + % Excellent class to show the result and to verify the bounding box. +\usepackage{tkz-euclide} + % no need to use \usetkzobj ! +\begin{document} +\begin{tikzpicture}[scale=1.5] + % Firstly we defined two fixed point. + % The figure depends of these points and the ratio K +\tkzDefPoint(0,0){A} +\tkzDefPoint(4,0){B} + % tkz-euclide.sty knows about the apollonius's circle + % with K=2 we search some points like I such as IA=2 x IB +\tkzDefCircle[apollonius,K=2](A,B) \tkzGetPoint{K1} +\tkzGetLength{rAp} +\tkzDefPointOnCircle[angle=30,center=K1,radius=\rAp] +\tkzGetPoint{I} +\tkzDefPointOnCircle[angle=280,center=K1,radius=\rAp] +\tkzGetPoint{J} +\tkzDrawSegments[new](A,I I,B A,J J,B) +\tkzDrawCircle[R,color = teal,fill=MidnightBlue!20,opacity=.4](K1,\rAp pt) +\tkzDrawPoints(A,B,K1,I,J) +\tkzDrawSegment(A,B) +\tkzLabelPoints[below,font=\scriptsize](A,B,K1,I,J) +\end{tikzpicture} +\end{document} +\end{tkzexample} + +\subsubsection*{The result} + +\begin{tikzpicture}[scale=1.5] +\tkzDefPoint(0,0){A} +\tkzDefPoint(4,0){B} +\tkzDefCircle[apollonius,K=2](A,B) \tkzGetPoint{K1} +\tkzGetLength{rAp} +\tkzDefPointOnCircle[angle=30,center=K1,radius=\rAp] +\tkzGetPoint{I} +\tkzDefPointOnCircle[angle=280,center=K1,radius=\rAp] +\tkzGetPoint{J} +\tkzDrawSegments[new](A,I I,B A,J J,B) +\tkzDrawCircle[R,fill=teal!20,opacity=.4](K1,\rAp pt) +\tkzDrawPoints(A,B,K1,I,J) +\tkzDrawSegment(A,B) +\tkzLabelPoints[below,font=\scriptsize](A,B,K1,I,J) +\end{tikzpicture} + +\subsection{Application of Inversion : \tkzname{Pappus chain} }\label{pappus} +\begin{tikzpicture} +\node [mybox,title={Pappus chain}] (box){% +\begin{minipage}{0.90\textwidth} +From Wikipedia {\emph{In geometry, the Pappus chain is a ring of circles between two tangent circles investigated by Pappus of Alexandria in the 3rd century AD.}} +\end{minipage} +}; +\end{tikzpicture}% + + +\begin{tkzexample}[vbox,small] + \pgfmathsetmacro{\xB}{6}% + \pgfmathsetmacro{\xC}{9}% + \pgfmathsetmacro{\xD}{(\xC*\xC)/\xB}% + \pgfmathsetmacro{\xJ}{(\xC+\xD)/2}% + \pgfmathsetmacro{\r}{\xD-\xJ}% + \pgfmathsetmacro{\nc}{16}% +\begin{tikzpicture}[ultra thin] + \tkzDefPoints{0/0/A,\xB/0/B,\xC/0/C,\xD/0/D} + \tkzDrawCircle[diameter,fill=teal!20](A,C) + \tkzDrawCircle[diameter,fill=teal!30](A,B) + \foreach \i in {-\nc,...,0,...,\nc} + {\tkzDefPoint(\xJ,2*\r*\i){J} + \tkzDefPoint(\xJ,2*\r*\i-\r){H} + \tkzDefCircleBy[inversion = center A through C](J,H) + \tkzDrawCircle[diameter,fill=teal](tkzFirstPointResult,tkzSecondPointResult)} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Book of lemmas proposition 1 Archimedes} +\begin{tikzpicture} +\node [mybox,title={Book of lemmas proposition 1 Archimedes}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{If two circles touch at $A$, and if $[CD]$, $[EF]$ be parallel diameters in them, $A$, $C$ and $E$ are aligned.}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/O_1,0/1/O_2,0/3/A} + \tkzDefPoint(15:3){F} + \tkzInterLC(F,O_1)(O_1,A) \tkzGetSecondPoint{E} + \tkzDefLine[parallel=through O_2](E,F) + \tkzGetPoint{x} + \tkzInterLC(x,O_2)(O_2,A) \tkzGetPoints{D}{C} + \tkzDrawCircles(O_1,A O_2,A) + \tkzDrawSegments[new](O_1,A E,F C,D) + \tkzDrawSegments[purple](A,E A,F) + \tkzDrawPoints(A,O_1,O_2,E,F,C,D) + \tkzLabelPoints(A,O_1,O_2,E,F,C,D) +\end{tikzpicture} +\end{tkzexample} + +$(CD) \parallel (EF)$ $(AO_1)$ is secant to these two lines so +$\widehat{A0_2C} = \widehat{A0_1E}$. + +Since the triangles $AO_2C$ and $AO_1E$ are isosceles the angles at the base are equal $widehat{AC0_2} = \widehat{AE0_1} = \widehat{CA0_2} = \widehat{EA0_1}$. Thus $A$,$C$ and $E$ are aligned + +\subsection{Book of lemmas proposition 6 Archimedes} +\begin{tikzpicture} +\node [mybox,title={Book of lemmas proposition 6 Archimedes}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{Let $AC$, the diameter of a semicircle, be divided at $B$ so that $AC/AB =\phi$ or in any ratio]. Describe semicircles within the first semicircle and on $AB$, $BC$ as diameters, and suppose a circle drawn touching the all three semicircles. If $GH$ be the diameter of this circle, to find relation between $GH$ and $AC$.}} +\end{minipage} +}; +\end{tikzpicture}% + +\begin{tikzpicture} + \tkzDefPoints{0/0/A,12/0/C} + \tkzDefGoldenRatio(A,C) \tkzGetPoint{B} + \tkzDefMidPoint(A,C) \tkzGetPoint{O} + \tkzDefMidPoint(A,B) \tkzGetPoint{O_1} + \tkzDefMidPoint(B,C) \tkzGetPoint{O_2} + \tkzDefExtSimilitudeCenter(O_1,A)(O_2,B) \tkzGetPoint{M_0} + \tkzDefIntSimilitudeCenter(O,A)(O_1,A) \tkzGetPoint{M_1} + \tkzDefIntSimilitudeCenter(O,C)(O_2,C) \tkzGetPoint{M_2} + \tkzInterCC(O_1,A)(M_2,C) \tkzGetFirstPoint{E} + \tkzInterCC(O_2,C)(M_1,A) \tkzGetSecondPoint{F} + \tkzInterCC(O,A)(M_0,B) \tkzGetFirstPoint{D} + \tkzInterLL(O_1,E)(O_2,F) \tkzGetPoint{O_3} + \tkzDefCircle[circum](E,F,B) \tkzGetPoint{0_4} + \tkzInterLC(A,D)(O_1,A) \tkzGetSecondPoint{I} + \tkzInterLC(C,D)(O_2,B) \tkzGetFirstPoint{K} + \tkzInterLC(A,D)(O_3,D) \tkzGetFirstPoint{G} + \tkzInterLC(C,D)(O_3,D) \tkzGetSecondPoint{H} + \tkzInterLL(C,G)(B,K) \tkzGetPoint{M} + \tkzInterLL(A,H)(B,I) \tkzGetPoint{L} + \tkzInterLL(L,G)(A,C) \tkzGetPoint{N} + \tkzInterLL(M,H)(A,C) \tkzGetPoint{P} + \tkzDrawCircles[red,thin](O_3,F) + \tkzDrawCircles[new,thin](0_4,B) + \tkzDrawSemiCircles[teal](O,C O_1,B O_2,C) + \tkzDrawSemiCircles[green](M_2,C) + \tkzDrawSemiCircles[green,swap](M_1,A) + \tkzDrawSegment(A,C) + \tkzDrawSegments[new](O_1,O_3 O_2,O_3) + \tkzDrawSegments[new,very thin](B,D A,D C,D G,H I,B K,B B,G B,H C,G A,H G,N H,P) + \tkzDrawPoints(A,B,C,M_1,M_2,E,O_3,F,D,0_4,O_1,O_2,I,K,G,H,L,P,N,M) + \tkzLabelPoints[font=\scriptsize](A,B,C,M_1,M_2,F,O_1,O_2,I,K,G,H,L,M,N) + \tkzLabelPoints[font=\scriptsize,right](E,O_3,D,0_4,P) +\end{tikzpicture} + + +Let $GH$ be the diameter of the circle which is parallel to $AC$, and let the circle touch the semicircles on $AC$, $AB$, $BC$ in $D$, $E$, $F$ respectively. + +Then, by Prop. 1 $A$,$G$ and $D$ are aligned, ainsi que $D$, $H$ and $C$.\\ + For a like reason $A$ $E$ and $H$ are aligned, $C$ $F$ and $G$are aligned, as also are $B$ $E$ and $G$, $B$ $F$ and $H$. + +Let $(AD)$ meet the semicircle on $[AC]$ at $I$, and let $(BD)$ meet the semicircle on $[BC]$ in $K$. Join CI, CK meeting AE, BF in L, M, and let GL, HM produced meet AB in N, P respectively. + +Now, in the triangle $AGB$, the perpendiculars from $A$, $C$ on the opposite sides meet in $L$. Therefore by the properties of triangles, $(GN)$ is perpendicular to $(AC)$. +Similarly $(HP)$ is perpendicular to $(BC)$.\\ +Again, since the angles at $I$, $K$, $D$ are right, $(CK)$ is parallel to $(AD)$, and $(CI)$ to $(BD)$. + + Therefore\\ +\[\frac{AB}{BC} = \frac{AL}{LH} = \frac{AN}{NP} \quad\text{and} \quad \frac{BC}{AB} = \frac{CM}{MG} = \frac{PC}{NP} \] + +hence + +\[ \frac{AN}{NP} = \frac{NP}{PC} \quad\text{so} \quad {NP}^2 = AN \times PC \] + +Now suppose that $B$ divides $[AC]$ according to the divine proportion that is : +\[\phi = \frac{AB}{BC} = \frac{AC}{AB} \quad\text{then} \quad AN = \phi NP \text{and} NP = \phi PC \] + +We have +\[ AC = AN + NP + PC\quad \text{either} \quad AB + BC = = AN + NP + PC \quad \text{or} \quad (\phi + 1) BC = AN + NP + PC \] + +we get + +\[ (\phi + 1) BC = \phi NP + NP + PC =(\phi + 1)NP + PC = \phi(\phi + 1)PC + PC = {\phi}^2 + \phi + 1)PC \] + +as +\[ {\phi}^2 = \phi + 1 \quad \text{then} \quad (\phi + 1) BC = 2(\phi + 1) PC \quad\text{i.e.}\quad BC = 2 PC \] + +That is, +$p$ is the middle of the segment $BC$. + +Part of the proof from \url{https://www.cut-the-knot.org} + + +\subsection{ "The" Circle of APOLLONIUS} + +\begin{tikzpicture} +\node [mybox,title={The Apollonius circle of a triangle \_Apollonius\_}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{The circle which touches all three excircles of a triangle and encompasses them is often known as "the" Apollonius circle (Kimberling 1998, p. 102)}} +\end{minipage} +}; +\end{tikzpicture}% + +Explanation + +The purpose of the first examples was to show the simplicity with which we could recreate these propositions. With TikZ you need to do calculations and use trigonometry while with \pkg{tkz-euclide} you only need to build simple objects + +But don't forget that behind or far above \pkg{tkz-euclide} there is TikZ. I'm only creating an interface between TikZ and the user of my package. + +The last example is very complex and it is to show you all that we can do with \pkg{tkz-euclide}. + +\subsubsection*{The code and the analyse} + +\begin{tkzexample}[code only,small] +% !TEX TS-program = lualatex +\documentclass{standalone} +\usepackage{tkz-euclide} +\begin{document} + +\begin{tikzpicture}[scale=1] +\tkzDefPoints{0/0/A,6/0/B,0.8/4/C} +% we need some special points if the triangle, tkz-euclide.sty knows about them + +\tkzDefTriangleCenter[euler](A,B,C) \tkzGetPoint{N} % or \tkzEulerCenter(A,B,C) +\tkzDefTriangleCenter[circum](A,B,C) \tkzGetPoint{O} % \tkzCircumCenter(A,B,C) +\tkzDefTriangleCenter[lemoine](A,B,C) \tkzGetPoint{K} +\tkzDefTriangleCenter[ortho](A,B,C) \tkzGetPoint{H} + + % \tkzDefSpcTriangle new macro to define new triangle in relation wth ABC +\tkzDefSpcTriangle[excentral,name=J](A,B,C){a,b,c} +\tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c} +\tkzDefCircle[in](Ma,Mb,Mc) \tkzGetPoint{Sp} % Sp Spieker center + +% here I used the definition but tkz-euclide knows this point +% \tkzDefTriangleCenter[spieker](A,B,C) \tkzGetPoint{Sp} +% each center has three projections on the sides of the triangle ABC +% We can do this with one macro +\tkzDefProjExcenter[name=J](A,B,C)(a,b,c){Y,Z,X} + +% but possible is +% \tkzDefPointBy[projection=onto A--C ](Ja) \tkzGetPoint{Za} +\tkzDefLine[parallel=through Za](A,B) \tkzGetPoint{Xc} +\tkzInterLL(Za,Xc)(C,B) \tkzGetPoint{C'} +\tkzDefLine[parallel=through Zc](B,C) \tkzGetPoint{Ya} +\tkzInterLL(Zc,Ya)(A,B) \tkzGetPoint{A'} +\tkzDefPointBy[reflection= over Ja--Jc](C')\tkzGetPoint{Ab} +\tkzDefPointBy[reflection= over Ja--Jc](A')\tkzGetPoint{Cb} + +% Now we can get the center of THE CIRCLE : Q +% BUT we need to find the radius or a point on the circle +\tkzInterLL(K,O)(N,Sp) \tkzGetPoint{Q} +\tkzInterLC(A,B)(Q,Cb) \tkzGetSecondPoint{Ba} +\tkzInterLC(A,C)(Q,Cb) \tkzGetPoints{Ca}{Ac} +\tkzInterLC(B,C')(Q,Cb) \tkzGetSecondPoint{Bc} +\tkzInterLC(Q,Ja)(Q,Cb) \tkzGetSecondPoint{F'a} +\tkzInterLC(Q,Jc)(Q,Cb) \tkzGetSecondPoint{F'c} +\tkzInterLC(Q,Jb)(Q,Cb) \tkzGetSecondPoint{F'b} +\tkzInterLC(Sp,F'a)(Ja,Za) \tkzGetFirstPoint{Fa} +\tkzInterLC(Sp,F'b)(Jb,Yb) \tkzGetFirstPoint{Fb} +\tkzInterLC(Sp,F'c)(Jc,Yc) \tkzGetSecondPoint{Fc} +\tkzInterLC(Mc,Sp)(Q,Cb) \tkzGetSecondPoint{A''} +\tkzDefLine[parallel=through A''](N,Mc) \tkzGetPoint{q} + +% Calculations are done, now you can draw, mark and label +\tkzDrawPolygon(A,B,C) +\tkzDrawCircle(Q,Bc)% +\tkzDrawCircle[euler,lightgray](A,B,C) +\tkzDrawCircles[ex](A,B,C B,C,A C,A,B) +\tkzDrawSegments[dashed](A,A' C,C' A',Zc Za,C' B,Cb B,Ab A,Ca C,Ac + Ja,Xa Jb,Yb Jc,Zc) +\begin{scope} + \tkzClipCircle(Q,Cb) % We limit the drawing of the lines + \tkzDrawLine[add=5 and 12,orange](K,O) + \tkzDrawLine[add=12 and 28,red!50!black](N,Sp) +\end{scope} +\tkzDrawPoints(A,B,C,K,Ja,Jb,Jc,Q,N,O,Sp,Mc,Xa,Xb,Yb,Yc,Za,Zc) +\tkzDrawPoints(A',C',A'',Ab,Cb,Bc,Ca,Ac,Ba,Fa,Fb,Fc,F'a,F'b,F'c) +\tkzLabelPoints(Ja,Jb,Jc,Q,Xa,Xb,Za,Zc,Ab,Cb,Bc,Ca,Ac,Ba,F'b) +\tkzLabelPoints[above](O,K,F'a,Fa,A'') +\tkzLabelPoints[below](B,F'c,Yc,N,Sp,Fc,Mc) +\tkzLabelPoints[left](A',C',Fb) +\tkzLabelPoints[right](C) +\tkzLabelPoints[below right](A) +\tkzLabelPoints[above right](Yb) +\tkzDrawSegments[color=green!50!black](Mc,N Mc,A'' A'',Q) +\tkzDrawSegments[color=red,dashed](Ac,Ab Ca,Cb Ba,Bc Ja,Jc A',Cb C',Ab) +\tkzDrawSegments[color=red](Cb,Ab Bc,Ac Ba,Ca A',C') +\tkzMarkSegments[color=red,mark=|](Cb,Ab Bc,Ac Ba,Ca) +\tkzMarkRightAngles(Jc,Zc,A Ja,Xa,B Jb,Yb,C) +\tkzDrawSegments[green,dashed](A,F'a B,F'b C,F'c) +\end{tikzpicture} + +\end{document} +\end{tkzexample} + +\subsubsection*{The result} +% +\begin{tikzpicture}[scale=.6] + \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} + \tkzDefTriangleCenter[euler](A,B,C) \tkzGetPoint{N} + \tkzDefTriangleCenter[circum](A,B,C) \tkzGetPoint{O} + \tkzDefTriangleCenter[lemoine](A,B,C) \tkzGetPoint{K} + \tkzDefTriangleCenter[ortho](A,B,C) \tkzGetPoint{H} + \tkzDefSpcTriangle[excentral,name=J](A,B,C){a,b,c} + \tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c} + \tkzDefCircle[in](Ma,Mb,Mc) \tkzGetPoint{Sp} % Sp Spieker center + \tkzDefProjExcenter[name=J](A,B,C)(a,b,c){Y,Z,X} + \tkzDefLine[parallel=through Za](A,B) \tkzGetPoint{Xc} + \tkzInterLL(Za,Xc)(C,B) \tkzGetPoint{C'} + \tkzDefLine[parallel=through Zc](B,C) \tkzGetPoint{Ya} + \tkzInterLL(Zc,Ya)(A,B) \tkzGetPoint{A'} + \tkzDefPointBy[reflection= over Ja--Jc](C')\tkzGetPoint{Ab} + \tkzDefPointBy[reflection= over Ja--Jc](A')\tkzGetPoint{Cb} + \tkzInterLL(K,O)(N,Sp) \tkzGetPoint{Q} + \tkzInterLC(A,B)(Q,Cb) \tkzGetSecondPoint{Ba} + \tkzInterLC(A,C)(Q,Cb) \tkzGetPoints{Ca}{Ac} + \tkzInterLC(B,C')(Q,Cb) \tkzGetSecondPoint{Bc} + \tkzInterLC(Q,Ja)(Q,Cb) \tkzGetSecondPoint{F'a} + \tkzInterLC(Q,Jc)(Q,Cb) \tkzGetSecondPoint{F'c} + \tkzInterLC(Q,Jb)(Q,Cb) \tkzGetSecondPoint{F'b} + \tkzInterLC(Sp,F'a)(Ja,Za) \tkzGetFirstPoint{Fa} + \tkzInterLC(Sp,F'b)(Jb,Yb) \tkzGetFirstPoint{Fb} + \tkzInterLC(Sp,F'c)(Jc,Yc) \tkzGetSecondPoint{Fc} + \tkzInterLC(Mc,Sp)(Q,Cb) \tkzGetSecondPoint{A''} + \tkzDefLine[parallel=through A''](N,Mc) \tkzGetPoint{q} + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle(Q,Bc)% + \tkzDrawCircle[euler,lightgray](A,B,C) + \tkzDrawCircles[ex](A,B,C B,C,A C,A,B) + \tkzDrawSegments[dashed](A,A' C,C' A',Zc Za,C' B,Cb B,Ab A,Ca C,Ac Ja,Xa Jb,Yb Jc,Zc) + \begin{scope} + \tkzClipCircle(Q,Cb) + \tkzDrawLine[add=5 and 12,orange](K,O) + \tkzDrawLine[add=12 and 28,red!50!black](N,Sp) + \end{scope} + \tkzDrawSegments[color=green!50!black](Mc,N Mc,A'' A'',Q) + \tkzDrawSegments[color=red,dashed](Ac,Ab Ca,Cb Ba,Bc Ja,Jc A',Cb C',Ab) + \tkzDrawSegments[color=red](Cb,Ab Bc,Ac Ba,Ca A',C') + \tkzMarkSegments[color=red,mark=|](Cb,Ab Bc,Ac Ba,Ca) + \tkzMarkRightAngles(Jc,Zc,A Ja,Xa,B Jb,Yb,C) + \tkzDrawSegments[green,dashed](A,F'a B,F'b C,F'c) + \tkzDrawPoints(A,B,C,K,Ja,Jb,Jc,Q,N,O,Sp,Mc,Xa,Xb,Yb,Yc,Za,Zc, + A',C',A'',Ab,Cb,Bc,Ca,Ac,Ba,Fa,Fb,Fc,F'a,F'b,F'c) + \tkzLabelPoints(Ja,Jb,Jc,Q,Xa,Xb,Za,Zc,Ab,Cb, + Bc, Ca, Ac, Ba, F'b) + \tkzLabelPoints[above](O, K, F'a, Fa, A'') + \tkzLabelPoints[below](B, F'c, Yc, N, Sp, Fc, Mc) + \tkzLabelPoints[left](A', C', Fb) + \tkzLabelPoints[right](C) + \tkzLabelPoints[below right](A) + \tkzLabelPoints[above right](Yb) +\end{tikzpicture} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-exemples.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-exemples.tex deleted file mode 100644 index fb591ba5e0..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-exemples.tex +++ /dev/null @@ -1,539 +0,0 @@ -\section{Some examples} -\subsection{Some interesting examples} - -\subsubsection{Similar isosceles triangles} - -The following is from the excellent site \textbf{Descartes et les Mathématiques}. I did not modify the text and I am only the author of the programming of the figures. - -\url{http://debart.pagesperso-orange.fr/seconde/triangle.html} - -Bibliography: - -\begin{itemize} - -\item Géométrie au Bac - Tangente, special issue no. 8 - Exercise 11, page 11 - - -\item Elisabeth Busser and Gilles Cohen: 200 nouveaux problèmes du "Monde" - POLE 2007 (200 new problems of "Le Monde") - - -\item Affaire de logique n° 364 - Le Monde February 17, 2004 -\end{itemize} - - -Two statements were proposed, one by the magazine \textit{Tangente} and the other by \textit{Le Monde}. - -\vspace*{2cm} -\emph{Editor of the magazine "Tangente"}: \textcolor{orange}{Two similar isosceles triangles $AXB$ and $BYC$ are constructed with main vertices $X$ and $Y$, such that $A$, $B$ and $C$ are aligned and that these triangles are "indirect". Let $\alpha$ be the angle at vertex $\widehat{AXB}$ = $\widehat{BYC}$. We then construct a third isosceles triangle $XZY$ similar to the first two, with main vertex $Z$ and "indirect". -We ask to demonstrate that point $Z$ belongs to the straight line $(AC)$.} - -\vspace*{2cm} -\emph{Editor of "Le Monde"}: \textcolor{orange}{We construct two similar isosceles triangles $AXB$ and $BYC$ with principal vertices $X$ and $Y$, such that $A$, $B$ and $C$ are aligned and that these triangles are "indirect". Let $\alpha$ be the angle at vertex $\widehat{AXB}$ = $\widehat{BYC}$. The point Z of the line segment $[AC]$ is equidistant from the two vertices $X$ and $Y$.\\ -At what angle does he see these two vertices?} - -\vspace*{2cm} The constructions and their associated codes are on the next two pages, but you can search before looking. The programming respects (it seems to me ...) my reasoning in both cases. - - \subsubsection{Revised version of "Tangente"} -\begin{tkzexample}[] -\begin{tikzpicture}[scale=.8,rotate=60] - \tkzDefPoint(6,0){X} \tkzDefPoint(3,3){Y} - \tkzDefShiftPoint[X](-110:6){A} \tkzDefShiftPoint[X](-70:6){B} - \tkzDefShiftPoint[Y](-110:4.2){A'} \tkzDefShiftPoint[Y](-70:4.2){B'} - \tkzDefPointBy[translation= from A' to B ](Y) \tkzGetPoint{Y} - \tkzDefPointBy[translation= from A' to B ](B') \tkzGetPoint{C} - \tkzInterLL(A,B)(X,Y) \tkzGetPoint{O} - \tkzDefMidPoint(X,Y) \tkzGetPoint{I} - \tkzDefPointWith[orthogonal](I,Y) - \tkzInterLL(I,tkzPointResult)(A,B) \tkzGetPoint{Z} - \tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O} - \tkzDrawCircle(O,X) - \tkzDrawLines[add = 0 and 1.5](A,C) \tkzDrawLines[add = 0 and 3](X,Y) - \tkzDrawSegments(A,X B,X B,Y C,Y) \tkzDrawSegments[color=red](X,Z Y,Z) - \tkzDrawPoints(A,B,C,X,Y,O,Z) - \tkzLabelPoints(A,B,C,Z) \tkzLabelPoints[above right](X,Y,O) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{"Le Monde" version} - -\begin{tkzexample}[] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefPoint(9,0){C} - \tkzDefPoint(1.5,2){X} - \tkzDefPoint(6,4){Y} - \tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O} - \tkzDefMidPoint(X,Y) \tkzGetPoint{I} - \tkzDefPointWith[orthogonal](I,Y) \tkzGetPoint{i} - \tkzDrawLines[add = 2 and 1,color=orange](I,i) - \tkzInterLL(I,i)(A,B) \tkzGetPoint{Z} - \tkzInterLC(I,i)(O,B) \tkzGetSecondPoint{M} - \tkzDefPointWith[orthogonal](B,Z) \tkzGetPoint{b} - \tkzDrawCircle(O,B) - \tkzDrawLines[add = 0 and 2,color=orange](B,b) - \tkzDrawSegments(A,X B,X B,Y C,Y A,C X,Y) - \tkzDrawSegments[color=red](X,Z Y,Z) - \tkzDrawPoints(A,B,C,X,Y,Z,M,I) - \tkzLabelPoints(A,B,C,Z) - \tkzLabelPoints[above right](X,Y,M,I) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Triangle altitudes} - -The following is again from the excellent site \textbf{Descartes et les Mathématiques} (Descartes and the Mathematics). - -\url{http://debart.pagesperso-orange.fr/geoplan/geometrie_triangle.html} - -The three altitudes of a triangle intersect at the same H-point. - -\begin{tkzexample}[latex=7cm] -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(0,0){C} - \tkzDefPoint(7,0){B} - \tkzDefPoint(5,6){A} - \tkzDrawPolygon(A,B,C) - \tkzDefMidPoint(C,B) - \tkzGetPoint{I} - \tkzDrawArc(I,B)(C) - \tkzInterLC(A,C)(I,B) - \tkzGetSecondPoint{B'} - \tkzInterLC(A,B)(I,B) - \tkzGetFirstPoint{C'} - \tkzInterLL(B,B')(C,C') - \tkzGetPoint{H} - \tkzInterLL(A,H)(C,B) - \tkzGetPoint{A'} - \tkzDefCircle[circum](A,B',C') - \tkzGetPoint{O} - \tkzDrawCircle[color=red](O,A) - \tkzDrawSegments[color=orange](B,B' C,C' A,A') - \tkzMarkRightAngles(C,B',B B,C',C C,A',A) - \tkzDrawPoints(A,B,C,A',B',C',H) - \tkzLabelPoints(A,B,C,A',B',C',H) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Altitudes - other construction} - -\begin{tkzexample}[latex=7cm] -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} - \tkzDefPoint(3.5,10){C} - \tkzDefMidPoint(A,B) - \tkzGetPoint{O} - \tkzDefPointBy[projection=onto A--B](C) - \tkzGetPoint{P} - \tkzInterLC(C,A)(O,A) - \tkzGetSecondPoint{M} - \tkzInterLC(C,B)(O,A) - \tkzGetFirstPoint{N} - \tkzInterLL(B,M)(A,N) - \tkzGetPoint{I} - \tkzDrawCircle[diameter](A,B) - \tkzDrawSegments(C,A C,B A,B B,M A,N) - \tkzMarkRightAngles[fill=brown!20](A,M,B A,N,B A,P,C) - \tkzDrawSegment[style=dashed,color=orange](C,P) - \tkzLabelPoints(O,A,B,P) - \tkzLabelPoint[left](M){$M$} - \tkzLabelPoint[right](N){$N$} - \tkzLabelPoint[above](C){$C$} - \tkzLabelPoint[above right](I){$I$} - \tkzDrawPoints[color=red](M,N,P,I) - \tkzDrawPoints[color=brown](O,A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Different authors} - -\subsubsection{ Square root of the integers} -How to get $1$, $\sqrt{2}$, $\sqrt{3}$ with a rule and a compass. - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){a0} - \tkzDrawSegment[blue](O,a0) - \foreach \i [count=\j] in {0,...,10}{% - \tkzDefPointWith[orthogonal normed](a\i,O) - \tkzGetPoint{a\j} - \tkzDrawPolySeg[color=blue](a\i,a\j,O)} - \end{tikzpicture} -\end{tkzexample} - - -\subsubsection{About right triangle} - -We have a segment $[AB]$ and we want to determine a point $C$ such that $AC=8$~cm and $ABC$ is a right triangle in $B$. - -\begin{tkzexample}[latex=7cm] -\begin{tikzpicture}[scale=.5] - \tkzDefPoint["$A$" left](2,1){A} - \tkzDefPoint(6,4){B} - \tkzDrawSegment(A,B) - \tkzDrawPoint[color=red](A) - \tkzDrawPoint[color=red](B) - \tkzDefPointWith[orthogonal,K=-1](B,A) - \tkzDrawLine[add = .5 and .5](B,tkzPointResult) - \tkzInterLC[R](B,tkzPointResult)(A,8 cm) - \tkzGetPoints{C}{J} - \tkzDrawPoint[color=red](C) - \tkzCompass(A,C) - \tkzMarkRightAngle(A,B,C) - \tkzDrawLine[color=gray,style=dashed](A,C) -\end{tikzpicture} -\end{tkzexample} - - -\subsubsection{Archimedes} - -This is an ancient problem proved by the great Greek mathematician Archimedes . -The figure below shows a semicircle, with diameter $AB$. A tangent line is drawn and touches the semicircle at $B$. An other tangent line at a point, $C$, on the semicircle is drawn. We project the point $C$ on the line segment $[AB]$ on a point $D$. The two tangent lines intersect at the point $T$. - -Prove that the line $(AT)$ bisects $(CD)$ - -\begin{tkzexample}[] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A}\tkzDefPoint(6,0){D} - \tkzDefPoint(8,0){B}\tkzDefPoint(4,0){I} - \tkzDefLine[orthogonal=through D](A,D) - \tkzInterLC[R](D,tkzPointResult)(I,4 cm) \tkzGetFirstPoint{C} - \tkzDefLine[orthogonal=through C](I,C) \tkzGetPoint{c} - \tkzDefLine[orthogonal=through B](A,B) \tkzGetPoint{b} - \tkzInterLL(C,c)(B,b) \tkzGetPoint{T} - \tkzInterLL(A,T)(C,D) \tkzGetPoint{P} - \tkzDrawArc(I,B)(A) - \tkzDrawSegments(A,B A,T C,D I,C) \tkzDrawSegment[color=orange](I,C) - \tkzDrawLine[add = 1 and 0](C,T) \tkzDrawLine[add = 0 and 1](B,T) - \tkzMarkRightAngle(I,C,T) - \tkzDrawPoints(A,B,I,D,C,T) - \tkzLabelPoints(A,B,I,D) \tkzLabelPoints[above right](C,T) - \tkzMarkSegment[pos=.25,mark=s|](C,D) \tkzMarkSegment[pos=.75,mark=s|](C,D) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example: Dimitris Kapeta} - -You need in this example to use \tkzname{mkpos=.2} with \tkzcname{tkzMarkAngle} because the measure of $ \widehat{CAM}$ is too small. -Another possiblity is to use \tkzcname{tkzFillAngle}. - - -\begin{tkzexample}[] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2.5,0){N} - \tkzDefPoint(-4.2,0.5){M} - \tkzDefPointBy[rotation=center O angle 30](N) - \tkzGetPoint{B} - \tkzDefPointBy[rotation=center O angle -50](N) - \tkzGetPoint{A} - \tkzInterLC(M,B)(O,N) \tkzGetFirstPoint{C} - \tkzInterLC(M,A)(O,N) \tkzGetSecondPoint{A'} - \tkzMarkAngle[mkpos=.2, size=0.5](A,C,B) - \tkzMarkAngle[mkpos=.2, size=0.5](A,M,C) - \tkzDrawSegments(A,C M,A M,B) - \tkzDrawCircle(O,N) - \tkzLabelCircle[above left](O,N)(120){$\mathcal{C}$} - \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M) - \tkzDrawPoints(O, A, B, M, B, C) - \tkzLabelPoints[right](O,A,B) - \tkzLabelPoints[above left](M,C) - \tkzLabelPoint[below left](A'){$A'$} -\end{tikzpicture} -\end{tkzexample} - - -\subsubsection{Example 1: John Kitzmiller } - -Prove that $\bigtriangleup LKJ$ is equilateral. - - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=2] - \tkzDefPoint[label=below left:A](0,0){A} - \tkzDefPoint[label=below right:B](6,0){B} - \tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C} - \tkzMarkSegments[mark=|](A,B A,C B,C) - \tkzDefBarycentricPoint(A=1,B=2) \tkzGetPoint{C'} - \tkzDefBarycentricPoint(A=2,C=1) \tkzGetPoint{B'} - \tkzDefBarycentricPoint(C=2,B=1) \tkzGetPoint{A'} - \tkzInterLL(A,A')(C,C') \tkzGetPoint{J} - \tkzInterLL(C,C')(B,B') \tkzGetPoint{K} - \tkzInterLL(B,B')(A,A') \tkzGetPoint{L} - \tkzLabelPoint[above](C){C} - \tkzDrawPolygon(A,B,C) \tkzDrawSegments(A,J B,L C,K) - \tkzMarkAngles[size=1 cm](J,A,C K,C,B L,B,A) - \tkzMarkAngles[thick,size=1 cm](A,C,J C,B,K B,A,L) - \tkzMarkAngles[opacity=.5](A,C,J C,B,K B,A,L) - \tkzFillAngles[fill= orange,size=1 cm,opacity=.3](J,A,C K,C,B L,B,A) - \tkzFillAngles[fill=orange, opacity=.3,thick,size=1,](A,C,J C,B,K B,A,L) - \tkzFillAngles[fill=green, size=1, opacity=.5](A,C,J C,B,K B,A,L) - \tkzFillPolygon[color=yellow, opacity=.2](J,A,C) - \tkzFillPolygon[color=yellow, opacity=.2](K,B,C) - \tkzFillPolygon[color=yellow, opacity=.2](L,A,B) - \tkzDrawSegments[line width=3pt,color=cyan,opacity=0.4](A,J C,K B,L) - \tkzDrawSegments[line width=3pt,color=red,opacity=0.4](A,L B,K C,J) - \tkzMarkSegments[mark=o](J,K K,L L,J) - \tkzLabelPoint[right](J){J} - \tkzLabelPoint[below](K){K} - \tkzLabelPoint[above left](L){L} -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example 2: John Kitzmiller } -Prove that $\dfrac{AC}{CE}=\dfrac{BD}{DF}$. - -Another interesting example from John, you can see how to use some extra options like \tkzname{decoration} and \tkzname{postaction} from \TIKZ\ with \tkzname{tkz-euclide}. - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=2,decoration={markings, - mark=at position 3cm with {\arrow[scale=2]{>}}}] - \tkzDefPoints{0/0/E, 6/0/F, 0/1.8/P, 6/1.8/Q, 0/3/R, 6/3/S} - \tkzDrawLines[postaction={decorate}](E,F P,Q R,S) - \tkzDefPoints{3.5/3/A, 5/3/B} - \tkzDrawSegments(E,A F,B) - \tkzInterLL(E,A)(P,Q) \tkzGetPoint{C} - \tkzInterLL(B,F)(P,Q) \tkzGetPoint{D} - \tkzLabelPoints[above right](A,B) - \tkzLabelPoints[below](E,F) - \tkzLabelPoints[above left](C) - \tkzDrawSegments[style=dashed](A,F) - \tkzInterLL(A,F)(P,Q) \tkzGetPoint{G} - \tkzLabelPoints[above right](D,G) - \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](A,C A,G) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](C,E G,F) - \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](B,D) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](D,F) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example 3: John Kitzmiller } -Prove that $\dfrac{BC}{CD}=\dfrac{AB}{AD} \qquad$ (Angle Bisector). - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=2] - \tkzDefPoints{0/0/B, 5/0/D} \tkzDefPoint(70:3){A} - \tkzDrawPolygon(B,D,A) - \tkzDefLine[bisector](B,A,D) \tkzGetPoint{a} - \tkzInterLL(A,a)(B,D) \tkzGetPoint{C} - \tkzDefLine[parallel=through B](A,C) \tkzGetPoint{b} - \tkzInterLL(A,D)(B,b) \tkzGetPoint{P} - \begin{scope}[decoration={markings, - mark=at position .5 with {\arrow[scale=2]{>}}}] - \tkzDrawSegments[postaction={decorate},dashed](C,A P,B) - \end{scope} - \tkzDrawSegment(A,C) \tkzDrawSegment[style=dashed](A,P) - \tkzLabelPoints[below](B,C,D) \tkzLabelPoints[above](A,P) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](B,C P,A) - \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](C,D A,D) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](A,B) - \tkzMarkAngles[size=3mm](B,A,C C,A,D) - \tkzMarkAngles[size=3mm](B,A,C A,B,P) - \tkzMarkAngles[size=3mm](B,P,A C,A,D) - \tkzMarkAngles[size=3mm](B,A,C A,B,P B,P,A C,A,D) - \tkzFillAngles[fill=green, opacity=0.5](B,A,C A,B,P) - \tkzFillAngles[fill=yellow, opacity=0.3](B,P,A C,A,D) - \tkzFillAngles[fill=green, opacity=0.6](B,A,C A,B,P B,P,A C,A,D) - \tkzLabelAngle[pos=1](B,A,C){1} \tkzLabelAngle[pos=1](C,A,D){2} - \tkzLabelAngle[pos=1](A,B,P){3} \tkzLabelAngle[pos=1](B,P,A){4} - \tkzMarkSegments[mark=|](A,B A,P) -\end{tikzpicture} -\end{tkzexample} - - -\subsubsection{Example 4: author John Kitzmiller } -Prove that $\overline{AG}\cong\overline{EF} \qquad$ (Detour). - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=2] - \tkzDefPoint(0,3){A} \tkzDefPoint(6,3){E} \tkzDefPoint(1.35,3){B} - \tkzDefPoint(4.65,3){D} \tkzDefPoint(1,1){G} \tkzDefPoint(5,5){F} - \tkzDefMidPoint(A,E) \tkzGetPoint{C} - \tkzFillPolygon[yellow, opacity=0.4](B,G,C) - \tkzFillPolygon[yellow, opacity=0.4](D,F,C) - \tkzFillPolygon[blue, opacity=0.3](A,B,G) - \tkzFillPolygon[blue, opacity=0.3](E,D,F) - \tkzMarkAngles[size=0.5 cm](B,G,A D,F,E) - \tkzMarkAngles[size=0.5 cm](B,C,G D,C,F) - \tkzMarkAngles[size=0.5 cm](G,B,C F,D,C) - \tkzMarkAngles[size=0.5 cm](A,B,G E,D,F) - \tkzFillAngles[size=0.5 cm,fill=green](B,G,A D,F,E) - \tkzFillAngles[size=0.5 cm,fill=orange](B,C,G D,C,F) - \tkzFillAngles[size=0.5 cm,fill=yellow](G,B,C F,D,C) - \tkzFillAngles[size=0.5 cm,fill=red](A,B,G E,D,F) - \tkzMarkSegments[mark=|](B,C D,C) \tkzMarkSegments[mark=s||](G,C F,C) - \tkzMarkSegments[mark=o](A,G E,F) \tkzMarkSegments[mark=s](B,G D,F) - \tkzDrawSegment[color=red](A,E) - \tkzDrawSegment[color=blue](F,G) - \tkzDrawSegments(A,G G,B E,F F,D) - \tkzLabelPoints[below](C,D,E,G) \tkzLabelPoints[above](A,B,F) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example 1: from Indonesia} - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=3] - \tkzDefPoints{0/0/A,2/0/B} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzDefPointBy[rotation=center D angle 45](C)\tkzGetPoint{G} - \tkzDefSquare(G,D)\tkzGetPoints{E}{F} - \tkzInterLL(B,C)(E,F)\tkzGetPoint{H} - \tkzFillPolygon[gray!10](D,E,H,C,D) - \tkzDrawPolygon(A,...,D)\tkzDrawPolygon(D,...,G) - \tkzDrawSegment(B,E) - \tkzMarkSegments[mark=|,size=3pt,color=gray](A,B B,C C,D D,A E,F F,G G,D D,E) - \tkzMarkSegments[mark=||,size=3pt,color=gray](B,E E,H) - \tkzLabelPoints[left](A,D) - \tkzLabelPoints[right](B,C,F,H) - \tkzLabelPoints[above](G)\tkzLabelPoints[below](E) - \tkzMarkRightAngles(D,A,B D,G,F) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example 2: from Indonesia} -\begin{tkzexample}[vbox,small] - \begin{tikzpicture}[pol/.style={fill=brown!40,opacity=.5}, - seg/.style={tkzdotted,color=gray}, - hidden pt/.style={fill=gray!40}, - mra/.style={color=gray!70,tkzdotted,/tkzrightangle/size=.2}, - scale=3] - \tkzSetUpPoint[size=2] - \tkzDefPoints{0/0/A,2.5/0/B,1.33/0.75/D,0/2.5/E,2.5/2.5/F} - \tkzDefLine[parallel=through D](A,B) \tkzGetPoint{I1} - \tkzDefLine[parallel=through B](A,D) \tkzGetPoint{I2} - \tkzInterLL(D,I1)(B,I2) \tkzGetPoint{C} - \tkzDefLine[parallel=through E](A,D) \tkzGetPoint{I3} - \tkzDefLine[parallel=through D](A,E) \tkzGetPoint{I4} - \tkzInterLL(E,I3)(D,I4) \tkzGetPoint{H} - \tkzDefLine[parallel=through F](E,H) \tkzGetPoint{I5} - \tkzDefLine[parallel=through H](E,F) \tkzGetPoint{I6} - \tkzInterLL(F,I5)(H,I6) \tkzGetPoint{G} - \tkzDefMidPoint(G,H) \tkzGetPoint{P} - \tkzDefMidPoint(G,C) \tkzGetPoint{Q} - \tkzDefMidPoint(B,C) \tkzGetPoint{R} - \tkzDefMidPoint(A,B) \tkzGetPoint{S} - \tkzDefMidPoint(A,E) \tkzGetPoint{T} - \tkzDefMidPoint(E,H) \tkzGetPoint{U} - \tkzDefMidPoint(A,D) \tkzGetPoint{M} - \tkzDefMidPoint(D,C) \tkzGetPoint{N} - \tkzInterLL(B,D)(S,R) \tkzGetPoint{L} - \tkzInterLL(H,F)(U,P) \tkzGetPoint{K} - \tkzDefLine[parallel=through K](D,H) \tkzGetPoint{I7} - \tkzInterLL(K,I7)(B,D) \tkzGetPoint{O} - - \tkzFillPolygon[pol](P,Q,R,S,T,U) - \tkzDrawSegments[seg](K,O K,L P,Q R,S T,U - C,D H,D A,D M,N B,D) - \tkzDrawSegments(E,H B,C G,F G,H G,C Q,R S,T U,P H,F) - \tkzDrawPolygon(A,B,F,E) - \tkzDrawPoints(A,B,C,E,F,G,H,P,Q,R,S,T,U,K) - \tkzDrawPoints[hidden pt](M,N,O,D) - \tkzMarkRightAngle[mra](L,O,K) - \tkzMarkSegments[mark=|,size=1pt,thick,color=gray](A,S B,S B,R C,R - Q,C Q,G G,P H,P - E,U H,U E,T A,T) - - \tkzLabelAngle[pos=.3](K,L,O){$\alpha$} - \tkzLabelPoints[below](O,A,S,B) - \tkzLabelPoints[above](H,P,G) - \tkzLabelPoints[left](T,E) - \tkzLabelPoints[right](C,Q) - \tkzLabelPoints[above left](U,D,M) - \tkzLabelPoints[above right](L,N) - \tkzLabelPoints[below right](F,R) - \tkzLabelPoints[below left](K) - \end{tikzpicture} -\end{tkzexample} - - -\subsubsection{Three circles} - -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoints{0/0/A,8/0/B,0/4/a,8/4/b,8/8/c} - \tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzDefSquare(A,B) \tkzGetPoints{D}{E} - \tkzClipBB - \tkzDefMidPoint(A,B) \tkzGetPoint{M} - \tkzDefMidPoint(B,C) \tkzGetPoint{N} - \tkzDefMidPoint(A,C) \tkzGetPoint{P} - \tkzDrawSemiCircle[gray,dashed](M,B) - \tkzDrawSemiCircle[gray,dashed](A,M) - \tkzDrawSemiCircle[gray,dashed](A,B) - \tkzDrawCircle[gray,dashed](B,A) - \tkzInterLL(A,N)(M,a) \tkzGetPoint{Ia} - \tkzDefPointBy[projection = onto A--B](Ia) - \tkzGetPoint{ha} - \tkzDrawCircle[gray](Ia,ha) - \tkzInterLL(B,P)(M,b) \tkzGetPoint{Ib} - \tkzDefPointBy[projection = onto A--B](Ib) - \tkzGetPoint{hb} - \tkzDrawCircle[gray](Ib,hb) - \tkzInterLL(A,c)(M,C) \tkzGetPoint{Ic} - \tkzDefPointBy[projection = onto A--C](Ic) - \tkzGetPoint{hc} - \tkzDrawCircle[gray](Ic,hc) - \tkzInterLL(A,Ia)(B,Ib) \tkzGetPoint{G} - \tkzDrawCircle[gray,dashed](G,Ia) - \tkzDrawPolySeg(A,E,D,B) - \tkzDrawPoints(A,B,C) - \tkzDrawPoints(G,Ia,Ib,Ic) - \tkzDrawSegments[gray,dashed](C,M A,N B,P M,a M,b A,a a,b b,B A,D Ia,ha) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{"The" Circle of APOLLONIUS} - -\begin{tkzexample}[vbox,small] - \begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefTriangleCenter[euler](A,B,C) \tkzGetPoint{N} - \tkzDefTriangleCenter[circum](A,B,C) \tkzGetPoint{O} - \tkzDefTriangleCenter[lemoine](A,B,C) \tkzGetPoint{K} - \tkzDefTriangleCenter[spieker](A,B,C) \tkzGetPoint{Sp} - \tkzDefExCircle(A,B,C) \tkzGetPoint{Jb} - \tkzDefExCircle(C,A,B) \tkzGetPoint{Ja} - \tkzDefExCircle(B,C,A) \tkzGetPoint{Jc} - \tkzDefPointBy[projection=onto B--C ](Jc) \tkzGetPoint{Xc} - \tkzDefPointBy[projection=onto B--C ](Jb) \tkzGetPoint{Xb} - \tkzDefPointBy[projection=onto A--B ](Ja) \tkzGetPoint{Za} - \tkzDefPointBy[projection=onto A--B ](Jb) \tkzGetPoint{Zb} - \tkzDefLine[parallel=through Xc](A,C) \tkzGetPoint{X'c} - \tkzDefLine[parallel=through Xb](A,B) \tkzGetPoint{X'b} - \tkzDefLine[parallel=through Za](C,A) \tkzGetPoint{Z'a} - \tkzDefLine[parallel=through Zb](C,B) \tkzGetPoint{Z'b} - \tkzInterLL(Xc,X'c)(A,B) \tkzGetPoint{B'} - \tkzInterLL(Xb,X'b)(A,C) \tkzGetPoint{C'} - \tkzInterLL(Za,Z'a)(C,B) \tkzGetPoint{A''} - \tkzInterLL(Zb,Z'b)(C,A) \tkzGetPoint{B''} - \tkzDefPointBy[reflection= over Jc--Jb](B') \tkzGetPoint{Ca} - \tkzDefPointBy[reflection= over Jc--Jb](C') \tkzGetPoint{Ba} - \tkzDefPointBy[reflection= over Ja--Jb](A'')\tkzGetPoint{Bc} - \tkzDefPointBy[reflection= over Ja--Jb](B'')\tkzGetPoint{Ac} - \tkzDefCircle[circum](Ac,Ca,Ba) \tkzGetPoint{Q} - \tkzDrawCircle[circum](Ac,Ca,Ba) - \tkzDefPointWith[linear,K=1.1](Q,Ac) \tkzGetPoint{nAc} - \tkzClipCircle[through](Q,nAc) - \tkzDrawLines[add=1.5 and 1.5,dashed](A,B B,C A,C) - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPolygon[dashed,color=blue](Ja,Jb,Jc) - \tkzDrawCircles[ex](A,B,C B,C,A C,A,B) - \tkzDrawLines[add=0 and 0,dashed](Ca,Bc B,Za A,Ba B',C') - \tkzDrawLine[add=1 and 1,dashed](Xb,Xc) - \tkzDrawLine[add=7 and 3,blue](O,K) - \tkzDrawLine[add=8 and 15,red](N,Sp) - \tkzDrawLines[add=10 and 10](K,O N,Sp) - \tkzDrawSegments(Ba,Ca Bc,Ac) - \tkzDrawPoints(A,B,C,N,Ja,Jb,Jc,Xb,Xc,B',C',Za,Zb,Ba,Ca,Bc,Ac,Q,Sp,K,O) - \tkzLabelPoints(A,B,C,N,Ja,Jb,Jc,Xb,Xc,B',C',Za,Zb,Ba,Ca,Bc,Ac,Q,Sp) - \tkzLabelPoints[above](K,O) - \end{tikzpicture} -\end{tkzexample} - - - -\endinput diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-filling.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-filling.tex new file mode 100644 index 0000000000..c206565b6a --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-filling.tex @@ -0,0 +1,297 @@ +\subsection{Coloring a disc} +This was possible with the macro \tkzcname{tkzDrawCircle}, but disk tracing was mandatory, this is no longer the case. + +\begin{NewMacroBox}{tkzFillCircle}{\oarg{local options}\parg{A,B}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{radius} {radius}{two points define a radius} +\TOline{R} {radius}{a point and the measurement of a radius } +\bottomrule +\end{tabular} + +\medskip +You don't need to put \tkzname{radius} because that's the default option. Of course, you have to add all the styles of \TIKZ\ for the plots. +\end{NewMacroBox} + + +\subsubsection{Yin and Yang} +\begin{tkzexample}[latex=8cm,small] + \begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){O} + \tkzDefPoint(-4,0){A} + \tkzDefPoint(4,0){B} + \tkzDefPoint(-2,0){I} + \tkzDefPoint(2,0){J} + \tkzDrawSector[fill=teal](O,A)(B) + \tkzFillCircle[fill=white](J,B) + \tkzFillCircle[fill=teal](I,A) + \tkzDrawCircle(O,A) + \end{tikzpicture} +\end{tkzexample} + + +\subsubsection{From a sangaku} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){B} \tkzDefPoint(6,0){C}% + \tkzDefSquare(B,C) \tkzGetPoints{D}{A} + \tkzClipPolygon(B,C,D,A) + \tkzDefMidPoint(A,D) \tkzGetPoint{F} + \tkzDefMidPoint(B,C) \tkzGetPoint{E} + \tkzDefMidPoint(B,D) \tkzGetPoint{Q} + \tkzDefTangent[from = B](F,A) \tkzGetPoints{G}{H} + \tkzInterLL(F,G)(C,D) \tkzGetPoint{J} + \tkzInterLL(A,J)(F,E) \tkzGetPoint{K} + \tkzDefPointBy[projection=onto B--A](K) + \tkzGetPoint{M} + \tkzDrawPolygon(A,B,C,D) + \tkzFillCircle[red!20](E,B) + \tkzFillCircle[blue!20](M,A) + \tkzFillCircle[green!20](K,Q) + \tkzDrawCircles(B,A M,A E,B K,Q) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Clipping and filling part I} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\tkzDefPoints{0/0/A,4/0/B,2/2/O,3/4/X,4/1/Y,1/0/Z, + 0/3/W,3/0/R,4/3/S,1/4/T,0/1/U} +\tkzDefSquare(A,B)\tkzGetPoints{C}{D} +\tkzDefPointWith[colinear normed=at X,K=1](O,X) + \tkzGetPoint{F} +\begin{scope} + \tkzFillCircle[fill=teal!20](O,F) + \tkzFillPolygon[white](A,...,D) + \tkzClipPolygon(A,...,D) + \foreach \c/\t in {S/C,R/B,U/A,T/D} + {\tkzFillCircle[teal!20](\c,\t)} +\end{scope} +\foreach \c/\t in {X/C,Y/B,Z/A,W/D} +{\tkzFillCircle[white](\c,\t)} + \foreach \c/\t in {S/C,R/B,U/A,T/D} + {\tkzFillCircle[teal!20](\c,\t)} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Clipping and filling part II} +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture}[scale=.75] +\tkzDefPoints{0/0/A,8/0/B,8/8/C,0/8/D} +\tkzDefMidPoint(A,B) \tkzGetPoint{F} +\tkzDefMidPoint(B,C) \tkzGetPoint{E} +\tkzDefMidPoint(D,B) \tkzGetPoint{I} +\tkzDefMidPoint(I,B) \tkzGetPoint{a} +\tkzInterLC(B,I)(B,C) \tkzGetSecondPoint{K} +\tkzDefMidPoint(I,K) \tkzGetPoint{b} +\begin{scope} + \tkzFillSector[fill=blue!10](B,C)(A) + \tkzDrawSemiCircle[diameter,fill=white](A,B) + \tkzDrawSemiCircle[diameter,fill=white](B,C) + \tkzClipCircle(E,B) + \tkzClipCircle(F,B) + \tkzFillCircle[fill=blue!10](B,A) +\end{scope} +\tkzDrawSemiCircle[thick](F,B) +\tkzDrawSemiCircle[thick](E,C) +\tkzDrawArc[thick](B,C)(A) +\tkzDrawSegments[thick](A,B B,C) +\tkzDrawPoints(A,B,C,E,F) +\tkzLabelPoints[centered](a,b) +\tkzLabelPoints(A,B,C,E,F) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Clipping and filling part III} + +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} \tkzDefPoint(1,0){B} + \tkzDefPoint(2,0){C} \tkzDefPoint(-3,0){a} + \tkzDefPoint(3,0){b} \tkzDefPoint(0,3){c} + \tkzDefPoint(0,-3){d} +\begin{scope} + \tkzClipPolygon(a,b,c,d) + \tkzFillCircle[teal!20](A,C) +\end{scope} + \tkzFillCircle[white](A,B) + \tkzDrawCircle[color=red](A,C) + \tkzDrawCircle[color=red](A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Coloring a polygon} + \begin{NewMacroBox}{tkzFillPolygon}{\oarg{local options}\parg{points list}}% +You can color by drawing the polygon, but in this case you color the inside of the polygon without drawing it. + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2,\dots}}{\parg{A,B,\dots}}{} +%\bottomrule + \end{tabular} +\end{NewMacroBox} + +\subsubsection{\tkzcname{tkzFillPolygon}} +\begin{tkzexample}[latex=7cm, small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint(0,0){C} \tkzDefPoint(4,0){A} + \tkzDefPoint(0,3){B} + \tkzDefSquare(B,A) \tkzGetPoints{E}{F} + \tkzDefSquare(A,C) \tkzGetPoints{G}{H} + \tkzDefSquare(C,B) \tkzGetPoints{I}{J} + \tkzFillPolygon[color = orange!30 ](A,C,G,H) + \tkzFillPolygon[color = teal!40 ](C,B,I,J) + \tkzFillPolygon[color = purple!20](B,A,E,F) + \tkzDrawPolygon[line width = 1pt](A,B,C) + \tkzDrawPolygon[line width = 1pt](A,C,G,H) + \tkzDrawPolygon[line width = 1pt](C,B,I,J) + \tkzDrawPolygon[line width = 1pt](B,A,E,F) + \tkzLabelSegment[above](C,A){$a$} + \tkzLabelSegment[right](B,C){$b$} + \tkzLabelSegment[below left](B,A){$c$} +\end{tikzpicture} +\end{tkzexample} + +\subsection{\tkzcname{tkzFillSector}} +\tkzHandBomb\ Attention the arguments vary according to the options. +\begin{NewMacroBox}{tkzFillSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{towards}{towards}{$O$ is the center and the arc from $A$ to $(OB)$} +\TOline{rotate} {towards}{the arc starts from A and the angle determines its length } +\TOline{R}{towards}{We give the radius and two angles} +\TOline{R with nodes}{towards}{We give the radius and two points} +\bottomrule +\end{tabular} + +\medskip +Of course, you have to add all the styles of \TIKZ\ for the tracings... + +\medskip +\begin{tabular}{lll}% +\toprule +options & arguments & example \\ +\midrule +\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzFillSector(O,A)(B)}} +\TOline{rotate} {\parg{pt,pt}\parg{an}}{\tkzcname{tkzFillSector[rotate,color=red](O,A)(90)}} +\TOline{R}{\parg{pt,$r$}\parg{an,an}}{\tkzcname{tkzFillSector[R,color=blue](O,2)(30,90)}} +\TOline{R with nodes}{\parg{pt,$r$}\parg{pt,pt}}{\tkzcname{tkzFillSector[R with nodes](O,2)(A,B)}} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{\tkzcname{tkzFillSector} and \tkzname{towards}} +It is useless to put \tkzname{towards} and you will notice that the contours are not drawn, only the surface is colored. +\begin{tkzexample}[latex=5.75cm,small] + \begin{tikzpicture}[scale=.6] + \tkzDefPoint(0,0){O} + \tkzDefPoint(-30:3){A} + \tkzDefPointBy[rotation = center O angle -60](A) + \tkzFillSector[fill=purple!20](O,A)(tkzPointResult) + \begin{scope}[shift={(-60:1)}] + \tkzDefPoint(0,0){O} + \tkzDefPoint(-30:3){A} + \tkzDefPointBy[rotation = center O angle -60](A) + \tkzGetPoint{A'} + \tkzFillSector[color=teal!40](O,A')(A) + \end{scope} + \end{tikzpicture} +\end{tkzexample} + + +\subsubsection{\tkzcname{tkzFillSector} and \tkzname{rotate}} +\begin{tkzexample}[latex=5.75cm,small] +\begin{tikzpicture}[scale=1.5] + \tkzDefPoint(0,0){O} \tkzDefPoint(2,2){A} + \tkzFillSector[rotate,color=purple!20](O,A)(30) + \tkzFillSector[rotate,color=teal!40](O,A)(-30) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Colour an angle: \tkzcname{tkzFillAngle}} + +The simplest operation +\begin{NewMacroBox}{tkzFillAngle}{\oarg{local options}\parg{A,O,B}}% +$O$ is the vertex of the angle. $OA$ and $OB$ are the sides. Attention the angle is determined by the order of the points. + +\medskip + +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{size}{1}{this option determines the radius of the coloured angular sector.} + +\bottomrule +\end{tabular} + +\medskip +Of course, you have to add all the styles of \TIKZ, like the use of fill and shade... +\end{NewMacroBox} + +\subsubsection{Example with \tkzname{size}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzInit + \tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B} + \tkzFillAngle[size=2, fill=gray!10](A,O,B) + \tkzDrawLines(O,A O,B) + \tkzDrawPoints(O,A,B) +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Changing the order of items} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzInit + \tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B} + \tkzFillAngle[size=2,fill=gray!10](B,O,A) + \tkzDrawLines(O,A O,B) + \tkzDrawPoints(O,A,B) +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzInit + \tkzDefPoints{0/0/O,5/0/A,3/4/B} + % Don't forget {} to get, () to use + \tkzFillAngle[size=4,left color=white, + right color=red!50](A,O,B) + \tkzDrawLines(O,A O,B) + \tkzDrawPoints(O,A,B) +\end{tikzpicture} +\end{tkzexample} + +\begin{NewMacroBox}{tkzFillAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% +With common options, there is a macro for multiple angles. + \end{NewMacroBox} + +\subsubsection{Multiples angles} +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture}[scale=0.5] + \tkzDefPoints{0/0/B,8/0/C,0/8/A,8/8/D} + \tkzDrawPolygon(B,C,D,A) + \tkzDefTriangle[equilateral](B,C) \tkzGetPoint{M} + \tkzInterLL(D,M)(A,B) \tkzGetPoint{N} + \tkzDefPointBy[rotation=center N angle -60](D) + \tkzGetPoint{L} + \tkzInterLL(N,L)(M,B) \tkzGetPoint{P} + \tkzInterLL(M,C)(D,L) \tkzGetPoint{Q} + \tkzDrawSegments(D,N N,L L,D B,M M,C) + \tkzDrawPoints(L,N,P,Q,M,A,D) + \tkzLabelPoints[left](N,P,Q) + \tkzLabelPoints[above](M,A,D) + \tkzLabelPoints(L,B,C) + \tkzMarkAngles(C,B,M B,M,C M,C,B D,L,N L,N,D N,D,L) + \tkzFillAngles[fill=red!20,opacity=.2](C,B,M% + B,M,C M,C,B D,L,N L,N,D N,D,L) +\end{tikzpicture} +\end{tkzexample} +\endinput diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-installation.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-installation.tex index bcbc555fd7..32752f857b 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-installation.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-installation.tex @@ -1,62 +1,12 @@ \section{Installation} -\tkzNamePack{tkz-euclide} and \tkzNamePack{tkz-base} are now on the server of the \tkzname{CTAN}\footnote{\tkzNamePack{tkz-base} and \tkzNamePack{tkz-euclide} are part of \NameDist{TeXLive} and \tkzname{tlmgr} allows you to install them. These packages are also part of \NameDist{MiKTeX} under \NameSys{Windows}.}. If you want to test a beta version, just put the following files in a texmf folder that your system can find. +\tkzname{\tkznameofpack} is on the server of the \tkzname{CTAN}\footnote{\tkzname{\tkznameofpack} is part of \NameDist{TeXLive} and \tkzname{tlmgr} allows you to install them. This package is also part of \NameDist{MiKTeX} under \NameSys{Windows}.}. If you want to test a beta version, just put the following files in a texmf folder that your system can find. You will have to check several points: \begin{itemize}\setlength{\itemsep}{5pt} -\item The \tkzNamePack{tkz-base} and \tkzNamePack{tkz-euclide} folders must be located on a path recognized by \tkzname{latex}. -\item The \tkzNamePack{xfp}\footnote{\tkzNamePack{xfp} replaces \tkzNamePack{fp}.}, \tkzNamePack{numprint} and \tkzNamePack{tikz 3.00} must be installed as they are mandatory, for the proper functioning of \tkzNamePack{tkz-euclide}. -\item This documentation and all examples were obtained with \tkzname{lualatex-dev} but \tkzname{pdflatex} should be suitable. +\item The \tkzname{\tkznameofpack} folder must be located on a path recognized by \tkzname{latex}. +\item The \tkzname{\tkznameofpack} uses \tkzNamePack{xfp}. +\item This documentation and all examples were obtained with \tkzname{lualatex} but \tkzname{pdflatex} or \tkzname{xelatex} should be suitable. \end{itemize} -\subsection{List of folder files \tkzname{tkzbase} and \tkzname{tkzeuclide}} - -In the folder \tkzname{base}: - -\begin{itemize} -\item \tkzname{tkz-base.cfg} -\item \tkzname{tkz-base.sty} -\item \tkzname{tkz-lib-marks.tex} -\item \tkzname{tkz-obj-axes.tex} -\item \tkzname{tkz-obj-grids.tex} -\item \tkzname{tkz-obj-marks.tex} -\item \tkzname{tkz-obj-points.tex} -\item \tkzname{tkz-obj-rep.tex} -\item \tkzname{tkz-tools-arith.tex} -\item \tkzname{tkz-tools-base.tex} -\item \tkzname{tkz-tools-BB.tex} -\item \tkzname{tkz-tools-misc.tex} -\item \tkzname{tkz-tools-modules.tex} -\item \tkzname{tkz-tools-print.tex} -\item \tkzname{tkz-tools-text.tex} -\item \tkzname{tkz-tools-utilities.tex} -\end{itemize} - -In the folder \tkzname{euclide}: - -\begin{itemize} -\item \tkzname{tkz-euclide.sty} -\item \tkzname{tkz-obj-eu-angles.tex} -\item \tkzname{tkz-obj-eu-arcs.tex} -\item \tkzname{tkz-obj-eu-circles.tex} -\item \tkzname{tkz-obj-eu-compass.tex} -\item \tkzname{tkz-obj-eu-draw-circles.tex} -\item \tkzname{tkz-obj-eu-draw-lines.tex} -\item \tkzname{tkz-obj-eu-draw-polygons.tex} -\item \tkzname{tkz-obj-eu-draw-triangles.tex} -\item \tkzname{tkz-obj-eu-lines.tex} -\item \tkzname{tkz-obj-eu-points-by.tex} -\item \tkzname{tkz-obj-eu-points-rnd.tex} -\item \tkzname{tkz-obj-eu-points-with.tex} -\item \tkzname{tkz-obj-eu-points.tex} -\item \tkzname{tkz-obj-eu-polygons.tex} -\item \tkzname{tkz-obj-eu-protractor.tex} -\item \tkzname{tkz-obj-eu-sectors.tex} -\item \tkzname{tkz-obj-eu-show.tex} -\item \tkzname{tkz-obj-eu-triangles.tex} -\item \tkzname{tkz-tools-angles.tex} -\item \tkzname{tkz-tools-intersections.tex} -\item \tkzname{tkz-tools-math.tex} -\end{itemize} -\tkzHandBomb\ Now \tkzname{tkz-euclide} loads all the files. -\endinput +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-intersec.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-intersec.tex index 3f7619188d..2fb014f30c 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-intersec.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-intersec.tex @@ -43,16 +43,16 @@ So the arguments are two couples. options & default & definition \\ \midrule \TOline{N} {N} { (O,C) determines the circle} -\TOline{R} {N} { (O, 1 cm) or (O, 120 pt)} +\TOline{R} {N} { (O, 1 ) unit 1 cm} \TOline{with nodes}{N} { (O,C,D) CD is a radius} \bottomrule \end{tabular} \medskip -The macro defines the intersection points $I$ and $J$ of the line $(AB)$ and the center circle $O$ with radius $r$ if they exist; otherwise, an error will be reported in the |.log| file. +The macro defines the intersection points $I$ and $J$ of the line $(AB)$ and the center circle $O$ with radius $r$ if they exist; otherwise, an error will be reported in the |.log| file. \tkzname{with nodes} vous évite de calculer le rayon qui est la longueur de $[CD]$. \end{NewMacroBox} -\subsubsection{Simple example of a line-circle intersection} +\subsubsection{Line-circle intersection} In the following example, the drawing of the circle uses two points and the intersection of the straight line and the circle uses two pairs of points: @@ -72,6 +72,53 @@ In the following example, the drawing of the circle uses two points and the inte \end{tikzpicture} \end{tkzexample} + +\subsubsection{Line-circle intersection in Sangaku} +\begin{tkzexample}[vbox,small] + \begin{tikzpicture}[scale=1] + \def\ORadius{6} + \def\OORadius{4} + \pgfmathparse{(2*(\ORadius-\OORadius))/(\ORadius/\OORadius+1)}% + \let\OOORadius\pgfmathresult% + \pgfmathparse{\ORadius-\OOORadius}% + \let\OOOORadius\pgfmathresult% + \pgfmathparse{2*\OORadius-\ORadius}% + \let\XA\pgfmathresult% + \tkzDefPoint["$O$" below left](0,0){O} + \ifdim\XA pt = 0pt\relax% + \tkzDefPoint["$A$" below right](\XA,0){A} + \else + \tkzDefPoint["$A$" below left](\XA,0){A} + \fi + \tkzDefPoint["$D$" below right](\OORadius,0){D} + \tkzDefPoint["$X$" below left](-\ORadius,0){X} + \tkzDefPoint["$B$" below right](\ORadius,0){B} + \tkzDefPoint["$O_2$" below left](\OORadius-\ORadius,0){O2} + \tkzDefLine[mediator](A,B) \tkzGetPoints{mr}{ml} + \tkzInterLC[R](D,mr)(O,\ORadius) \tkzGetPoints{C}{E} + \tkzDefLine[orthogonal=through A](X,A) \tkzGetPoint{pr} + \ifdim\XA pt < 0 pt\relax + \tkzInterLC[R](A,pr)(O,\OOOORadius) \tkzGetPoints{O4}{O3} + \else + \ifdim\XA pt = 0pt\relax + \tkzInterLC[R](A,pr)(O,\OOOORadius) \tkzGetPoints{O4}{O3} + \else + \tkzInterLC[R](A,pr)(O,\OOOORadius) \tkzGetPoints{O3}{O4} + \fi + \fi + \tkzDefPointBy[projection=onto A--C](O3) \tkzGetPoint{H} + \tkzDrawCircles[R](O,{\ORadius} O2,{\OORadius} O3,{\OOORadius}) + \tkzDrawSegments[dashed](O,O3 C,D O3,A O3,H) + \tkzDrawSegments(X,B A,C B,C) + \tkzMarkSegments[mark=s|](D,B D,A) + \tkzLabelPoints[right](O3,H) + \tkzLabelPoint[above right](C){$C$} + \tkzMarkRightAngles[fill=gray!30](X,D,C X,A,O3 A,H,O3) + \tkzDrawPoints(A,B,C,D,X,O,O2,O3,H) + \end{tikzpicture} +\end{tkzexample} + + \subsubsection{More complex example of a line-circle intersection} Figure from \url{http://gogeometry.com/problem/p190_tangent_circle} @@ -81,21 +128,20 @@ Figure from \url{http://gogeometry.com/problem/p190_tangent_circle} \tkzDefPoint(8,0){B} \tkzDefMidPoint(A,B) \tkzGetPoint{O} - \tkzDrawCircle(O,B) \tkzDefMidPoint(O,B) \tkzGetPoint{O'} - \tkzDrawCircle(O',B) \tkzDefTangent[from=A](O',B) \tkzGetSecondPoint{E} \tkzInterLC(A,E)(O,B) \tkzGetSecondPoint{D} \tkzDefPointBy[projection=onto A--B](D) - \tkzGetPoint{F} - \tkzMarkRightAngle(D,F,B) + \tkzGetPoint{F} + \tkzDrawCircles(O,B O',B) \tkzDrawSegments(A,D A,B D,F) \tkzDrawSegments[color=red,line width=1pt, opacity=.4](A,O F,B) \tkzDrawPoints(A,B,O,O',E,D) + \tkzMarkRightAngle(D,F,B) \tkzLabelPoints(A,B,O,O',E,D) \end{tikzpicture} \end{tkzexample} @@ -108,16 +154,15 @@ Let's look at some special cases like straight lines tangent to the circle. \tkzDefPoint(0,8){A} \tkzDefPoint(8,0){B} \tkzDefPoint(8,8){C} \tkzDefPoint(4,4){I} \tkzDefPoint(2,7){E} \tkzDefPoint(6,4){F} - \tkzDrawCircle[R](I,4 cm) - \tkzInterLC[R](A,C)(I,4 cm) \tkzGetPoints{I1}{I2} - \tkzInterLC[R](B,C)(I,4 cm) \tkzGetPoints{J1}{J2} - \tkzInterLC[R](A,B)(I,4 cm) \tkzGetPoints{K1}{K2} + \tkzInterLC[R](A,C)(I,4) \tkzGetPoints{I1}{I2} + \tkzInterLC[R](B,C)(I,4) \tkzGetPoints{J1}{J2} + \tkzInterLC[R](A,B)(I,4) \tkzGetPoints{K1}{K2} + \tkzInterLC[R](E,F)(I,4) \tkzGetPoints{I2}{J2} + \tkzDrawCircle[R](I,4) \tkzDrawPoints[color=red](I1,J1,K1,K2) - \tkzDrawLines(A,B B,C A,C) - \tkzInterLC[R](E,F)(I,4 cm) \tkzGetPoints{I2}{J2} + \tkzDrawLines(A,B B,C A,C I2,J2) \tkzDrawPoints[color=blue](E,F) \tkzDrawPoints[color=red](I2,J2) - \tkzDrawLine(I2,J2) \end{tikzpicture} \end{tkzexample} @@ -126,23 +171,23 @@ Let's look at some special cases like straight lines tangent to the circle. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,1){J} - \tkzDefPoint(0,0){O} - \tkzDrawArc[R,line width=1pt,color=red](J,2.5 cm)(180,0) - \foreach \i in {0,-5,-10,...,-85,-90}{ - \tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P} - \tkzDrawSegment[color=orange](J,P) - \tkzInterLC[R](P,J)(O,1 cm) - \tkzGetPoints{M}{N} - \tkzDrawPoints[red](N) - } - \foreach \i in {-90,-95,...,-175,-180}{ - \tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P} - \tkzDrawSegment[color=orange](J,P) - \tkzInterLC[R](P,J)(O,1 cm) - \tkzGetPoints{M}{N} - \tkzDrawPoints[red](M) - } +\tkzDefPoint(0,1){J} +\tkzDefPoint(0,0){O} +\tkzDrawArc[R,line width=1pt,color=red](J,2.5)(180,0) +\foreach \i in {0,-5,-10,...,-85,-90}{ + \tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P} + \tkzDrawSegment[color=orange](J,P) + \tkzInterLC[R](P,J)(O,1) + \tkzGetPoints{M}{N} + \tkzDrawPoints[red](N) + } +\foreach \i in {-90,-95,...,-175,-180}{ + \tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P} + \tkzDrawSegment[color=orange](J,P) + \tkzInterLC[R](P,J)(O,1) + \tkzGetPoints{M}{N} + \tkzDrawPoints[red](M) + } \end{tikzpicture} \end{tkzexample} @@ -151,7 +196,7 @@ Let's look at some special cases like straight lines tangent to the circle. The radius measurement may be the result of a calculation that is not done within the intersection macro, but before. A length can be calculated in several ways. It is possible of course, - to use the module \tkzname{pgfmath} and the macro \tkzcname{pgfmathsetmacro}. In some cases, the results obtained are not precise enough, so the following calculation $0.0002 \div 0.0001$ gives $1.98$ with pgfmath while xfp will give $2$. + to use the module \tkzname{pgfmath} and the macro \tkzcname{pgfmathsetmacro}. In some cases, the results obtained are not precise enough, so the following calculation $0.0002 \div 0.0001$ gives $1.98$ with pgfmath while xfp will give $2$. \subsubsection{Calculation of radius example 2} With \tkzname{xfp} and \tkzcname{fpeval}: @@ -161,64 +206,27 @@ With \tkzname{xfp} and \tkzcname{fpeval}: \tkzDefPoint(2,2){A} \tkzDefPoint(5,4){B} \tkzDefPoint(4,4){O} - \edef\tkzLen{\fpeval{0.0002/0.0001}} - \tkzDrawCircle[R](O,\tkzLen cm) - \tkzInterLC[R](A,B)(O, \tkzLen cm) + \pgfmathsetmacro\tkzLen{\fpeval{0.0002/0.0001}} + % or \edef\tkzLen{\fpeval{0.0002/0.0001}} + \tkzInterLC[R](A,B)(O, \tkzLen) \tkzGetPoints{I}{J} + \tkzDrawCircle[R](O,\tkzLen) \tkzDrawPoints[color=blue](A,B) \tkzDrawPoints[color=red](I,J) \tkzDrawLine(I,J) \end{tikzpicture} \end{tkzexample} -\subsubsection{Calculation of radius example 3} - With \TEX\ and \tkzcname{tkzLength}. - - This dimension was created with \tkzcname{newdimen}. 2 cm has been transformed into points. It is of course possible to use \TEX\ to calculate. - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoints{2/2/A,5/4/B,4/4/0} - \tkzLength=2cm - \tkzDrawCircle[R](O,\tkzLength) - \tkzInterLC[R](A,B)(O,\tkzLength) - \tkzGetPoints{I}{J} - \tkzDrawPoints[color=blue](A,B) - \tkzDrawPoints[color=red](I,J) - \tkzDrawLine(I,J) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Squares in half a disc} -A Sangaku look! It is a question of proving that one can inscribe in a half-disc, two squares, and to determine the length of their respective sides according to the radius. - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,8/0/B,4/0/I} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzInterLC(I,C)(I,B)\tkzGetPoints{E'}{E} - \tkzInterLC(I,D)(I,B)\tkzGetPoints{F'}{F} - \tkzDefPointsBy[projection = onto A--B](E,F){H,G} - \tkzDefPointsBy[symmetry = center H](I){J} - \tkzDefSquare(H,J)\tkzGetPoints{K}{L} - \tkzDrawSector[fill=brown!30](I,B)(A) - \tkzFillPolygon[color=red!40](H,E,F,G) - \tkzFillPolygon[color=blue!40](H,J,K,L) - \tkzDrawPolySeg[color=red](H,E,F,G) - \tkzDrawPolySeg[color=red](J,K,L) - \tkzDrawPoints(E,G,H,F,J,K,L) -\end{tikzpicture} -\end{tkzexample} \subsubsection{Option "with nodes"} \begin{tkzexample}[latex=8cm,small] \begin{tikzpicture}[scale=.75] \tkzDefPoints{0/0/A,4/0/B,1/1/D,2/0/E} -\tkzDefTriangle[equilateral](A,B) +\tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C} -\tkzDrawCircle(C,A) -\tkzInterLC[with nodes](D,E)(C,A,B) +\tkzInterLC[with nodes](D,E)(C,A,B) \tkzGetPoints{F}{G} +\tkzDrawCircle(C,A) \tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,...,G) \tkzDrawLine(F,G) @@ -251,8 +259,7 @@ It is also possible to use directly \tkzcname{tkzInterCCN} and \tkzcname{tkzInte \tkzDefPoint(5,1){B} \tkzInterCC(A,B)(B,A)\tkzGetPoints{C}{D} \tkzDrawPoint[color=black](C) - \tkzDrawCircle[dashed](A,B) - \tkzDrawCircle[dashed](B,A) + \tkzDrawCircles(A,B B,A) \tkzCompass[color=red](A,C) \tkzCompass[color=red](B,C) \tkzDrawPolygon(A,B,C) @@ -267,12 +274,11 @@ It is also possible to use directly \tkzcname{tkzInterCCN} and \tkzcname{tkzInte \begin{tikzpicture}[scale=.5] \tkzDefPoint(0,0){A} \tkzDefPoint(2,2){B} - \tkzDrawCircle[color=blue](B,A) - \tkzDrawCircle[color=blue](A,B) \tkzInterCC(B,A)(A,B)\tkzGetPoints{M}{N} - \tkzDrawLine(A,B) + \tkzDrawCircles[color=teal](A,B B,A) + \tkzDrawCircle[color=teal](A,B) \tkzDrawPoints(M,N) - \tkzDrawLine[color=red](M,N) + \tkzDrawLine[new](M,N) \end{tikzpicture} \end{tkzexample} @@ -281,14 +287,13 @@ It is also possible to use directly \tkzcname{tkzInterCCN} and \tkzcname{tkzInte \begin{tikzpicture}[rotate=120,scale=.75] \tkzDefPoint(1,2){A} \tkzDefPoint(4,0){B} - \tkzInterCC[R](A,4cm)(B,4cm) + \tkzInterCC[R](A,4)(B,4) \tkzGetPoints{C}{D} - \tkzDrawCircle[R,dashed](A,4 cm) - \tkzDrawCircle[R,dashed](B,4 cm) - \tkzCompass[color=red](A,C) - \tkzCompass[color=red](B,C) + \tkzDrawCircles[R,dashed](A,4 B,4) + \tkzCompass[new](A,C) + \tkzCompass[new](B,C) \tkzDrawPolygon(A,B,C) - \tkzDrawPoints[color=blue](A,B,C) + \tkzDrawPoints(A,B,C) \tkzMarkSegments[mark=s|](A,C B,C) \tkzLabelPoints[](A,B) \tkzLabelPoint[above](C){$C$} @@ -298,60 +303,100 @@ It is also possible to use directly \tkzcname{tkzInterCCN} and \tkzcname{tkzInte \subsubsection{Segment trisection} The idea here is to divide a segment with a ruler and a compass into three segments of equal length. - -\begin{tkzexample}[latex=9cm,small] -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(0,0){A} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint(0,0){A} \tkzDefPoint(3,2){B} - \tkzInterCC(A,B)(B,A) - \tkzGetPoints{C}{D} - \tkzInterCC(D,B)(B,A) - \tkzGetPoints{A}{E} - \tkzInterCC(D,B)(A,B) - \tkzGetPoints{F}{B} - \tkzInterLC(E,F)(F,A) - \tkzGetPoints{D}{G} - \tkzInterLL(A,G)(B,E) - \tkzGetPoint{O} - \tkzInterLL(O,D)(A,B) - \tkzGetPoint{J} - \tkzInterLL(O,F)(A,B) - \tkzGetPoint{I} - \tkzDrawCircle(D,A) - \tkzDrawCircle(A,B) - \tkzDrawCircle(B,A) - \tkzDrawCircle(F,A) - \tkzDrawSegments[color=red](O,G + \tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{D} + \tkzInterCC(D,B)(B,A) \tkzGetPoints{A}{E} + \tkzInterCC(D,B)(A,B) \tkzGetPoints{F}{B} + \tkzInterLC(E,F)(F,A) \tkzGetPoints{D}{G} + \tkzInterLL(A,G)(B,E) \tkzGetPoint{O} + \tkzInterLL(O,D)(A,B) \tkzGetPoint{J} + \tkzInterLL(O,F)(A,B) \tkzGetPoint{I} + \tkzDrawCircles(D,A A,B B,A F,A) + \tkzDrawSegments[new](O,G O,B O,D O,F) - \tkzDrawPoints(A,B,D,E,F,G,I,J) + \tkzDrawPoints(A,B,D,E,F,G,I,J) \tkzLabelPoints(A,B,D,E,F,G,I,J) - \tkzDrawSegments[blue](A,B B,D A,D% + \tkzDrawSegments(A,B B,D A,D% A,F F,G E,G B,E) \tkzMarkSegments[mark=s|](A,I I,J J,B) \end{tikzpicture} \end{tkzexample} -\subsubsection{With the option \tkzimp{with nodes}} +\subsubsection{With the option "\tkzimp{with nodes}"} \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=.5] \tkzDefPoints{0/0/a,0/5/B,5/0/C} \tkzDefPoint(54:5){F} - \tkzDrawCircle[color=gray](A,C) - \tkzInterCC[with nodes](A,A,C)(C,B,F) + \tkzInterCC[with nodes](A,A,C)(C,B,F) \tkzGetPoints{a}{e} \tkzInterCC(A,C)(a,e) \tkzGetFirstPoint{b} \tkzInterCC(A,C)(b,a) \tkzGetFirstPoint{c} \tkzInterCC(A,C)(c,b) \tkzGetFirstPoint{d} - \tkzDrawPoints(a,b,c,d,e) - \tkzDrawPolygon[color=red](a,b,c,d,e) + \tkzDrawCircle[new](A,C) + \tkzDrawPoints(a,b,c,d,e) + \tkzDrawPolygon(a,b,c,d,e) \foreach \vertex/\num in {a/36,b/108,c/180, d/252,e/324}{% \tkzDrawPoint(\vertex) - \tkzLabelPoint[label=\num:$\vertex$](\vertex){} - \tkzDrawSegment[color=gray,style=dashed](A,\vertex) - } + \tkzLabelPoint[label=\num:$\vertex$](\vertex){} + \tkzDrawSegment(A,\vertex) + } \end{tikzpicture} \end{tkzexample} - \endinput +\subsubsection{Mix of intersections} +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}[scale = .75] + \tkzDefPoint(2,2){A} + \tkzDefPoint(0,0){B} + \tkzDefPoint(-2,2){C} + \tkzDefPoint(0,4){D} + \tkzDefPoint(4,2){E} + \tkzCircumCenter(A,B,C)\tkzGetPoint{O} + \tkzInterCC[R](O,2)(D,2) \tkzGetPoints{M1}{M2} + \tkzInterCC(O,A)(D,O) \tkzGetPoints{1}{2} + \tkzInterLC(A,E)(B,M1) \tkzGetSecondPoint{M3} + \tkzInterLC(O,C)(M3,D) \tkzGetSecondPoint{L} + \tkzDrawSegments(C,L) + \tkzDrawPoints(A,B,C,D,E,M1,M2,M3,O,L) + \tkzDrawSegments(O,E) + \tkzDrawSegments[dashed](C,A D,B) + \tkzDrawPoint(O) + \tkzDrawCircles[dashed](M3,D B,M2 D,O) + \tkzDrawCircle(O,A) + \tkzLabelPoints(A,B,C,D,E,M1,M2,M3,O,L) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{An oval} + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture}[scale=0.4] + \tkzDefPoint(-4,0){I} + \tkzDefPoint(4,0){J} + \tkzDefPoint(0,0){O} + \tkzInterCC(J,O)(O,J) \tkzGetPoints{L}{H} + \tkzInterCC(I,O)(O,I) \tkzGetPoints{K}{G} + \tkzInterLL(I,K)(J,H) \tkzGetPoint{M} + \tkzInterLL(I,G)(J,L) \tkzGetPoint{N} + \tkzDefPointsBy[symmetry=center J](L,H){D,E} + \tkzDefPointsBy[symmetry=center I](G,K){C,F} + \begin{scope}[line style/.style = {very thin,teal}] + \tkzDrawLines[add=1.5 and 1.5](I,K I,G J,H J,L) + \tkzDrawLines[add=.5 and .5](I,J) + \tkzDrawPoints(H,L,K,G,I,J,D,E,C,F,M,N) + \tkzDrawCircles[R](O,4 I,4 J,4) + \tkzDrawArc(N,D)(C) + \tkzDrawArc(M,F)(E) + \tkzDrawArc(J,E)(D) + \tkzDrawArc(I,C)(F) + \end{scope} + \tkzLabelPoints(H,L,K,G,I,J,D,E,C,F,M,N) + \end{tikzpicture} +\end{tkzexample} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-labelling.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-labelling.tex new file mode 100644 index 0000000000..9553e4d996 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-labelling.tex @@ -0,0 +1,437 @@ +\section{Labelling} +\subsection{Label for a point} +\hypertarget{tlp}{} +It is possible to add several labels at the same point by using this macro several times. + + +\begin{NewMacroBox}{tkzLabelPoint}{\oarg{local options}\parg{point}\var{label}}% +\begin{tabular}{lll}% +arguments & example & \\ +\midrule +\TAline{point}{\tkzcname{tkzLabelPoint(A)\{\$A\_1\$\}}}{} +options & default & definition\\ +\midrule +\TOline{TikZ options}{}{colour, position etc.} +\bottomrule +\end{tabular} + +\medskip +Optionally, we can use any style of \TIKZ, especially placement with above, right, dots... +\end{NewMacroBox} + +\subsubsection{Example with \tkzcname{tkzLabelPoint}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDefPoint(4,0){B} + \tkzDefPoint(0,3){C} + \tkzDrawSegments(A,B B,C C,A) + \tkzDrawPoints(A,B,C) + \tkzLabelPoint[left,red](A){$A$} + \tkzLabelPoint[right,blue](B){$B$} + \tkzLabelPoint[above,purple](C){$C$} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Label and reference} + The reference of a point is the object that allows to use the point, the label is the name of the point that will be displayed. + +\begin{tkzexample}[latex=6cm,small] + \begin{tikzpicture} + \tkzDefPoint(2,0){A} + \tkzDrawPoint(A) + \tkzLabelPoint[above](A){$A_1$} + \end{tikzpicture} + \end{tkzexample} + +\subsection{Add labels to points \tkzcname{tkzLabelPoints}} +It is possible to place several labels quickly when the point references are identical to the labels and when the labels are placed in the same way in relation to the points. By default, \tkzname{below right} is chosen. +\hypertarget{tlps}{} + +\begin{NewMacroBox}{tkzLabelPoints}{\oarg{local options}\parg{$A_1,A_2,...$}}% +\begin{tabular}{lll} +arguments & example & result \\ +\midrule +\TAline{list of points}{\tkzcname{tkzLabelPoints(A,B,C)}}{Display of $A$, $B$ and $C$} +\bottomrule +\end{tabular} + +\medskip +This macro reduces the number of lines of code, but it is not obvious that all points need the same label positioning. +\end{NewMacroBox} + +\subsubsection{Example with \tkzcname{tkzLabelPoints}} +\begin{tkzexample}[latex = 6cm,small] +\begin{tikzpicture} + \tkzDefPoint(2,3){A} + \tkzDefShiftPoint[A](30:2){B} + \tkzDefShiftPoint[A](30:5){C} + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B,C) +\end{tikzpicture} +\end{tkzexample} + +%<---------------------------------------------------------------------------> +% tkzAutoLabelPoints +%<---------------------------------------------------------------------------> +\subsection{Automatic position of labels \tkzcname{tkzAutoLabelPoints}} +The label of a point is placed in a direction defined by a center and a point \tkzname{center}. The distance to the point is determined by a percentage of the distance between the center and the point. This percentage is given by \tkzname{dist}. +\begin{NewMacroBox}{tkzLabelPoints}{\oarg{local options}\parg{$A_1,A_2,...$}}% +\begin{tabular}{lll} +arguments & example & result \\ +\midrule +\TAline{list of points}{\tkzcname{tkzLabelPoint(A,B,C)}}{Display of $A$, $B$ and $C$} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Example with \tkzcname{tkzAutoLabelPoints}} +Here the points are positioned relative to the center of gravity of $A,B,C \text{ and } O$. +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture}[scale=1.25] + \tkzDefPoint(2,1){O} + \tkzDefRandPointOn[circle=center O radius 1.5] + \tkzGetPoint{A} + \tkzDrawCircle(O,A) + \tkzDefPointBy[rotation=center O angle 100](A) + \tkzGetPoint{C} + \tkzDefPointBy[rotation=center O angle 78](A) + \tkzGetPoint{B} + \tkzDrawPoints(O,A,B,C) + \tkzDrawSegments(C,B B,A A,O O,C) + \tkzDefCentroid(A,B,C,O) + \tkzDrawPoint(tkzPointResult) + \tkzAutoLabelPoints[center=tkzPointResult, + dist=.3,red](O,A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example with \tkzcname{tkzAutoLabelPoints}} +This time the reference is $O$ and the distance is by default $0.15$. +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture}[scale=1.25] + \tkzDefPoint(2,1){O} + \tkzDefRandPointOn[circle=center O radius 1.5] + \tkzGetPoint{A} + \tkzDrawCircle(O,A) + \tkzDefPointBy[rotation=center O angle 100](A) + \tkzGetPoint{C} + \tkzDefPointBy[rotation=center O angle 78](A) + \tkzGetPoint{B} + \tkzDrawPoints(O,A,B,C) + \tkzDrawSegments(C,B B,A A,O O,C) + \tkzAutoLabelPoints[center=O,red](A,B,C) +\end{tikzpicture} +\end{tkzexample} + + +\section{Label for a segment} +\hypertarget{tls}{} +\begin{NewMacroBox}{tkzLabelSegment}{\oarg{local options}\parg{pt1,pt2}\marg{label}} +This macro allows you to place a label along a segment or a line. The options are those of \TIKZ\ for example \tkzname{pos}. + +\medskip +\begin{tabular}{lll}%% +argument & example & definition \\ +\midrule +\TAline{label}{\tkzcname{tkzLabelSegment(A,B)\{$5$\}}}{label text} +\TAline{(pt1,pt2)}{(A,B)}{label along $[AB]$} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{pos}{.5}{label's position} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{First example} +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture} +\tkzDefPoint(0,0){A} +\tkzDefPoint(6,0){B} +\tkzDrawSegment(A,B) +\tkzLabelSegment[above,pos=.8](A,B){$a$} +\tkzLabelSegment[below,pos=.2](A,B){$4$} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example : blackboard} +\begin{tkzexample}[latex=6cm,small] +\tikzstyle{background rectangle}=[fill=black] +\begin{tikzpicture}[show background rectangle,scale=.4] + \tkzDefPoint(0,0){O} + \tkzDefPoint(1,0){I} + \tkzDefPoint(10,0){A} + \tkzDefPointWith[orthogonal normed,K=4](I,A) + \tkzGetPoint{H} + \tkzDefMidPoint(O,A) \tkzGetPoint{M} + \tkzInterLC(I,H)(M,A)\tkzGetPoints{C}{B} + \tkzDrawSegments[color=white,line width=1pt](I,H O,A) + \tkzDrawPoints[color=white](O,I,A,B,M) + \tkzMarkRightAngle[color=white,line width=1pt](A,I,B) + \tkzDrawArc[color=white,line width=1pt, + style=dashed](M,A)(O) + \tkzLabelSegment[white,right=1ex,pos=.5](I,B){$\sqrt{a}$} + \tkzLabelSegment[white,below=1ex,pos=.5](O,I){$1$} + \tkzLabelSegment[pos=.6,white,below=1ex](I,A){$a$} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Labels and option : \tkzname{swap}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[rotate=-60] +\tkzSetUpStyle[red,auto]{label seg style} +\tkzDefPoint(0,1){A} +\tkzDefPoint(2,4){C} +\tkzDefPointWith[orthogonal normed,K=7](C,A) +\tkzGetPoint{B} +\tkzDefSpcTriangle[orthic](A,B,C){N,O,P} +\tkzDefTriangleCenter[circum](A,B,C) +\tkzGetPoint{O} +\tkzDrawPolygon[green!60!black](A,B,C) +\tkzDrawLine[dashed,color=magenta](C,P) +\tkzLabelSegment(B,A){$c$} +\tkzLabelSegment[swap](B,C){$a$} +\tkzLabelSegment[swap](C,A){$b$} +\tkzMarkAngles[size=1, + color=cyan,mark=|](C,B,A A,C,P) +\tkzMarkAngle[size=0.75, + color=orange,mark=||](P,C,B) +\tkzMarkAngle[size=0.75, + color=orange,mark=||](B,A,C) +\tkzMarkRightAngles[german](A,C,B B,P,C) +\tkzAutoLabelPoints[center = O,dist= .1](A,B,C) + \tkzLabelPoint[below left](P){$P$} + \end{tikzpicture} +\end{tkzexample} + +\hypertarget{tlss}{} + \begin{NewMacroBox}{tkzLabelSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% +The arguments are a two-point couple list. The styles of \TIKZ\ are available for plotting. +\end{NewMacroBox} + +\subsubsection{Labels for an isosceles triangle} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=1] + \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C} + \tkzDrawSegments(O,A A,B) + \tkzDrawPoints(O,A,B) + \tkzDrawLine(O,B) + \tkzLabelSegments[color=red,above=4pt](O,A A,B){$a$} +\end{tikzpicture} +\end{tkzexample} + + +\section{Add labels on a straight line \tkzcname{tkzLabelLine}}% + +\begin{NewMacroBox}{tkzLabelLine}{\oarg{local options}\parg{pt1,pt2}\marg{label}} +\begin{tabular}{lll}% +arguments & default & definition \\ +\midrule +\TAline{label}{}{\tkzcname{tkzLabelLine(A,B)}\{\$\tkzcname{Delta}\$\}} +\bottomrule +\end{tabular} + +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{pos}{.5}{\tkzname{pos} is an option for \TIKZ, but essential in this case\dots} +\end{tabular} + +As an option, and in addition to the \tkzname{pos}, you can use all styles of \TIKZ, especially the placement with \tkzname{above}, \tkzname{right}, \dots +\end{NewMacroBox} + +\subsubsection{Example with \tkzcname{tkzLabelLine}} +An important option is \tkzname{pos}, it's the one that allows you to place the label along the right. The value of \tkzname{pos} can be greater than 1 or negative. + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,3/0/B,1/1/C} + \tkzDefLine[perpendicular=through C,K=-1](A,B) + \tkzGetPoint{c} + \tkzDrawLines(A,B C,c) + \tkzLabelLine[pos=1.25,blue,right](C,c){$(\delta)$} + \tkzLabelLine[pos=-0.25,red,left](C,c){again $(\delta)$} +\end{tikzpicture} +\end{tkzexample} + +\subsection{Label at an angle : \tkzcname{tkzLabelAngle}} + +\begin{NewMacroBox}{tkzLabelAngle}{\oarg{local options}\parg{A,O,B}}% +There is only one option, dist (with or without unit), which can be replaced by the TikZ's pos option (without unit for the latter). By default, the value is in centimeters. + +\begin{tabular}{lll}% + \toprule +options & default & definition \\ +\midrule +\TOline{pos}{1}{ or dist, controls the distance from the top to the label.} +\bottomrule +\end{tabular} + +\medskip +It is possible to move the label with all TikZ options : rotate, shift, below, etc. +\end{NewMacroBox} + +\subsubsection{Example author js bibra stackexchange} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){C} + \tkzDefPoint(20:9){B} + \tkzDefPoint(80:5){A} + \tkzDefPointsBy[projection=onto B--C](A){a} + \tkzDrawPolygon[thick,fill=yellow!15](A,B,C) + \tkzDrawSegment[dashed, red](A,a) + \tkzDrawSegment[style=red, dashed, + dim={$10$,15pt,midway,font=\scriptsize, + rotate=90}](A,a) + \tkzMarkAngle(B,C,A) + \tkzMarkRightAngle(A,a,C) + \tkzMarkRightAngle(C,A,B) + \tkzFillAngle[fill=blue!20, opacity=0.5](B,C,A) + \tkzFillAngle[fill=red!20, opacity=0.5](A,B,C) + \tkzLabelAngle[pos=1.25](A,B,C){$\beta$} + \tkzLabelAngle[pos=1.25](B,C,A){$\alpha$} + \tkzMarkAngle(A,B,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(B,C) + \tkzLabelPoints[above](A) +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Example with \tkzname{pos}} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/O,5/0/A,3/4/B} + \tkzMarkAngle[size = 4,mark = ||, + arc=ll,color = red](A,O,B)% + \tkzDrawLines(O,A O,B) + \tkzDrawPoints(O,A,B) + \tkzLabelAngle[pos=2,draw,circle, + fill=blue!10](A,O,B){$\alpha$} +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[rotate=30] + \tkzDefPoint(2,1){S} + \tkzDefPoint(7,3){T} + \tkzDefPointBy[rotation=center S angle 60](T) + \tkzGetPoint{P} + \tkzDefLine[bisector,normed](T,S,P) + \tkzGetPoint{s} + \tkzDrawPoints(S,T,P) + \tkzDrawPolygon[color=blue](S,T,P) + \tkzDrawLine[dashed,color=blue,add=0 and 3](S,s) + \tkzLabelPoint[above right](P){$P$} + \tkzLabelPoints(S,T) + \tkzMarkAngle[size = 1.8,mark = |,arc=ll, + color = blue](T,S,P) + \tkzMarkAngle[size = 2.1,mark = |,arc=l, + color = blue](T,S,s) + \tkzMarkAngle[size = 2.3,mark = |,arc=l, + color = blue](s,S,P) + \tkzLabelAngle[pos = 1.5](T,S,P){$60^{\circ}$}% + \tkzLabelAngles[pos = 2.7](T,S,s s,S,P){% + $30^{\circ}$}% +\end{tikzpicture} +\end{tkzexample} + + + +\begin{NewMacroBox}{tkzLabelAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% +With common options, there is a macro for multiple angles. +\end{NewMacroBox} + +It finally remains to be able to give a label to designate a circle and if several possibilities are offered, we will see here \tkzcname{tkzLabelCircle}. + +\subsection{Giving a label to a circle} +\begin{NewMacroBox}{tkzLabelCircle}{\oarg{local options}\parg{A,B}\parg{angle}\marg{label}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{radius} {radius}{circle characterized by two points defining a radius} +\TOline{R} {radius}{circle characterized by a point and the measurement of a radius } +\bottomrule +\end{tabular} + +\medskip +You don't need to put \tkzname{radius} because that's the default option. We can use the styles from \TIKZ. The label is created and therefore "passed" between braces. +\end{NewMacroBox} + +\subsubsection{Example} +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){O} \tkzDefPoint(2,0){N} + \tkzDefPointBy[rotation=center O angle 50](N) + \tkzGetPoint{M} + \tkzDefPointBy[rotation=center O angle -20](N) + \tkzGetPoint{P} + \tkzDefPointBy[rotation=center O angle 125](N) + \tkzGetPoint{P'} + \tkzLabelCircle[above=4pt](O,N)(120){$\mathcal{C}$} + \tkzDrawCircle(O,M) + \tkzFillCircle[color=blue!10,opacity=.4](O,M) + \tkzLabelCircle[R,draw, + text width=2cm,text centered](O,3)(-60)% + {The circle\\ $\mathcal{C}$} + \tkzDrawPoints(M,P)\tkzLabelPoints[right](M,P) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Second example} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoints{2/3/A,5/-1/B} + \tkzDefPoint[label=below:$\mathcal{C}$, + shift={(2,3)}](-30:5.5){E} + \begin{scope}[shift=(A)] + \tkzDefPoint(30:5){C} + \end{scope} + \tkzDrawCircle(A,B) + \tkzDrawSegment(A,B) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints[right](B,C) + \tkzLabelPoints[above](A) +\end{tikzpicture} +\end{tkzexample} + +\section{Label for an arc} +\hypertarget{tls}{} +\begin{NewMacroBox}{tkzLabelArc}{\oarg{local options}\parg{pt1,pt2,pt3}\marg{label}} +This macro allows you to place a label along an arc. The options are those of \TIKZ\ for example \tkzname{pos}. + +\medskip +\begin{tabular}{lll}%% +argument & example & definition \\ +\midrule +\TAline{label}{\tkzcname{tkzLabelSegment(A,B)\{$5$\}}}{label text} +\TAline{(pt1,pt2,pt3)}{(O,A,B)}{label along the arc $\widearc{AB}$} +\bottomrule +\end{tabular} + +\medskip +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{pos}{.5}{label's position} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Label on arc} +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture} +\tkzDefPoint(0,0){O} +\pgfmathsetmacro\r{2} +\tkzDefPoint(30:\r){A} +\tkzDefPoint(85:\r){B} +\tkzDrawCircle(O,A) +\tkzDrawPoints(B,A,O) +\tkzLabelArc[right=2pt](O,A,B){$\widearc{AB}$} +\tkzLabelPoints(A,B,O) +\end{tikzpicture} +\end{tkzexample} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex index 45e4a3d3fd..923a5b462e 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-lines.tex @@ -7,6 +7,7 @@ It is of course essential to draw straight lines, but before this can be done, i \begin{NewMacroBox}{tkzDefLine}{\oarg{local options}\parg{pt1,pt2} or \parg{pt1,pt2,pt3}}% The argument is a list of two or three points. Depending on the case, the macro defines one or two points necessary to obtain the line sought. Either the macro \tkzcname{tkzGetPoint} or the macro \tkzcname{tkzGetPoints} must be used. +I used the term "mediator" to designate the perpendicular bisector line at the middle of a line segment. \medskip \begin{tabular}{lll}% @@ -21,7 +22,7 @@ arguments & example & explication \\ \begin{tabular}{lll}% \toprule options & default & definition \\ -\TOline{mediator}{}{two points are defined} +\TOline{mediator}{}{perpendicular bisector of a line segment} \TOline{perpendicular=through\dots}{mediator}{perpendicular to a straight line passing through a point} \TOline{orthogonal=through\dots}{mediator}{see above } \TOline{parallel=through\dots}{mediator}{parallel to a straight line passing through a point} @@ -39,7 +40,7 @@ options & default & definition \\ \tkzDefLine[mediator](A,B) \tkzGetPoints{C}{D} \tkzDefPointWith[linear,K=.75](C,D) \tkzGetPoint{D} \tkzDefMidPoint(A,B) \tkzGetPoint{I} - \tkzFillPolygon[color=orange!30](A,C,B,D) + \tkzFillPolygon[color=teal!30](A,C,B,D) \tkzDrawSegments(A,B C,D) \tkzMarkRightAngle(B,I,C) \tkzDrawSegments(D,B D,A) @@ -54,7 +55,7 @@ options & default & definition \\ \tkzDefLine[bisector,normed](B,A,C) \tkzGetPoint{a} \tkzDrawLines[add= 0 and .5](A,B A,C) \tkzShowLine[bisector,gap=4,size=2,color=red](B,A,C) - \tkzDrawLines[blue!50,dashed,add= 0 and 3](A,a) + \tkzDrawLines[new,dashed,add= 0 and 3](A,a) \end{tikzpicture} \end{tkzexample} @@ -108,7 +109,7 @@ It is not necessary to name the two points that define the mediator. \foreach \ang in {5,10,...,360}{% \tkzDefPoint(\ang:4){M} \tkzDefLine[mediator](A,M) - \tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)} + \tkzDrawLine[color=teal,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)} \end{tikzpicture} \end{tkzexample} @@ -146,33 +147,33 @@ The tangent is not drawn. A second point of the tangent is given by \tkzname{tkz \begin{tikzpicture}[scale=.75] \tkzDefPoint(0,0){O} \tkzDefPoint(6,6){E} - \tkzDefRandPointOn[circle=center O radius 3cm] + \tkzDefRandPointOn[circle=center O radius 3] \tkzGetPoint{A} \tkzDrawSegment(O,A) \tkzDrawCircle(O,A) \tkzDefTangent[at=A](O) \tkzGetPoint{h} \tkzDrawLine[add = 4 and 3](A,h) - \tkzMarkRightAngle[fill=red!30](O,A,h) + \tkzMarkRightAngle[fill=teal!30](O,A,h) \end{tikzpicture} \end{tkzexample} \subsubsection{Example of tangents passing through an external point } \begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.8] +\begin{tikzpicture}[scale=.8] \tkzDefPoint(3,3){c} - \tkzDefPoint(6,3){a0} - \tkzRadius=1 cm - \tkzDrawCircle[R](c,\tkzRadius) + \tkzDefPoint(6,3){a0} + \pgfmathsetmacro\R{1} + \tkzDrawCircle[R](c,\R) \foreach \an in {0,10,...,350}{ - \tkzDefPointBy[rotation=center c angle \an](a0) - \tkzGetPoint{a} - \tkzDefTangent[from with R = a](c,\tkzRadius) - \tkzGetPoints{e}{f} - \tkzDrawLines[color=magenta](a,f a,e) - \tkzDrawSegments(c,e c,f) - }% -\end{tikzpicture} + \tkzDefPointBy[rotation=center c angle \an](a0) + \tkzGetPoint{a} + \tkzDefTangent[from with R = a](c,\R) + \tkzGetPoints{e}{f} + \tkzDrawLines[color=teal](a,f a,e) + \tkzDrawSegments(c,e c,f) + }% +\end{tikzpicture} \end{tkzexample} \subsubsection{Example of Andrew Mertz} @@ -183,31 +184,16 @@ The tangent is not drawn. A second point of the tangent is given by \tkzname{tkz \tkzDrawCircle(C,R) \tkzDefTangent[from = A](C,R) \tkzGetPoints{D}{E} \tkzDefTangent[from = B](C,R) \tkzGetPoints{F}{G} - \tkzDrawSector[fill=blue!80!black,opacity=0.5](A,D)(E) - \tkzFillSector[color=red!80!black,opacity=0.5](B,F)(G) + \tkzDrawSector[fill=teal!20,opacity=0.5](A,D)(E) + \tkzFillSector[color=teal,opacity=0.5](B,F)(G) \tkzInterCC(A,D)(B,F) \tkzGetSecondPoint{I} \tkzDrawPoint[color=black](I) \end{tikzpicture} \end{tkzexample} \url{http://www.texample.net/tikz/examples/} -\subsubsection{Drawing a tangent option \tkzimp{from with R} and \tkzimp{at}} -\begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){O} - \tkzDefRandPointOn[circle=center O radius 4cm] - \tkzGetPoint{A} - \tkzDefTangent[at=A](O) - \tkzGetPoint{h} - \tkzDrawSegments(O,A) - \tkzDrawCircle(O,A) - \tkzDrawLine[add = 1 and 1](A,h) - \tkzMarkRightAngle[fill=red!30](O,A,h) - \end{tikzpicture} -\end{tkzexample} - \subsubsection{Drawing a tangent option \tkzimp{from}} -\begin{tkzexample}[latex=5cm,small] +\begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=.5] \tkzDefPoint(0,0){B} \tkzDefPoint(0,8){A} @@ -230,436 +216,4 @@ The tangent is not drawn. A second point of the tangent is given by \tkzname{tkz \end{tikzpicture} \end{tkzexample} - -\section{Drawing, naming the lines} -The following macros are simply used to draw, name lines. -\subsection{Draw a straight line} -To draw a normal straight line, just give a couple of points. You can use the \tkzname{add} option to extend the line (This option is due to \tkzimp{Mark Wibrow}, see the code below). - -\begin{tkzltxexample}[] - \tikzset{% - add/.style args={#1 and #2}{ - to path={% - ($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)% - \tikztonodes}}} -\end{tkzltxexample} - -In the special case of lines defined in a triangle, the number of arguments is a list of three points (the vertices of the triangle). The second point is where the line will come from. The first and last points determine the target segment. The old method has therefore been slightly modified. So for \tkzcname{tkzDrawMedian}, instead of $(A,B)(C)$ you have to write $(B,C,A)$ where $C$ is the point that will be linked to the middle of the segment $[A,B]$. - -\begin{NewMacroBox}{tkzDrawLine}{\oarg{local options}\parg{pt1,pt2} or \parg{pt1,pt2,pt3}}% -The arguments are a list of two points or three points. - -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{median}{none}{[median](A,B,C) median from $B$} -\TOline{altitude}{none}{[altitude](C,A,B) altitude from $A$} -\TOline{bisector}{none}{[bisector](B,C,A) bisector from $C$} -\TOline{none}{none}{draw the straight line $(AB)$} -\TOline{add= nb1 and nb2}{.2 and .2}{extends the segment} - \bottomrule -\end{tabular} - -\tkzname{add} defines the length of the line passing through the points pt1 and pt2. Both numbers are percentages. The styles of \TIKZ\ are accessible for plots. -\end{NewMacroBox} - -\subsubsection{Examples with \tkzname{add}} -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzInit[xmin=-2,xmax=3,ymin=-2.25,ymax=2.25] - \tkzClip[space=.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(2,0.5){B} - \tkzDefPoint(0,-1){C}\tkzDefPoint(2,-0.5){D} - \tkzDefPoint(0,1){E} \tkzDefPoint(2,1.5){F} - \tkzDefPoint(0,-2){G} \tkzDefPoint(2,-1.5){H} - \tkzDrawLine(A,B) \tkzDrawLine[add = 0 and .5](C,D) - \tkzDrawLine[add = 1 and 0](E,F) - \tkzDrawLine[add = 0 and 0](G,H) - \tkzDrawPoints(A,B,C,D,E,F,G,H) - \tkzLabelPoints(A,B,C,D,E,F,G,H) -\end{tikzpicture} -\end{tkzexample} - -It is possible to draw several lines, but with the same options. -\begin{NewMacroBox}{tkzDrawLines}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% -Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for the draws. -\end{NewMacroBox} - -\subsubsection{Example with \tkzcname{tkzDrawLines}} - -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,0){B} - \tkzDefPoint(1,2){C} - \tkzDefPoint(3,2){D} - \tkzDrawLines(A,B C,D A,C B,D) - \tkzLabelPoints(A,B,C,D) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example with the option \tkzname{add}} -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(3,1){I} - \tkzDefPoint(1,4){J} - \tkzDefLine[bisector](I,O,J) - \tkzGetPoint{i} - \tkzDefLine[bisector out](I,O,J) - \tkzGetPoint{j} - \tkzDrawLines[add = 1 and .5,color=red](O,I O,J) - \tkzDrawLines[add = 1 and .5,color=blue](O,i O,j) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Medians in a triangle} -\begin{tkzexample}[latex=7 cm,small] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzSetUpLine[color=blue] - \tkzDrawLine[median](B,C,A) - \tkzDrawLine[median](C,A,B) - \tkzDrawLine[median](A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Altitudes in a triangle} -\begin{tkzexample}[latex=7 cm,small] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzSetUpLine[color=magenta] - \tkzDrawLine[altitude](B,C,A) - \tkzDrawLine[altitude](C,A,B) - \tkzDrawLine[altitude](A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Bisectors in a triangle} -You have to give the angles in a straight line. - -\begin{tkzexample}[latex=7 cm,small] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzSetUpLine[color=purple] - \tkzDrawLine[bisector](B,C,A) - \tkzDrawLine[bisector](C,A,B) - \tkzDrawLine[bisector](A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Add labels on a straight line \tkzcname{tkzLabelLine}}% -\begin{NewMacroBox}{tkzLabelLine}{\oarg{local options}\parg{pt1,pt2}\marg{label}} -\begin{tabular}{lll}% -arguments & default & definition \\ -\midrule -\TAline{label}{}{\tkzcname{tkzLabelLine(A,B)}\{\$\tkzcname{Delta}\$\}} -\bottomrule -\end{tabular} - -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{pos}{.5}{\tkzname{pos} is an option for \TIKZ, but essential in this case\dots} -\end{tabular} - -As an option, and in addition to the \tkzname{pos}, you can use all styles of \TIKZ, especially the placement with \tkzname{above}, \tkzname{right}, \dots -\end{NewMacroBox} - -\subsubsection{Example with \tkzcname{tkzLabelLine}} -An important option is \tkzname{pos}, it's the one that allows you to place the label along the right. The value of \tkzname{pos} can be greater than 1 or negative. - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tkzDefPoints{0/0/A,3/0/B,1/1/C} - \tkzDefLine[perpendicular=through C,K=-1](A,B) - \tkzGetPoint{c} - \tkzDrawLines(A,B C,c) - \tkzLabelLine[pos=1.25,blue,right](C,c){$(\delta)$} - \tkzLabelLine[pos=-0.25,red,left](C,c){again $(\delta)$} -\end{tikzpicture} -\end{tkzexample} - -\section{Draw, Mark segments} -There is, of course, a macro to simply draw a segment (it would be possible, as for a half line, to create a style with \tkzcname{add}). -\subsection{Draw a segment \tkzcname{tkzDrawSegment}} -\begin{NewMacroBox}{tkzDrawSegment}{\oarg{local options}\parg{pt1,pt2}}% -The arguments are a list of two points. The styles of \TIKZ\ are available for the drawings. - -\medskip -\begin{tabular}{lll}% -argument & example & definition \\ -\midrule -\TAline{(pt1,pt2)}{(A,B)}{draw the segment $[A,B]$} -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -options & example & definition \\ -\midrule -\TOline{\TIKZ\ options}{}{all \TIKZ\ options are valid.} -\TOline{add}{0 and 0}{add = $kl$ and $kr$, \dots} -\TOline{\dots}{\dots}{allows the segment to be extended to the left and right. } -\TOline{dim}{no default}{dim = \{label,dim,option\}, \dots} -\TOline{\dots}{\dots}{allows you to add dimensions to a figure.} -\bottomrule -\end{tabular} - -This is of course equivalent to \tkzcname{draw (A)--(B);} -\end{NewMacroBox} - -\subsubsection{Example with point references} - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,1){B} - \tkzDrawSegment[color=red,thin](A,B) - \tkzDrawPoints(A,B) - \tkzLabelPoints(A,B) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example of extending an segment with option \tkzname{add}} - -\begin{tkzexample}[latex=7cm,small] - \begin{tikzpicture} - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefTriangleCenter[euler](A,B,C) - \tkzGetPoint{E} - \tkzDrawCircle[euler,red](A,B,C) - \tkzDrawLines[add=.5 and .5](A,B A,C B,C) - \tkzDrawPoints(A,B,C,E) - \tkzLabelPoints(A,B,C,E) - \end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example of adding dimensions with option \tkzname{dim}} -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=4] - \pgfkeys{/pgf/number format/.cd,fixed,precision=2} - % Define the first two points - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefPoint(1,1){C} - % Draw the triangle and the points - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - % Label the sides - \tkzCalcLength[cm](A,B)\tkzGetLength{ABl} - \tkzCalcLength[cm](B,C)\tkzGetLength{BCl} - \tkzCalcLength[cm](A,C)\tkzGetLength{ACl} - % add dim - \tkzDrawSegment[dim={\pgfmathprintnumber\BCl,6pt,transform shape}](C,B) - \tkzDrawSegment[dim={\pgfmathprintnumber\ACl,6pt,transform shape}](A,C) - \tkzDrawSegment[dim={\pgfmathprintnumber\ABl,-6pt,transform shape}](A,B) -\end{tikzpicture} -\end{tkzexample} - - -\subsection{Drawing segments \tkzcname{tkzDrawSegments}} -If the options are the same we can plot several segments with the same macro. - -\begin{NewMacroBox}{tkzDrawSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% -The arguments are a two-point couple list. The styles of \TIKZ\ are available for the plots. -\end{NewMacroBox} - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tkzInit[xmin=-1,xmax=3,ymin=-1,ymax=2] - \tkzClip[space=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,1){B} - \tkzDefPoint(3,0){C} - \tkzDrawSegments(A,B B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,C) - \tkzLabelPoints[above](B) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Place an arrow on segment} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture} - \tikzset{ - arr/.style={postaction=decorate, - decoration={markings, - mark=at position .5 with {\arrow[thick]{#1}} - }}} - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,-4){B} - \tkzDrawSegments[arr=stealth](A,B) - \tkzDrawPoints(A,B) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Mark a segment \tkzcname{tkzMarkSegment}} -\hypertarget{tms}{} - - \begin{NewMacroBox}{tkzMarkSegment}{\oarg{local options}\parg{pt1,pt2}}% -The macro allows you to place a mark on a segment. - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{pos}{.5}{position of the mark} -\TOline{color}{black}{color of the mark} -\TOline{mark}{none}{choice of the mark} -\TOline{size}{4pt}{size of the mark} -\bottomrule -\end{tabular} - -Possible marks are those provided by \TIKZ, but other marks have been created based on an idea by Yves Combe. -\end{NewMacroBox} - -\subsubsection{Several marks } -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,4){B} - \tkzDrawSegment(A,B) - \tkzMarkSegment[color=brown,size=2pt,pos=0.4, mark=z](A,B) - \tkzMarkSegment[color=blue,pos=0.2, mark=oo](A,B) - \tkzMarkSegment[pos=0.8,mark=s,color=red](A,B) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Use of \tkzname{mark}} -\begin{tkzexample}[latex=5cm,small] -\begin{tikzpicture} - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,4){B} - \tkzDrawSegment(A,B) - \tkzMarkSegment[color=gray,pos=0.2,mark=s|](A,B) - \tkzMarkSegment[color=gray,pos=0.4,mark=s||](A,B) - \tkzMarkSegment[color=brown,pos=0.6,mark=||](A,B) - \tkzMarkSegment[color=red,pos=0.8,mark=|||](A,B) -\end{tikzpicture} -\end{tkzexample} - - -\subsection{Marking segments \tkzcname{tkzMarkSegments}} -\hypertarget{tmss}{} - -\begin{NewMacroBox}{tkzMarkSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% -Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for plots. -\end{NewMacroBox} - -\subsubsection{Marks for an isosceles triangle} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C} - \tkzDrawSegments(O,A A,B) - \tkzDrawPoints(O,A,B) - \tkzDrawLine(O,B) - \tkzMarkSegments[mark=||,size=6pt](O,A A,B) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Another marking} -\begin{tkzexample}[latex=5cm,small] - \begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B} - \tkzDefPoint(4,0){C}\tkzDefPoint(2.5,1){P} - \tkzDrawPolygon(A,B,C) - \tkzDefEquilateral(A,P) \tkzGetPoint{P'} - \tkzDefPointsBy[rotation=center A angle 60](P,B){P',C'} - \tkzDrawPolygon(A,P,P') - \tkzDrawPolySeg(P',C',A,P,B) - \tkzDrawSegment(C,P) - \tkzDrawPoints(A,B,C,C',P,P') - \tkzMarkSegments[mark=s|,size=6pt, - color=blue](A,P P,P' P',A) - \tkzMarkSegments[mark=||,color=orange](B,P P',C') - \tkzLabelPoints(A,C) \tkzLabelPoints[below](P) - \tkzLabelPoints[above right](P',C',B) -\end{tikzpicture} -\end{tkzexample} - -\hypertarget{tls}{} -\begin{NewMacroBox}{tkzLabelSegment}{\oarg{local options}\parg{pt1,pt2}\marg{label}} -This macro allows you to place a label along a segment or a line. The options are those of \TIKZ\ for example \tkzname{pos}. - -\medskip -\begin{tabular}{lll}%% -argument & example & definition \\ -\midrule -\TAline{label}{\tkzcname{tkzLabelSegment(A,B)\{$5$\}}}{label text} -\TAline{(pt1,pt2)}{(A,B)}{label along $[AB]$} -\bottomrule -\end{tabular} - - -\medskip -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{pos}{.5}{label's position} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Multiple labels} -\begin{tkzexample}[latex=7 cm,small] -\begin{tikzpicture} -\tkzInit -\tkzDefPoint(0,0){A} -\tkzDefPoint(6,0){B} -\tkzDrawSegment(A,B) -\tkzLabelSegment[above,pos=.8](A,B){$a$} -\tkzLabelSegment[below,pos=.2](A,B){$4$} -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Labels and right-angled triangle} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[rotate=-60] -\tikzset{label seg style/.append style = {% - color = red, - }} -\tkzDefPoint(0,1){A} -\tkzDefPoint(2,4){C} -\tkzDefPointWith[orthogonal normed,K=7](C,A) -\tkzGetPoint{B} -\tkzDrawPolygon[green!60!black](A,B,C) -\tkzDrawLine[altitude,dashed,color=magenta](B,C,A) -\tkzGetPoint{P} -\tkzLabelPoint[left](A){$A$} -\tkzLabelPoint[right](B){$B$} -\tkzLabelPoint[above](C){$C$} -\tkzLabelPoint[below](P){$P$} -\tkzLabelSegment[](B,A){$c$} -\tkzLabelSegment[swap](B,C){$a$} -\tkzLabelSegment[swap](C,A){$b$} -\tkzMarkAngles[size=1cm, - color=cyan,mark=|](C,B,A A,C,P) -\tkzMarkAngle[size=0.75cm, - color=orange,mark=||](P,C,B) -\tkzMarkAngle[size=0.75cm, - color=orange,mark=||](B,A,C) -\tkzMarkRightAngles[german](A,C,B B,P,C) -\end{tikzpicture} -\end{tkzexample} - -\hypertarget{tlss}{} - \begin{NewMacroBox}{tkzLabelSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% -The arguments are a two-point couple list. The styles of \TIKZ\ are available for plotting. -\end{NewMacroBox} - -\subsubsection{Labels for an isosceles triangle} -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C} - \tkzDrawSegments(O,A A,B) - \tkzDrawPoints(O,A,B) - \tkzDrawLine(O,B) - \tkzLabelSegments[color=red,above=4pt](O,A A,B){$a$} -\end{tikzpicture} -\end{tkzexample} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.pdf b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.pdf Binary files differnew file mode 100644 index 0000000000..91d7ecba05 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.pdf diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.tex index a62d02eb57..6b0f8f1c17 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-main.tex @@ -1,70 +1,44 @@ % !TEX TS-program = lualatex -% encoding : utf8 -% Documentation of tkz-euclide -% Copyright 2020 Alain Matthes +% encoding : utf8 +% Documentation of tkz-euclide v4 +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in -% http://www.latex-project.org/lppl.txt +% http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% -% This work consists of the files: -% TKZdoc-euclide-pointby.tex -% TKZdoc-euclide-presentation.tex -% TKZdoc-euclide-exemples.tex -% TKZdoc-euclide-rapporteur.tex -% TKZdoc-euclide-compass.tex -% TKZdoc-euclide-intersec.tex -% TKZdoc-euclide-tools.tex -% TKZdoc-euclide-arcs.tex -% TKZdoc-euclide-circles.tex -% TKZdoc-euclide-polygons.tex -% TKZdoc-euclide-triangles.tex -% TKZdoc-euclide-lines.tex -% TKZdoc-euclide-pointwith.tex -% TKZdoc-euclide-pointsSpc.tex -% TKZdoc-euclide-points.tex -% TKZdoc-euclide-installation.tex -% TKZdoc-euclide-angles.tex -% TKZdoc-euclide-config.tex -% TKZdoc-euclide-base.tex -% TKZdoc-euclide-FAQ.tex -% TKZdoc-euclide-show.tex -% TKZdoc-euclide-sectors.tex -% TKZdoc-euclide-rnd.tex -% TKZdoc-euclide-news.tex +\PassOptionsToPackage{unicode}{hyperref} \documentclass[DIV = 14, fontsize = 10, - headinclude = false, index = totoc, - footinclude = false, twoside, - headings = small + headings = small, + cadre ]{tkz-doc} +%\usepackage{etoc} \gdef\tkznameofpack{tkz-euclide} -\gdef\tkzversionofpack{3.06c} -\gdef\tkzdateofpack{2020/03/18} +\gdef\tkzversionofpack{4.00} +\gdef\tkzdateofpack{2022/01/04} \gdef\tkznameofdoc{doc-tkz-euclide} -\gdef\tkzversionofdoc{3.06c} -\gdef\tkzdateofdoc{2020/03/18} +\gdef\tkzversionofdoc{4.00} +\gdef\tkzdateofdoc{2022/01/04} \gdef\tkzauthorofpack{Alain Matthes} \gdef\tkzadressofauthor{} \gdef\tkznamecollection{AlterMundus} -\gdef\tkzurlauthor{} +\gdef\tkzurlauthor{http://altermundus.fr} \gdef\tkzengine{lualatex} \gdef\tkzurlauthorcom{http://altermundus.fr} % -- Packages --------------------------------------------------- \usepackage[dvipsnames,svgnames]{xcolor} \usepackage{calc} \usepackage{tkz-euclide} -\usepackage[colorlinks]{hyperref} +\usetikzlibrary{backgrounds} +\usepackage[colorlinks,pdfencoding=auto, psdextra]{hyperref} \hypersetup{ linkcolor=Gray, citecolor=Green, @@ -85,29 +59,52 @@ } \usepackage{tkzexample} \usepackage{fontspec} -\setmainfont{texgyrepagella}% - [Extension = .otf , - UprightFont = *-regular, - ItalicFont = *-italic, - BoldFont = *-bold, - BoldItalicFont = *-bolditalic, - Ligatures=TeX, - Numbers={Lowercase,Monospaced}] -\usepackage{unicode-math} +\setmainfont{texgyrepagella}[ + Extension = .otf, + UprightFont = *-regular , + ItalicFont = *-italic , + BoldFont = *-bold , + BoldItalicFont = *-bolditalic +] +\setsansfont{texgyreheros}[ + Extension = .otf, + UprightFont = *-regular , + ItalicFont = *-italic , + BoldFont = *-bold , + BoldItalicFont = *-bolditalic , +] + +\setmonofont{lmmono10-regular.otf}[ + Numbers={Lining,SlashedZero}, + ItalicFont=lmmonoslant10-regular.otf, + BoldFont=lmmonolt10-bold.otf, + BoldItalicFont=lmmonolt10-boldoblique.otf, +] +\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf} +%% (La)TeX font-related declarations: +\linespread{1.05} % Pagella needs more space between lines +%\usepackage{unicode-math} +\usepackage[math-style=literal,bold-style=literal]{unicode-math} \usepackage{fourier-otf} \makeatletter \if@tkzcadre \usepackage{zorna} \fi \makeatother \usepackage{datetime,multicol,lscape} \usepackage[english]{babel} -\usepackage[autolanguage]{numprint} \usepackage[normalem]{ulem} -\usepackage{microtype} \usepackage{array,multirow,multido,booktabs} -\usepackage{shortvrb,fancyvrb} +\usepackage{shortvrb,fancyvrb,bookmark} \renewcommand{\labelitemi}{--} \setlength\parindent{0pt} +\RedeclareSectionCommand[tocnumwidth=3.5em]{part} +\RedeclareSectionCommand[tocnumwidth=3.5em]{section} +\RedeclareSectionCommand[tocnumwidth=3.5em]{subsection} +\RedeclareSectionCommand[tocnumwidth=3.5em]{subsubsection} +\renewcommand\partheadstartvskip{\clearpage\null\vfil} +\renewcommand\partheadmidvskip{\par\nobreak\vskip 20pt\thispagestyle{empty}} +\renewcommand\partheadendvskip{\vfil\clearpage} +\renewcommand\raggedpart{\centering} \RequirePackage{makeidx} \makeindex % \def\tkzref{\arabic{section}-\arabic{subsection}-\arabic{subsubsection}} @@ -118,7 +115,46 @@ % } %<---------------------------------------------------------------------------> \AtBeginDocument{\MakeShortVerb{\|}} % link to shortvrb -\begin{document} +% settings +\tkzSetUpColors[background=white,text=black] +\tkzSetUpCompass[color=orange, line width=.4pt,delta=10] +\tkzSetUpArc[color=gray,line width=.4pt] +\tkzSetUpPoint[size=2,color=teal] +\tkzSetUpLine[line width=.4pt,color=teal] +\tkzSetUpStyle[orange]{new} +\tikzset{every picture/.style={line width=.4pt}} +\makeatletter +% We need to save the node +% Every append after command might be useful to have this code +\def\savelastnode{\pgfextra\edef\tmpA{\tikzlastnode}\endpgfextra} +\def\restorelastnode{\pgfextra\edef\tikzlastnode{\tmpA}\endpgfextra} + +% Define box and box title style +\tikzstyle{mybox} = [draw=blue!50!black, very thick, + rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,text=darkgray] +\tikzstyle{fancytitle} =[fill=MidnightBlue!20, text=blue!50!black,rounded corners] +\tikzstyle{title} = [append after command={% + \savelastnode node[fancytitle,right=10pt] at (\tikzlastnode.north west)% + {#1}\restorelastnode}] +\makeatother + +\newcommand{\red}{\color{BrickRed}} +\newcommand{\orange}{\color{PineGreen}} +\newcommand{\blanc}{\color{White}} +\newcommand{\ntt}{\normalfont\ttfamily} +% command name +\newcommand{\cn}[1]{{\protect\ntt\bslash#1}} +% LaTeX package name +% File name +\newcommand{\fn}[1]{{\protect\ntt#1}} +% environment name +\newcommand{\env}[1]{{\protect\ntt#1}} +\hfuzz1pc % Don't bother to report overfull boxes if overage is < 1pc + +\newcommand{\pkg}[1]{{\protect\ntt#1}} +\begin{document} + + \parindent=0pt \author{\tkzauthorofpack} @@ -142,9 +178,9 @@ fill=myblue!10,opacity=.5] (0,0) rectangle (300pt,240pt); \node[text width=240pt] at (150 pt,120 pt){% \begin{center} - \color{MidnightBlue} + \color{MidnightBlue} \fontsize{24}{48} - \selectfont tkz-euclide\\ + \selectfont tkz-euclide\\ tool for \\ Euclidean Geometry \end{center}}; @@ -160,8 +196,8 @@ \let\rmfamily\ttfamily \nameoffile{\tkznameofpack} \defoffile{\lefthand\ -The \tkzname{\tkznameofpack} is a set of convenient macros for drawing in a plane (fundamental two-dimensional object) with a Cartesian coordinate system. It handles the most classic situations in Euclidean Geometry. \tkzname{\tkznameofpack} is built on top of PGF and its associated front-end \TIKZ\ and is a (La)TeX-friendly drawing package. The aim is to provide a high-level user interface to build graphics relatively simply. It uses a Cartesian coordinate system orthogonal provided by the \tkzimp{tkz-base} package as well as tools to define the unique coordinates of points and to manipulate them. The idea is to allow you to follow step by step a construction that would be done by hand as naturally as possible.\\ -Now the package needs the version 3.0 of \TIKZ. English is not my native language so there might be some errors. +\tkzname{\tkznameofpack} 4.00 is now independent of tkz-base. It is a set of convenient macros for drawing in a plane (fundamental two-dimensional object) with a Cartesian coordinate system. It handles the most classic situations in Euclidean Geometry. \tkzname{\tkznameofpack} is built on top of PGF and its associated front-end \TIKZ\ and is a (La)TeX-friendly drawing package. The aim is to provide a high-level user interface to build graphics relatively simply. The idea is to allow you to follow step by step a construction that would be done by hand as naturally as possible.\\ +English is not my native language so there might be some errors. } \presentation @@ -170,7 +206,7 @@ Now the package needs the version 3.0 of \TIKZ. English is not my native langu \lefthand\ Firstly, I would like to thank \textbf{Till Tantau} for the beautiful \LaTeX{} package, namely \href{http://sourceforge.net/projects/pgf/}{\TIKZ}. \vspace*{12pt} -\lefthand\ I received much valuable advice, remarks, corrections and examples from \tkzimp{Jean-Côme Charpentier}, \tkzimp{Josselin Noirel}, \tkzimp{Manuel Pégourié-Gonnard}, \tkzimp{Franck Pastor}, \tkzimp{David Arnold}, \tkzimp{Ulrike Fischer}, \tkzimp{Stefan Kottwitz}, \tkzimp{Christian Tellechea}, \tkzimp{Nicolas Kisselhoff}, \tkzimp{David Arnold}, \tkzimp{Wolfgang Büchel}, \tkzimp{John Kitzmiller}, \tkzimp{Dimitri Kapetas}, \tkzimp{Gaétan Marris}, \tkzimp{Mark Wibrow}, \tkzimp{Yves Combe} for his work on a protractor, \tkzimp{Paul Gaborit} and \tkzimp{Laurent Van Deik} for all his corrections, remarks and questions. +\lefthand\ Acknowledgements : I received much valuable advice, remarks, corrections and examples from \tkzimp{Jean-Côme Charpentier}, \tkzimp{Josselin Noirel}, \tkzimp{Manuel Pégourié-Gonnard}, \tkzimp{Franck Pastor}, \tkzimp{David Arnold}, \tkzimp{Ulrike Fischer}, \tkzimp{Stefan Kottwitz}, \tkzimp{Christian Tellechea}, \tkzimp{Nicolas Kisselhoff}, \tkzimp{David Arnold}, \tkzimp{Wolfgang Büchel}, \tkzimp{John Kitzmiller}, \tkzimp{Dimitri Kapetas}, \tkzimp{Gaétan Marris}, \tkzimp{Mark Wibrow}, \tkzimp{Yves Combe} for his work on a protractor, \tkzimp{Paul Gaborit}, \tkzimp{Laurent Van Deik} for all his corrections, remarks and questions and \tkzimp{Muzimuzhi Z} for the code about the option "dim". \vspace*{12pt} \lefthand\ I would also like to thank Eric Weisstein, creator of MathWorld: @@ -192,32 +228,54 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch \clearpage \newpage -\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} -\include{TKZdoc-euclide-presentation} +\part{General survey : a brief but comprehensive review} \include{TKZdoc-euclide-installation} +\include{TKZdoc-euclide-presentation} +\include{TKZdoc-euclide-elements} \include{TKZdoc-euclide-news} + +\part{Setting} \include{TKZdoc-euclide-points} + +\part{Calculating} \include{TKZdoc-euclide-pointsSpc} \include{TKZdoc-euclide-pointby} \include{TKZdoc-euclide-pointwith} -\include{TKZdoc-euclide-rnd} \include{TKZdoc-euclide-lines} \include{TKZdoc-euclide-triangles} \include{TKZdoc-euclide-polygons} \include{TKZdoc-euclide-circles} +\include{TKZdoc-euclide-circleby} \include{TKZdoc-euclide-intersec} \include{TKZdoc-euclide-angles} -\include{TKZdoc-euclide-sectors} -\include{TKZdoc-euclide-arcs} -\include{TKZdoc-euclide-tools} +\include{TKZdoc-euclide-rnd} + +\part{Drawing and Filling} +\include{TKZdoc-euclide-drawing} +\include{TKZdoc-euclide-filling} +\include{TKZdoc-euclide-clipping} + +\part{Marking} +\include{TKZdoc-euclide-marking} + +\part{Labelling} +\include{TKZdoc-euclide-labelling} + +\part{Complements} \include{TKZdoc-euclide-compass} \include{TKZdoc-euclide-show} \include{TKZdoc-euclide-rapporteur} -\include{TKZdoc-euclide-exemples} -\include{TKZdoc-euclide-config} -\include{TKZdoc-euclide-base} +\include{TKZdoc-euclide-tools} + +\part{Working with style} +\include{TKZdoc-euclide-styles} + +\part{Examples} +\include{TKZdoc-euclide-examples} +\include{TKZdoc-euclide-others} +\part{FAQ} \include{TKZdoc-euclide-FAQ} \clearpage\newpage \small\printindex -\end{document} +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-marking.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-marking.tex new file mode 100644 index 0000000000..8ca0dc0f13 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-marking.tex @@ -0,0 +1,406 @@ +\subsection{Mark a segment \tkzcname{tkzMarkSegment}} +\hypertarget{tms}{} + + \begin{NewMacroBox}{tkzMarkSegment}{\oarg{local options}\parg{pt1,pt2}}% +The macro allows you to place a mark on a segment. + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{pos}{.5}{position of the mark} +\TOline{color}{black}{color of the mark} +\TOline{mark}{none}{choice of the mark} +\TOline{size}{4pt}{size of the mark} +\bottomrule +\end{tabular} + +Possible marks are those provided by \TIKZ, but other marks have been created based on an idea by Yves Combe. +\end{NewMacroBox} + +\subsubsection{Several marks } +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture} + \tkzDefPoint(2,1){A} + \tkzDefPoint(6,4){B} + \tkzDrawSegment(A,B) + \tkzMarkSegment[color=brown,size=2pt,pos=0.4, mark=z](A,B) + \tkzMarkSegment[color=blue,pos=0.2, mark=oo](A,B) + \tkzMarkSegment[pos=0.8,mark=s,color=red](A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Use of \tkzname{mark}} +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture} + \tkzDefPoint(2,1){A} + \tkzDefPoint(6,4){B} + \tkzDrawSegment(A,B) + \tkzMarkSegment[color=gray,pos=0.2,mark=s|](A,B) + \tkzMarkSegment[color=gray,pos=0.4,mark=s||](A,B) + \tkzMarkSegment[color=brown,pos=0.6,mark=||](A,B) + \tkzMarkSegment[color=red,pos=0.8,mark=|||](A,B) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Marking segments \tkzcname{tkzMarkSegments}} +\hypertarget{tmss}{} + +\begin{NewMacroBox}{tkzMarkSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}% +Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for plots. +\end{NewMacroBox} + +\subsubsection{Marks for an isosceles triangle} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=1] + \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C} + \tkzDrawSegments(O,A A,B) + \tkzDrawPoints(O,A,B) + \tkzDrawLine(O,B) + \tkzMarkSegments[mark=||,size=6pt](O,A A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Another marking} +\begin{tkzexample}[latex=5cm,small] + \begin{tikzpicture}[scale=1] + \tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B} + \tkzDefPoint(4,0){C}\tkzDefPoint(2.5,1){P} + \tkzDrawPolygon(A,B,C) + \tkzDefEquilateral(A,P) \tkzGetPoint{P'} + \tkzDefPointsBy[rotation=center A angle 60](P,B){P',C'} + \tkzDrawPolygon(A,P,P') + \tkzDrawPolySeg(P',C',A,P,B) + \tkzDrawSegment(C,P) + \tkzDrawPoints(A,B,C,C',P,P') + \tkzMarkSegments[mark=s|,size=6pt, + color=blue](A,P P,P' P',A) + \tkzMarkSegments[mark=||,color=orange](B,P P',C') + \tkzLabelPoints(A,C) \tkzLabelPoints[below](P) + \tkzLabelPoints[above right](P',C',B) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Mark an arc \tkzcname{tkzMarkArc}} +\hypertarget{tms}{} + + \begin{NewMacroBox}{tkzMarkArc}{\oarg{local options}\parg{pt1,pt2,pt3}}% +The macro allows you to place a mark on an arc. pt1 is the center, pt2 and pt3 are the endpoints of the arc. + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{pos}{.5}{position of the mark} +\TOline{color}{black}{color of the mark} +\TOline{mark}{none}{choice of the mark} +\TOline{size}{4pt}{size of the mark} +\bottomrule +\end{tabular} + +Possible marks are those provided by \TIKZ, but other marks have been created based on an idea by Yves Combe. +\begin{tkzltxexample}[] +|, ||,|||, z, s, x, o, oo +\end{tkzltxexample} +\end{NewMacroBox} + +\subsubsection{Several marks } +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\tkzDefPoint(0,0){O} +\pgfmathsetmacro\r{2} +\tkzDefPoint(30:\r){A} +\tkzDefPoint(85:\r){B} +\tkzDrawCircle(O,A) +\tkzMarkArc[color=red,mark=||](O,A,B) +\tkzDrawPoints(B,A,O) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Mark an angle mark : {\tkzcname{tkzMarkAngle}}} +More delicate operation because there are many options. The symbols used for marking in addition to those of \TIKZ\ are defined in the file |tkz-lib-marks.tex| and designated by the following characters:\begin{tkzltxexample}[] +|, ||,|||, z, s, x, o, oo +\end{tkzltxexample} + +% Their definitions are as follows +% +% \begin{tkzltxexample}[] +% \pgfdeclareplotmark{||} +% %double bar +% {% +% \pgfpathmoveto{\pgfqpoint{2\pgflinewidth}{\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-\pgfplotmarksize}} +% \pgfpathmoveto{\pgfqpoint{-2\pgflinewidth}{\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{-2\pgflinewidth}{-\pgfplotmarksize}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% +% \begin{tkzltxexample}[] +% %triple bar +% \pgfdeclareplotmark{|||} +% {% +% \pgfpathmoveto{\pgfqpoint{0 pt}{\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{0 pt}{-\pgfplotmarksize}} +% \pgfpathmoveto{\pgfqpoint{-3\pgflinewidth}{\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{-3\pgflinewidth}{-\pgfplotmarksize}} +% \pgfpathmoveto{\pgfqpoint{3\pgflinewidth}{\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{3\pgflinewidth}{-\pgfplotmarksize}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% +% \begin{tkzltxexample}[] +% % An bar slant +% \pgfdeclareplotmark{s|} +% {% +% \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}% +% {-.70710678\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}% +% {.70710678\pgfplotmarksize}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% +% +% \begin{tkzltxexample}[] +% % An double bar slant +% \pgfdeclareplotmark{s||} +% {% +% \pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}} +% \pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% +% +% \begin{tkzltxexample}[] +% % z +% \pgfdeclareplotmark{z} +% {% +% \pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{0.75\pgfplotmarksize}{\pgfplotmarksize}} +% \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{\pgfplotmarksize}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% +% \begin{tkzltxexample}[] +% % s +% \pgfdeclareplotmark{s} +% {% +% \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} +% \pgfpathcurveto +% {\pgfpoint{0pt}{0pt}} +% {\pgfpoint{-\pgfplotmarksize}{\pgfplotmarksize}} +% {\pgfpoint{\pgfplotmarksize}{\pgfplotmarksize}} +% \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} +% \pgfpathcurveto +% {\pgfpoint{0pt}{0pt}} +% {\pgfpoint{\pgfplotmarksize}{-\pgfplotmarksize}} +% {\pgfpoint{-\pgfplotmarksize}{-\pgfplotmarksize}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% +% \begin{tkzltxexample}[] +% % infinity +% \pgfdeclareplotmark{oo} +% {% +% \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} +% \pgfpathcurveto +% {\pgfpoint{0pt}{0pt}} +% {\pgfpoint{.5\pgfplotmarksize}{1\pgfplotmarksize}} +% {\pgfpoint{\pgfplotmarksize}{0pt}} +% \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} +% \pgfpathcurveto +% {\pgfpoint{0pt}{0pt}} +% {\pgfpoint{-.5\pgfplotmarksize}{1\pgfplotmarksize}} +% {\pgfpoint{-\pgfplotmarksize}{0pt}} +% \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} +% \pgfpathcurveto +% {\pgfpoint{0pt}{0pt}} +% {\pgfpoint{.5\pgfplotmarksize}{-1\pgfplotmarksize}} +% {\pgfpoint{\pgfplotmarksize}{0pt}} +% \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} +% \pgfpathcurveto +% {\pgfpoint{0pt}{0pt}} +% {\pgfpoint{-.5\pgfplotmarksize}{-1\pgfplotmarksize}} +% {\pgfpoint{-\pgfplotmarksize}{0pt}} +% \pgfusepathqstroke +% } +% \end{tkzltxexample} +% + + +% \tkzMarkAngle(B, A, C) +% +% Marque d'angle +% arc de cercle (simple/double/triple) et marque d'églité. +% +% Par défaut: +% arc = simple +% mksize = 1 (rayon de l'arc) +% style traits pleins +% mkpos ? position: 0.5 (position de la marque) +% mark rien du tout (ignoré si type est utilisé) +% +% Paramètres (optionnels) +% arc : l, ll, lll +% mksize : 1 +% gap : 3pt +% dist : 1? +% style : type de traits +% mkpos : 0.5 +% mark : none , |, ||,|||, z, s, x, o, oo mais tous les +% % symboles de tikz sont permis + +\begin{NewMacroBox}{tkzMarkAngle}{\oarg{local options}\parg{A,O,B}}% +$O$ is the vertex. Attention the arguments vary according to the options. Several markings are possible. You can simply draw an arc or add a mark on this arc. The style of the arc is chosen with the option \tkzname{arc}, the radius of the arc is given by \tkzname{mksize}, the arc can, of course, be colored. + +\medskip + +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{arc}{l}{choice of l, ll and lll (single, double or triple).} +\TOline{size}{1 (cm)}{arc radius.} +\TOline{mark}{none}{choice of mark.} +\TOline{mksize}{4pt}{symbol size (mark).} +\TOline{mkcolor}{black}{symbol color (mark).} +\TOline{mkpos}{0.5}{position of the symbol on the arc.} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Example with \tkzname{mark = x}} +\begin{tkzexample}[latex=6cm,small] + \begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/O,5/0/A,3/4/B} + \tkzMarkAngle[size = 4,mark = x, + arc=ll,mkcolor = red](A,O,B) + \tkzDrawLines(O,A O,B) + \tkzDrawPoints(O,A,B) + \end{tikzpicture} +\end{tkzexample} +\DeleteShortVerb{\|} +\subsubsection{Example with \tkzname{mark =||}} +\MakeShortVerb{\|} +\begin{tkzexample}[latex=6cm,small] + \begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/O,5/0/A,3/4/B} + \tkzMarkAngle[size = 4,mark = ||, + arc=ll,mkcolor = red](A,O,B) + \tkzDrawLines(O,A O,B) + \tkzDrawPoints(O,A,B) + \end{tikzpicture} +\end{tkzexample} + +\begin{NewMacroBox}{tkzMarkAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% +With common options, there is a macro for multiple angles. + \end{NewMacroBox} + + +\subsection{Marking a right angle: {\tkzcname{tkzMarkRightAngle}}} + +\begin{NewMacroBox}{tkzMarkRightAngle}{\oarg{local options}\parg{A,O,B}}% +The \tkzname{german} option allows you to change the style of the drawing. The option \tkzname{size} allows to change the size of the drawing. + +\medskip +\begin{tabular}{lll}% +\toprule +options & default & definition \\ +\midrule +\TOline{german}{normal}{ german arc with inner point.} +\TOline{size}{0.2}{ side size.} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Example of marking a right angle} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P} + \tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H} + \tkzDrawLines[add=.5 and .5](P,H) + \tkzMarkRightAngle[fill=blue!20,size=.5,draw](A,H,P) + \tkzDrawLines[add=.5 and .5](A,B) + \tkzMarkRightAngle[fill=red!20,size=.8](B,H,P) + \tkzDrawPoints[](A,B,P,H) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example of marking a right angle, german style} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P} + \tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H} + \tkzDrawLines[add=.5 and .5](P,H) + \tkzMarkRightAngle[german,size=.5,draw](A,H,P) + \tkzDrawPoints[](A,B,P,H) + \tkzDrawLines[add=.5 and .5](A,B) + \tkzMarkRightAngle[german,size=.8](P,H,B) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Mix of styles} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){A} + \tkzDefPoint(4,1){B} + \tkzDefPoint(2,5){C} + \tkzDefPointBy[projection=onto B--A](C) + \tkzGetPoint{H} + \tkzDrawLine(A,B) + \tkzDrawLine[add = .5 and .2,color=red](C,H) + \tkzMarkRightAngle[,size=1,color=red](C,H,A) + \tkzMarkRightAngle[german,size=.8,color=blue](B,H,C) + \tkzFillAngle[opacity=.2,fill=blue!20,size=.8](B,H,C) + \tkzLabelPoints(A,B,C,H) + \tkzDrawPoints(A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Full example} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[rotate=-90] +\tkzDefPoint(0,1){A} +\tkzDefPoint(2,4){C} +\tkzDefPointWith[orthogonal normed,K=7](C,A) +\tkzGetPoint{B} +\tkzDrawSegment[green!60!black](A,C) +\tkzDrawSegment[green!60!black](C,B) +\tkzDrawSegment[green!60!black](B,A) +\tkzDefSpcTriangle[orthic](A,B,C){N,O,P} +\tkzDrawLine[dashed,color=magenta](C,P) +\tkzLabelPoint[left](A){$A$} +\tkzLabelPoint[right](B){$B$} +\tkzLabelPoint[above](C){$C$} +\tkzLabelPoint[left](P){$P$} +\tkzLabelSegment[auto](B,A){$c$} +\tkzLabelSegment[auto,swap](B,C){$a$} +\tkzLabelSegment[auto,swap](C,A){$b$} +\tkzMarkAngle[size=1,color=cyan,mark=|](C,B,A) +\tkzMarkAngle[size=1,color=cyan,mark=|](A,C,P) +\tkzMarkAngle[size=0.75,color=orange, + mark=||](P,C,B) +\tkzMarkAngle[size=0.75,color=orange, + mark=||](B,A,C) +\tkzMarkRightAngle[german](A,C,B) +\tkzMarkRightAngle[german](B,P,C) +\end{tikzpicture} +\end{tkzexample} + +\subsection{\tkzcname{tkzMarkRightAngles}} +\begin{NewMacroBox}{tkzMarkRightAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}% +With common options, there is a macro for multiple angles. +\end{NewMacroBox} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-news.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-news.tex index f6b6d1068d..1226b02e13 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-news.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-news.tex @@ -1,21 +1,35 @@ \section{News and compatibility} - Some changes have been made to make the syntax more homogeneous and especially to distinguish the definition and search for coordinates from the rest, i.e. drawing, marking and labelling. In the future, the definition macros being isolated, it will be easier to introduce a phase of coordinate calculations using \tkzimp{Lua}. -An important novelty is the recent replacement of the \tkzNamePack{fp} package by \tkzNamePack{xfp}. This is to improve the calculations a little bit more and to make it easier to use. -Here are some of the changes. +Here are some of the changes. I'm sorry but the list of changes and novelties is made in the greatest disorder! + \vspace{1cm} \begin{itemize}\setlength{\itemsep}{10pt} + +\item An important novelty is the recent replacement of the \tkzNamePack{fp} package by \tkzNamePack{xfp}. This is to improve the calculations a little bit more and to make it easier to use; \item Improved code and bug fixes; -\item With \tkzimp{tkz-euclide} loads all objects, so there's no need to place \tkzcname{usetkzobj\{all\}};\item The bounding box is now controlled in each macro (hopefully) to avoid the use of \tkzcname{tkzInit} followed by \tkzcname{tkzClip};\item Added macros for the bounding box: \tkzcname{tkzSaveBB} \tkzcname{tkzClipBB} and so on;\item Logically most macros accept \TIKZ\ options. So I removed the "duplicate" options when possible thus the "label options" option is removed; +\item First of all, you don’t have to deal with Tik Z the size of the bounding box. Early versions of \tkzname{\tkznameofpack} did not control the size of the bounding box, The bounding box is now controlled in each macro (hopefully) to avoid the use of \tkzcname{tkzInit} followed by \tkzcname{tkzClip}; + +\item With \tkzimp{tkz-euclide} loads all objects, so there's no need to place \tkzcname{usetkzobj\{all\}}; + +\item Added macros for the bounding box: \tkzcname{tkzSaveBB} \tkzcname{tkzClipBB} and so on; + +\item Logically most macros accept \TIKZ\ options. So I removed the "duplicate" options when possible thus the "label options" option is removed; + +\item The unit is now the cm; + +\item |\tkzCalcLength| |\tkzGetLength| gives result in cm; + +\item |\tkzMarkArc| and |\tkzLabelArc| are new macros; + +\item Now |\tkzClipCircle| and |\tkzClipPolygon| have an option \tkzimp{out}. To use this option you must have a Bounding Box that contains the object on which the Clip action will be performed. Cela peut se faire en utilisant un objet qui englobe la figure ou bien en utilisant la macro \tkzcname{tkzInit}; -\item Random points are now in \tkzname{\tkznameofpack} and the macro \tkzcname{tkzGetRandPointOn} is replaced by \tkzcname{tkzDefRandPointOn}. For homogeneity reasons, the points must be retrieved with \tkzcname{tkzGetPoint}; \item The options \tkzname{end} and \tkzname{start} which allowed to give a label to a straight line are removed. You now have to use the macro \tkzcname{tkzLabelLine}; @@ -23,23 +37,30 @@ Here are some of the changes. \item The notion of vector disappears, to draw a vector just pass "->" as an option to \tkzcname{tkzDrawSegment}; -\item Many macros still exist, but are obsolete and will disappear: -\begin{itemize} - -\item |\tkzDrawMedians| trace and create midpoints on the sides of a triangle. The creation and drawing separation is not respected so it is preferable to first create the coordinates of these points with |\tkzSpcTriangle[median]| and then to choose the ones you are going to draw with |\tkzDrawSegments| or |\tkzDrawLines|; +\item |\tkzDrawMedian|, |\tkzDrawBisector|, |\tkzDrawAltitude|, |\tkzDrawMedians|, |\tkzDrawBisectors| et |\tkzDrawAltitudes| do not exist anymore. The creation and drawing separation is not respected so it is preferable to first create the coordinates of these points with |\tkzDefSpcTriangle[median]| and then to choose the ones you are going to draw with |\tkzDrawSegments| or |\tkzDrawLines|; -\item |\tkzDrawMedians(A,B)(C)| is now spelled |\tkzDrawMedians(A,C,B)|. This defines the median from $C$; +\item |\tkzDefIntSimilitudeCenter| and |\tkzDefExtSimilitudeCenter| do not exist anymore; -\item Another example |\tkzDrawTriangle[equilateral]| was handy but it is better to get the third point with |\tkzDefTriangle[equilateral]| and then draw with |\tkzDrawPolygon|; +\item |\tkzDrawTriangle| has been deleted. |\tkzDrawTriangle[equilateral]| was handy but it is better to get the third point with |\tkzDefTriangle[equilateral]| and then draw with |\tkzDrawPolygon|; idem for |\tkzDrawSquare| and |\tkzDrawGoldRectangle|; -\item |\tkzDefRandPointOn| is replaced by |\tkzGetRandPointOn|;\item now |\tkzTangent| is replaced by |\tkzDefTangent|; +\item |\tkzDefRandPointOn| is replaced by |\tkzGetRandPointOn|; -\item You can use |global path name| if you want find intersection but it's very slow like in \TIKZ. +\item now |\tkzTangent| is replaced by |\tkzDefTangent|; -\end{itemize} +\item An option of the macro \tkzcname{tkzDefTriangle} has changed, in the previous version the option was "euclide" with an "e". Now it's "euclid"; + +\item Random points are now in \tkzname{\tkznameofpack} and the macro \tkzcname{tkzGetRandPointOn} is replaced by + + \tkzcname{tkzDefRandPointOn}. For homogeneity reasons, the points must be retrieved with \tkzcname{tkzGetPoint}; + +\item New macros have been added : \tkzcname{tkzDrawSemiCircles}, \tkzcname{tkzDrawPolygons}, \tkzcname{tkzDrawTriangles}; + + +\item Option "isosceles right" is a new option of the macro \tkzcname{tkzDefTriangle}; +\item Appearance of the macro \tkzcname{usetkztool} which allows to load new "tools"; -\item Appearance of the macro \tkzcname{usetkztool} which allows to load new "tools". +\item The styles can be modified with the help of the following macros : \tkzcname{tkzSetUpPoint}, \tkzcname{tkzSetUpLine}, \tkzcname{tkzSetUpArc}, \tkzcname{tkzSetUpCompass}, \tkzcname{tkzSetUpLabel} and \tkzcname{tkzSetUpStyle}. The last one allows you to create a new style. \end{itemize} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-others.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-others.tex new file mode 100644 index 0000000000..30af7dd713 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-others.tex @@ -0,0 +1,319 @@ + +\section{Different authors} + +\subsection{Code from Andrew Swan} + +\begin{tkzexample}[latex=7cm] +\begin{tikzpicture}[scale=1.25] +\def\radius{4} +\def\angle{40} +\pgfmathsetmacro{\htan}{tan(\angle)} +\tkzDefPoint(0,0){A} \tkzDefPoint(0,\radius){F} +\tkzDefPoint(\radius,0){B} +\tkzDefPointBy[rotation= center A angle \angle](B) +\tkzGetPoint{C} +\tkzDefLine[perpendicular=through B,K=1](A,B) +\tkzGetPoint{b} +\tkzInterLL(A,C)(B,b) \tkzGetPoint{D} +\tkzDefLine[perpendicular=through C,K=-1](A,B) +\tkzGetPoint{c} +\tkzInterLL(C,c)(A,B) \tkzGetPoint{E} +\tkzDrawSector[fill=blue,opacity=0.1](A,B)(C) +\tkzDrawArc[thin](A,B)(F) +\tkzMarkAngle(B,A,C) +\tkzLabelAngle[pos=0.8](B,A,C){$x$} +\tkzDrawPolygon(A,B,D) +\tkzDrawSegments(C,B) +\tkzDrawSegments[dashed,thin](C,E) +\tkzLabelPoints[below left](A) +\tkzLabelPoints[below right](B) +\tkzLabelPoints[above](C) +\tkzLabelPoints[above right](D) +\begin{scope}[/pgf/decoration/raise=5pt] +\draw [decorate,decoration={brace,mirror, + amplitude=10pt},xshift=0pt,yshift=-4pt] +(A) -- (B) node [black,midway,yshift=-20pt] +{\footnotesize $1$}; +\draw [decorate,decoration={brace,amplitude=10pt}, + xshift=4pt,yshift=0pt] +(D) -- (B) node [black,midway,xshift=27pt] +{\footnotesize $\tan x$}; +\draw [decorate,decoration={brace,amplitude=10pt}, + xshift=4pt,yshift=0pt] +(E) -- (C) node [black,midway,xshift=-27pt] +{\footnotesize $\sin x$}; +\end{scope} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Example: Dimitris Kapeta} + +You need in this example to use \tkzname{mkpos=.2} with \tkzcname{tkzMarkAngle} because the measure of $ \widehat{CAM}$ is too small. +Another possiblity is to use \tkzcname{tkzFillAngle}. + + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1] + \tkzDefPoint(0,0){O} + \tkzDefPoint(2.5,0){N} + \tkzDefPoint(-4.2,0.5){M} + \tkzDefPointBy[rotation=center O angle 30](N) + \tkzGetPoint{B} + \tkzDefPointBy[rotation=center O angle -50](N) + \tkzGetPoint{A} + \tkzInterLC(M,B)(O,N) \tkzGetFirstPoint{C} + \tkzInterLC(M,A)(O,N) \tkzGetSecondPoint{A'} + \tkzMarkAngle[mkpos=.2, size=0.5](A,C,B) + \tkzMarkAngle[mkpos=.2, size=0.5](A,M,C) + \tkzDrawSegments(A,C M,A M,B) + \tkzDrawCircle(O,N) + \tkzLabelCircle[above left](O,N)(120){% + $\mathcal{C}$} + \begin{scope}[xfp] + \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M) + \end{scope} + + \tkzDrawPoints(O, A, B, M, B, C) + \tkzLabelPoints[right](O,A,B) + \tkzLabelPoints[above left](M,C) + \tkzLabelPoint[below left](A'){$A'$} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Example : John Kitzmiller } +Prove that $\dfrac{AC}{CE}=\dfrac{BD}{DF}$. + +Another interesting example from John, you can see how to use some extra options like\\\ \tkzname{decoration} and \tkzname{postaction} from \TIKZ\ with \tkzname{tkz-euclide}. + +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[scale=1.5,decoration={markings, + mark=at position 3cm with {\arrow[scale=2]{>}}}] + \tkzDefPoints{0/0/E, 6/0/F, 0/1.8/P, 6/1.8/Q, 0/3/R, 6/3/S} + \tkzDrawLines[postaction={decorate}](E,F P,Q R,S) + \tkzDefPoints{3.5/3/A, 5/3/B} + \tkzDrawSegments(E,A F,B) + \tkzInterLL(E,A)(P,Q) \tkzGetPoint{C} + \tkzInterLL(B,F)(P,Q) \tkzGetPoint{D} + \tkzLabelPoints[above right](A,B) + \tkzLabelPoints[below](E,F) + \tkzLabelPoints[above left](C) + \tkzDrawSegments[style=dashed](A,F) + \tkzInterLL(A,F)(P,Q) \tkzGetPoint{G} + \tkzLabelPoints[above right](D,G) + \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](A,C A,G) + \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](C,E G,F) + \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](B,D) + \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](D,F) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Example 1: from Indonesia} + +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[scale=3] + \tkzDefPoints{0/0/A,2/0/B} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzDefPointBy[rotation=center D angle 45](C)\tkzGetPoint{G} + \tkzDefSquare(G,D)\tkzGetPoints{E}{F} + \tkzInterLL(B,C)(E,F)\tkzGetPoint{H} + \tkzFillPolygon[gray!10](D,E,H,C,D) + \tkzDrawPolygon(A,...,D)\tkzDrawPolygon(D,...,G) + \tkzDrawSegment(B,E) + \tkzMarkSegments[mark=|,size=3pt,color=gray](A,B B,C C,D D,A E,F F,G G,D D,E) + \tkzMarkSegments[mark=||,size=3pt,color=gray](B,E E,H) + \tkzLabelPoints[left](A,D) + \tkzLabelPoints[right](B,C,F,H) + \tkzLabelPoints[above](G)\tkzLabelPoints[below](E) + \tkzMarkRightAngles(D,A,B D,G,F) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Example 2: from Indonesia} +\begin{tkzexample}[vbox,small] + \begin{tikzpicture}[pol/.style={fill=brown!40,opacity=.5}, + seg/.style={tkzdotted,color=gray}, hidden pt/.style={fill=gray!40}, + mra/.style={color=gray!70,tkzdotted,/tkzrightangle/size=.2},scale=1.5] + \tkzDefPoints{0/0/A,2.5/0/B,1.33/0.75/D,0/2.5/E,2.5/2.5/F} + \tkzDefLine[parallel=through D](A,B) \tkzGetPoint{I1} + \tkzDefLine[parallel=through B](A,D) \tkzGetPoint{I2} + \tkzInterLL(D,I1)(B,I2) \tkzGetPoint{C} + \tkzDefLine[parallel=through E](A,D) \tkzGetPoint{I3} + \tkzDefLine[parallel=through D](A,E) \tkzGetPoint{I4} + \tkzInterLL(E,I3)(D,I4) \tkzGetPoint{H} + \tkzDefLine[parallel=through F](E,H) \tkzGetPoint{I5} + \tkzDefLine[parallel=through H](E,F) \tkzGetPoint{I6} + \tkzInterLL(F,I5)(H,I6) \tkzGetPoint{G} + \tkzDefMidPoint(G,H) \tkzGetPoint{P} \tkzDefMidPoint(G,C) \tkzGetPoint{Q} + \tkzDefMidPoint(B,C) \tkzGetPoint{R} \tkzDefMidPoint(A,B) \tkzGetPoint{S} + \tkzDefMidPoint(A,E) \tkzGetPoint{T} \tkzDefMidPoint(E,H) \tkzGetPoint{U} + \tkzDefMidPoint(A,D) \tkzGetPoint{M} \tkzDefMidPoint(D,C) \tkzGetPoint{N} + \tkzInterLL(B,D)(S,R)\tkzGetPoint{L} \tkzInterLL(H,F)(U,P) \tkzGetPoint{K} + \tkzDefLine[parallel=through K](D,H) \tkzGetPoint{I7} + \tkzInterLL(K,I7)(B,D) \tkzGetPoint{O} + \tkzFillPolygon[pol](P,Q,R,S,T,U) + \tkzDrawSegments[seg](K,O K,L P,Q R,S T,U C,D H,D A,D M,N B,D) + \tkzDrawSegments(E,H B,C G,F G,H G,C Q,R S,T U,P H,F) + \tkzDrawPolygon(A,B,F,E) + \tkzDrawPoints(A,B,C,E,F,G,H,P,Q,R,S,T,U,K) \tkzDrawPoints[hidden pt](M,N,O,D) + \tkzMarkRightAngle[mra](L,O,K) + \tkzMarkSegments[mark=|,size=1pt,thick,color=gray](A,S B,S B,R C,R + Q,C Q,G G,P H,P E,U H,U E,T A,T) + \tkzLabelAngle[pos=.3](K,L,O){$\alpha$} + \tkzLabelPoints[below](O,A,S,B) \tkzLabelPoints[above](H,P,G) + \tkzLabelPoints[left](T,E) \tkzLabelPoints[right](C,Q) + \tkzLabelPoints[above left](U,D,M) \tkzLabelPoints[above right](L,N) + \tkzLabelPoints[below right](F,R) \tkzLabelPoints[below left](K) +\end{tikzpicture} +\end{tkzexample} +\newpage + +\subsection{Illustration of the Morley theorem by Nicolas François} +\begin{tkzexample}[vbox,small] + \begin{tikzpicture} + \tkzInit[ymin=-3,ymax=5,xmin=-5,xmax=7] + \tkzClip + \tkzDefPoints{-2.5/-2/A,2/4/B,5/-1/C} + \tkzFindAngle(C,A,B) \tkzGetAngle{anglea} + \tkzDefPointBy[rotation=center A angle 1*\anglea/3](C) \tkzGetPoint{TA1} + \tkzDefPointBy[rotation=center A angle 2*\anglea/3](C) \tkzGetPoint{TA2} + \tkzFindAngle(A,B,C) \tkzGetAngle{angleb} + \tkzDefPointBy[rotation=center B angle 1*\angleb/3](A) \tkzGetPoint{TB1} + \tkzDefPointBy[rotation=center B angle 2*\angleb/3](A) \tkzGetPoint{TB2} + \tkzFindAngle(B,C,A) \tkzGetAngle{anglec} + \tkzDefPointBy[rotation=center C angle 1*\anglec/3](B) \tkzGetPoint{TC1} + \tkzDefPointBy[rotation=center C angle 2*\anglec/3](B) \tkzGetPoint{TC2} + \tkzInterLL(A,TA1)(B,TB2) \tkzGetPoint{U1} + \tkzInterLL(A,TA2)(B,TB1) \tkzGetPoint{V1} + \tkzInterLL(B,TB1)(C,TC2) \tkzGetPoint{U2} + \tkzInterLL(B,TB2)(C,TC1) \tkzGetPoint{V2} + \tkzInterLL(C,TC1)(A,TA2) \tkzGetPoint{U3} + \tkzInterLL(C,TC2)(A,TA1) \tkzGetPoint{V3} + \tkzDrawPolygons(A,B,C U1,U2,U3 V1,V2,V3) + \tkzDrawLines[add=2 and 2,very thin,dashed](A,TA1 B,TB1 C,TC1 A,TA2 B,TB2 C,TC2) + \tkzDrawPoints(U1,U2,U3,V1,V2,V3) + \tkzLabelPoint[left](V1){$s_a$} \tkzLabelPoint[right](V2){$s_b$} + \tkzLabelPoint[below](V3){$s_c$} \tkzLabelPoint[above left](A){$A$} + \tkzLabelPoints[above right](B,C) \tkzLabelPoint(U1){$t_a$} + \tkzLabelPoint[below left](U2){$t_b$} \tkzLabelPoint[above](U3){$t_c$} + \end{tikzpicture} + \end{tkzexample} + +\newpage +\subsection{Gou gu theorem / Pythagorean Theorem by Zhao Shuang} +\begin{tikzpicture} +\node [mybox,title={Gou gu theorem / Pythagorean Theorem by Zhao Shuang}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{Pythagoras was not the first person who discovered this theorem around the world. Ancient China discovered this theorem much earlier than him. So there is another name for the Pythagorean theorem in China, the Gou-Gu theorem. +Zhao Shuang was an ancient Chinese mathematician. He rediscovered the “Gou gu therorem”, which is actually the Chinese version of the “Pythagorean theorem”. Zhao Shuang used a method called the “cutting and compensation principle”, he created a picture of “Pythagorean Round Square” +Below the figure used to illustrate the proof of the “Gou gu theorem.” (code from Nan Geng) +}} +\end{minipage} +}; +\end{tikzpicture} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.8] + \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){A'} + \tkzInterCC[R](A, 5)(A', 3) + \tkzGetSecondPoint{B} + \tkzDefSquare(A,B) \tkzGetPoints{C}{D} + \tkzCalcLength(A,A') \tkzGetLength{lA} + \tkzCalcLength(A',B) \tkzGetLength{lB} + \pgfmathparse{\lA-\lB} + \tkzInterLC[R](A,A')(A',\pgfmathresult) + \tkzGetFirstPoint{D'} + \tkzDefSquare(D',A')\tkzGetPoints{B'}{C'} + \tkzDefLine[orthogonal=through D](D,D') + \tkzGetPoint{d} + \tkzDefLine[orthogonal=through A](A,A') + \tkzGetPoint{a} + \tkzDefLine[orthogonal=through C](C,C') + \tkzGetPoint{c} + \tkzInterLL(D,d)(C,c) \tkzGetPoint{E} + \tkzInterLL(D,d)(A,a) \tkzGetPoint{F} + \tkzDefSquare(E,F)\tkzGetPoints{G}{H} + \tkzDrawPolygons[fill=teal!10](A,B,A' B,C,B' + C,D,C' A,D',D) + \tkzDrawPolygons(A,B,C,D E,F,G,H) + \tkzDrawPolygon[fill=green!10](A',B',C',D') + \tkzDrawSegment[dim={$a$,-10pt,}](D,C') + \tkzDrawSegment[dim={$b$,-10pt,}](C,C') + \tkzDrawSegment[dim={$c$,-10pt,}](C,D) + \tkzDrawPoints[size=2](A,B,C,D,A',B',C',D') + \tkzLabelPoints[left](A) + \tkzLabelPoints[below](B) + \tkzLabelPoints[right](C) + \tkzLabelPoints[above](D) + \tkzLabelPoints[right](A') + \tkzLabelPoints[below right](B') + \tkzLabelPoints[below left](C') + \tkzLabelPoints[below](D') + \end{tikzpicture} +\end{tkzexample} + +\newpage +\subsection{Reuleaux-Triangle} +\begin{tikzpicture} +\node [mybox,title={Reuleaux-triangle by Stefan Kottwitz}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{A well-known classic field of mathematics is geometry. +You may know Euclidean geometry from school, with constructions +by compass and ruler. Math teachers may be very interested in +drawing geometry constructions and explanations. Underlying +constructions can help us with general drawings where we would +need intersections and tangents of lines and circles, even if +it does not look like geometry. +So, here, we will remember school geometry drawings. +We will use the tkz-euclide package, which works on top of TikZ. +We will construct an equilateral triangle. +Then we extend it to get a Reuleaux triangle, and add annotations. +The code is fully explained in the LaTeX Cookbook, Chapter 10, +Advanced Mathematics, Drawing geometry pictures. + Stefan Kottwitz +}} +\end{minipage} +}; +\end{tikzpicture} + +\begin{tikzpicture} + + \tkzDefPoint(0,0){A} \tkzDefPoint(4,1){B} + \tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{D} + \tkzInterLC(A,B)(B,A) \tkzGetPoints{F}{E} + \tkzDrawCircles[dashed](A,B B,A) + \tkzDrawPolygons(A,B,C A,E,D) + + \tkzCompasss[color=red, very thick](A,C B,C A,D B,D) + \begin{scope} + \tkzSetUpArc[fill=blue!10,thick,delta=0] + \tkzDrawArc(A,B)(C) + \tkzDrawArc(B,C)(A) + \tkzDrawArc(C,A)(B) + \end{scope} + + \tkzMarkAngles[fill=yellow,opacity=0.5](D,A,E A,E,D) + \tkzMarkRightAngle[size=0.65,fill=red!20,opacity=0.2](A,D,E) + + \tkzLabelAngle[pos=0.7](D,A,E){$\alpha$} + \tkzLabelAngle[pos=0.8](A,E,D){$\beta$} + \tkzLabelAngle[pos=0.5,xshift=-1.4mm](A,D,D){$90^\circ$} + \begin{scope}[font=\small] + \tkzLabelSegment[below=0.6cm,align=center](A,B){Reuleaux\\triangle} + \tkzLabelSegment[above right,sloped](A,E){hypotenuse} + \tkzLabelSegment[below,sloped](D,E){opposite} + \tkzLabelSegment[below,sloped](A,D){adjacent} + \tkzLabelSegment[below right=4cm](A,E){Thales circle} + \end{scope} + + \tkzLabelPoints[below left](A) + \tkzLabelPoints(B,D) + \tkzLabelPoint[above](C){$C$} + \tkzLabelPoints(E) + \tkzDrawPoints(A,...,E) + +\end{tikzpicture} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointby.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointby.tex index fdc4f91fb9..9c3f682563 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointby.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointby.tex @@ -1,4 +1,4 @@ -\section{Definition of points by transformation; \tkzcname{tkzDefPointBy} } +\section{Definition of points by transformation : \tkzcname{tkzDefPointBy} } These transformations are: \begin{itemize} @@ -39,6 +39,7 @@ options & & examples \\ \TOline{rotation } {= center \#1 angle \#2}{[rotation=center O angle 30](E)} \TOline{rotation in rad}{= center \#1 angle \#2}{[rotation in rad=center O angle pi/3](E)} \TOline{inversion}{= center \#1 through \#2}{[inversion =center O through A](E)} +\TOline{inversion negative}{= center \#1 through \#2}{...} \bottomrule \end{tabular} @@ -46,13 +47,11 @@ The image is only defined and not drawn. \end{NewMacroBox} \subsection{Examples of transformations} -\subsubsection{Example of translation} +\subsubsection{translation} -\subsection{Example of translation} \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[>=latex] - \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B} - \tkzDefPoint(3,0){C} + \tkzDefPoints{0/0/A,3/1/B,3/0/C} \tkzDefPointBy[translation= from B to A](C) \tkzGetPoint{D} \tkzDrawPoints[teal](A,B,C,D) @@ -61,37 +60,36 @@ The image is only defined and not drawn. \end{tikzpicture} \end{tkzexample} -\subsubsection{Example of reflection (orthogonal symmetry)} +\subsubsection{reflection (orthogonal symmetry)} -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoints{1.5/-1.5/C,-4.5/2/D} - \tkzDefPoint(-4,-2){O} - \tkzDefPoint(-2,-2){A} - \foreach \i in {0,1,...,4}{% - \pgfmathparse{0+\i * 72} - \tkzDefPointBy[rotation=% - center O angle \pgfmathresult](A) - \tkzGetPoint{A\i} - \tkzDefPointBy[reflection = over C--D](A\i) - \tkzGetPoint{A\i'}} - \tkzDrawPolygon(A0, A2, A4, A1, A3) - \tkzDrawPolygon(A0', A2', A4', A1', A3') +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{-2/-2/A,-1/-1/C,-4/2/D,-4/0/O} + \tkzDrawCircle(O,A) + \tkzDefPointBy[reflection = over C--D](A) + \tkzGetPoint{A'} + \tkzDefPointBy[reflection = over C--D](O) + \tkzGetPoint{O'} + \tkzDrawCircle(O',A') \tkzDrawLine[add= .5 and .5](C,D) + \tkzDrawPoints(C,D,O,O') \end{tikzpicture} \end{tkzexample} -\subsubsection{Example of \tkzname{homothety} and \tkzname{projection}} +\subsubsection{\tkzname{homothety} and \tkzname{projection}} -\begin{tkzexample}[vbox,small] -\begin{tikzpicture}[scale=1.2] - \tkzDefPoint(0,1){A} \tkzDefPoint(5,3){B} \tkzDefPoint(3,4){C} - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/1/A,5/3/B,3/4/C} + \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} \tkzDrawLine[add=0 and 0,color=magenta!50 ](A,a) - \tkzDefPointBy[homothety=center A ratio .5](a) \tkzGetPoint{a'} - \tkzDefPointBy[projection = onto A--B](a') \tkzGetPoint{k'} - \tkzDefPointBy[projection = onto A--B](a) \tkzGetPoint{k} + \tkzDefPointBy[homothety=center A ratio .5](a) + \tkzGetPoint{a'} + \tkzDefPointBy[projection = onto A--B](a') + \tkzGetPoint{k'} + \tkzDefPointBy[projection = onto A--B](a) + \tkzGetPoint{k} \tkzDrawLines[add= 0 and .3](A,k A,C) \tkzDrawSegments[blue](a',k' a,k) \tkzDrawPoints(a,a',k,k',A) @@ -101,50 +99,48 @@ The image is only defined and not drawn. \end{tkzexample} -\subsubsection{Example of projection} -\begin{tkzexample}[vbox,small] +\subsubsection{\tkzname{projection}} +\begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(0,4){B} + \tkzDefPoints{0/0/A,0/4/B} \tkzDefTriangle[pythagore](B,A) \tkzGetPoint{C} \tkzDefLine[bisector](B,C,A) \tkzGetPoint{c} - \tkzInterLL(C,c)(A,B) \tkzGetPoint{D} - \tkzDefPointBy[projection=onto B--C](D) \tkzGetPoint{G} + \tkzInterLL(C,c)(A,B) \tkzGetPoint{D} + \tkzDefPointBy[projection=onto B--C](D) + \tkzGetPoint{G} \tkzInterLC(C,D)(D,A) \tkzGetPoints{E}{F} - \tkzDrawPolygon[teal](A,B,C) + \tkzDrawPolygon(A,B,C) \tkzDrawSegment(C,D) \tkzDrawCircle(D,A) - \tkzDrawSegment[orange](D,G) - \tkzMarkRightAngle[fill=orange!20](D,G,B) + \tkzDrawSegment[new](D,G) + \tkzMarkRightAngle[fill=orange!10,opacity=.4](D,G,B) \tkzDrawPoints(A,C,F) \tkzLabelPoints(A,C,F) \tkzDrawPoints(B,D,E,G) \tkzLabelPoints[above right](B,D,E,G) \end{tikzpicture} \end{tkzexample} -\subsubsection{Example of symmetry} -\begin{tkzexample}[vbox,small] +\subsubsection{\tkzname{symmetry} } +\begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(2,2){B} + \tkzDefPoints{2/-1/A,2/2/B,0/0/O} \tkzDefPointsBy[symmetry=center O](B,A){} \tkzDrawLine(A,A') \tkzDrawLine(B,B') \tkzMarkAngle[mark=s,arc=lll, - size=2 cm,mkcolor=red](A,O,B) - \tkzLabelAngle[pos=1,circle,draw, - fill=blue!10](A,O,B){$60^{\circ}$} + size=1.5,mkcolor=red](A,O,B) + \tkzLabelAngle[pos=2,circle,draw, + fill=blue!10,font=\scriptsize](A,O,B){$60^{\circ}$} \tkzDrawPoints(A,B,O,A',B') - \tkzLabelPoints(A,B,O,A',B') -\end{tikzpicture} + \tkzLabelPoints(B,B') + \tkzLabelPoints[below](A,O,A') +\end{tikzpicture} \end{tkzexample} -\subsubsection{Example of rotation} +\subsubsection{\tkzname{rotation} } \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=0.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} + \tkzDefPoints{0/0/A,5/0/B} \tkzDrawSegment(A,B) \tkzDefPointBy[rotation=center A angle 60](B) \tkzGetPoint{C} @@ -152,70 +148,262 @@ The image is only defined and not drawn. \tkzGetPoint{D} \tkzDrawSegment(A,tkzPointResult) \tkzDrawLine(B,D) - \tkzDrawArc[orange,delta=10](A,B)(C) - \tkzDrawArc[orange,delta=10](B,C)(A) - \tkzDrawArc[orange,delta=10](C,D)(D) - \tkzMarkRightAngle(D,B,A) + \tkzDrawArc(A,B)(C) + \tkzDrawArc(B,C)(A) + \tkzDrawArc(C,D)(D) + \tkzMarkRightAngle(D,B,A) + \tkzDrawPoints(A,B) + \tkzLabelPoints(A,B) + \tkzLabelPoints[above](C,D) \end{tikzpicture} \end{tkzexample} -\subsubsection{Example of rotation in radian} +\subsubsection{\tkzname{rotation in radian}} \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture} \tkzDefPoint["$A$" left](1,5){A} - \tkzDefPoint["$B$" right](5,2){B} + \tkzDefPoint["$B$" right](4,3){B} \tkzDefPointBy[rotation in rad= center A angle pi/3](B) \tkzGetPoint{C} \tkzDrawSegment(A,B) \tkzDrawPoints(A,B,C) - \tkzCompass[color=red](A,C) - \tkzCompass[color=red](B,C) + \tkzCompass(A,C) + \tkzCompass(B,C) \tkzLabelPoints(C) \end{tikzpicture} \end{tkzexample} -\subsubsection{Inversion of points} -\begin{tkzexample}[latex=8cm,small] +\subsubsection{\tkzname{inversion }} + +Inversion is the process of transforming points to a corresponding set of points known as their inverse points. Two points $P$ and $P'$ are said to be inverses with respect to an inversion circle having inversion center $O$ and inversion radius $k$ if $P'$ is the perpendicular foot of the altitude of $OQP$, where $Q$ is a point on the circle such that $OQ$ is perpendicular to $PQ$.\\ + The quantity $k^2$ is known as the circle power (Coxeter 1969, p. 81). +(\url{https://mathworld.wolfram.com/Inversion.html}) + +Some propositions : +\begin{itemize} +\item The inverse of a circle (not through the center of inversion) is a circle. +\item The inverse of a circle through the center of inversion is a line. +\item The inverse of a line (not through the center of inversion) is a circle through the center of inversion. +\item A circle orthogonal to the circle of inversion is its own inverse. +\item A line through the center of inversion is its own inverse. +\item Angles are preserved in inversion. +\end{itemize} + +Explanation +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoints{4/0/A,6/0/P,0/0/O} + \tkzDefCircle(O,A) + \tkzDefLine[orthogonal=through P](O,P) + \tkzGetPoint{L} + \tkzDefTangent[from = P](O,A) \tkzGetPoints{Q}{R} + \tkzDefPointBy[projection=onto O--A](Q) \tkzGetPoint{P'} + \tkzDrawSegments(O,P O,A) + \tkzDrawSegments[new](O,P O,Q P,Q Q,P') + \tkzDrawCircle(O,A) + \tkzDrawLines[add=1 and 0](P,L) + \tkzLabelPoints[below,font=\scriptsize](O,P') + \tkzLabelPoints[above right,font=\scriptsize](P,Q) + \tkzDrawPoints(O,P) \tkzDrawPoints[new](Q,P') + \tkzLabelSegment[above](O,Q){$k$} + \tkzMarkRightAngles(A,P',Q P,Q,O) + \tkzLabelCircle[above=.5cm, + font=\scriptsize](O,A)(100){inversion circle} + \tkzLabelPoint[left,font=\scriptsize](O){inversion center} + \tkzLabelPoint[left,font=\scriptsize](L){polar} +\end{tikzpicture} +\end{tkzexample} + +Directly +(Center O power=$k^2={OA}^2=OP \times OP'$) + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoints{4/0/A,6/0/P,0/0/O} + \tkzDefCircle(O,A) + \tkzDefPointBy[inversion = center O through A](P) + \tkzGetPoint{P'} + \tkzDrawSegments(O,P) + \tkzDrawCircle(O,A) + \tkzLabelPoints[above right,font=\scriptsize](O,A,P,P') + \tkzDrawPoints(O,A,P,P') +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Inversion of lines} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] +\tkzDefPoints{0/0/O,3/0/I,4/3/P,6/-3/Q} +\tkzDrawCircle(O,I) +\tkzDefPointBy[projection= onto P--Q](O) \tkzGetPoint{A} +\tkzDefPointBy[inversion = center O through I](A) +\tkzGetPoint{A'} +\tkzDefPointBy[inversion = center O through I](P) +\tkzGetPoint{P'} +\tkzDrawCircle[new,diameter](O,A') +\tkzDrawLines[add=.25 and .25,red](P,Q) +\tkzDrawLines[add=.25 and .25](O,A) +\tkzDrawSegments(O,P) +\tkzDrawPoints(A,P,O) \tkzDrawPoints[new](A',P') +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] +\tkzDefPoints{0/0/O,3/0/I,3/2/P,3/-2/Q} +\tkzDrawCircle(O,I) +\tkzDefPointBy[projection= onto P--Q](O) \tkzGetPoint{A} +\tkzDefPointBy[inversion = center O through I](A) +\tkzGetPoint{A'} +\tkzDefPointBy[inversion = center O through I](P) +\tkzGetPoint{P'} +\tkzDrawCircle[new,diameter](O,A') +\tkzDrawLines[add=.25 and .25,red](P,Q) +\tkzDrawLines[add=.25 and .25](O,A) +\tkzDrawSegments(O,P) +\tkzDrawPoints(A,P,O) \tkzDrawPoints[new](A',P') +\end{tikzpicture} +\end{tkzexample} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] +\tkzDefPoints{0/0/O,3/0/I,2/1/P,2/-2/Q} +\tkzDrawCircle(O,I) +\tkzDefPointBy[projection= onto P--Q](O) \tkzGetPoint{A} +\tkzDefPointBy[inversion = center O through I](A) +\tkzGetPoint{A'} +\tkzDefPointBy[inversion = center O through I](P) +\tkzGetPoint{P'} +\tkzDrawCircle[new,diameter](O,A') +\tkzDrawLines[add=.25 and .75,red](P,Q) +\tkzDrawLines[add=.25 and .25](O,A') +\tkzDrawSegments(O,P') +\tkzDrawPoints(A,P,O) \tkzDrawPoints[new](A',P') +\end{tikzpicture} +\end{tkzexample} + + +\subsubsection{Inversion of circle} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] +\tkzDefPoints{0/0/O,3/2/A,2/1/P} +\tkzDefTangent[from = O](A,P) \tkzGetPoints{T}{X} +\tkzDefPointsBy[homothety=center O ratio 1.25](A,P,T){} +\tkzInterCC(A,P)(A',P') \tkzGetPoints{C}{D} +\tkzCalcLength(A,P) +\tkzGetLength{rAP} +\tkzDefPointOnCircle[angle=190,center=A,radius=\rAP] +\tkzGetPoint{M} +\tkzDefPointBy[inversion = center O through C](M) +\tkzGetPoint{M'} +\tkzDrawCircles(A,P A',P') +\tkzDrawCircle(O,C) +\tkzDrawLines[add=0 and .5](O,T' O,A' O,M' O,P') +\tkzDrawPoints(A,A',P,P',O,T,T',M,M') +\tkzLabelPoints(O,T,T') +\tkzLabelPoints[above left](M,M') +\tkzLabelPoints[below](P,P') +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Inversion of Triangle with respect to the Incircle} +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=1] +\tkzDefPoints{0/0/A,5/1/B,3/6/C} +\tkzDefTriangleCenter[in](A,B,C) \tkzGetPoint{O} +\tkzDefPointBy[projection= onto A--C](O) \tkzGetPoint{b} +\tkzDefPointBy[projection= onto A--C](O) \tkzGetPoint{b} +\tkzDefPointBy[projection= onto B--C](O) \tkzGetPoint{a} +\tkzDefPointBy[projection= onto A--B](O) \tkzGetPoint{c} +\tkzDefPointsBy[inversion = center O through b](a,b,c)% + {Ia,Ib,Ic} +\tkzDefMidPoint(O,Ia) \tkzGetPoint{Ja} +\tkzDefMidPoint(O,Ib) \tkzGetPoint{Jb} +\tkzDefMidPoint(O,Ic) \tkzGetPoint{Jc} +\tkzInterCC(Ja,O)(Jb,O) \tkzGetPoints{O}{x} +\tkzInterCC(Ja,O)(Jc,O) \tkzGetPoints{y}{O} +\tkzInterCC(Jb,O)(Jc,O) \tkzGetPoints{O}{z} +\tkzDrawPolygon(A,B,C) +\tkzDrawCircle(O,b)\tkzDrawPoints(A,B,C,O) +\tkzDrawCircles[dashed,gray](Ja,y Jb,x Jc,z) +\tkzDrawArc[line width=1pt,orange](Jb,x)(z) +\tkzDrawArc[line width=1pt,orange](Jc,z)(y) +\tkzDrawArc[line width=1pt,orange](Ja,y)(x) +\tkzLabelPoint[below](A){$A$}\tkzLabelPoint[above](C){$C$} +\tkzLabelPoint[right](B){$B$}\tkzLabelPoint[below](O){$O$} +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Inversion: orthogonal circle with inversion circle} +The inversion circle itself, circles orthogonal to it, and lines through the inversion center are invariant under inversion. If the circle meets the reference circle, these invariant points of intersection are also on the inverse circle. See I and J in the next figure. + +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture}[scale=1] +\tkzDefPoint(0,0){O}\tkzDefPoint(1,0){A} +\tkzDefPoint(-1.5,-1.5){z1} +\tkzDefPoint(1.5,-1.25){z2} +\tkzDefCircleBy[orthogonal through=z1 and z2](O,A) +\tkzGetPoint{c} +\tkzDrawCircle[new](c,z1) +\tkzDefPointBy[inversion = center O through A](z1) +\tkzGetPoint{Z1} +\tkzInterCC(O,A)(c,z1) \tkzGetPoints{I}{J} +\tkzDefPointBy[inversion = center O through A](I) +\tkzGetPoint{I'} +\tkzDrawCircle(O,A) +\tkzDrawPoints(O,A,z1,z2) +\tkzDrawPoints[new](c,Z1,I,J) +\tkzLabelPoints(O,A,z1,z2,c,Z1,I,J) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{\tkzname{Inversion} and \tkzname{homothety} } +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] +\tkzDefPoints{0/0/O,3/2/A,2/1/P} +\tkzDefTangent[from = O](A,P) \tkzGetPoints{T}{X} +\tkzDefPointsBy[homothety = center O% + ratio 1.25](A,P,T){} +\tkzInterCC(A,P)(A',P') \tkzGetPoints{C}{D} +\tkzCalcLength(A,P) +\tkzGetLength{rAP} +\tkzDefPointOnCircle[angle=190,center=A,radius=\rAP] +\tkzGetPoint{M} +\tkzDefPointBy[inversion = center O through C](M) +\tkzGetPoint{M'} +\tkzDrawCircles[new](A,P A',P') +\tkzDrawCircle(O,C) +\tkzDrawLines[add=0 and .5](O,T' O,A' O,M' O,P') +\tkzDrawPoints(A,A',P,P',O,T,T',M,M') +\tkzLabelPoints(O,T,T',M,M') +\tkzLabelPoints[below](P,P') +\end{tikzpicture} +\end{tkzexample} + + +For a more complex example see \tkzname{Pappus} \ref{pappus} + +\subsubsection{\tkzname{inversion negative}} +It's an inversion followed by a symmetry of center $O$ +\begin{tkzexample}[latex=5cm,small] \begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){A} + \tkzDefPoints{1/0/A,0/0/O} \tkzDefPoint(-1.5,-1.5){z1} - \tkzDefPoint(0.35,0){z2} - \tkzDefPointBy[inversion =% - center O through A](z1) + \tkzDefPoint(0.35,-2){z2} + \tkzDefPointBy[inversion negative = center O through A](z1) \tkzGetPoint{Z1} - \tkzDefPointBy[inversion =% - center O through A](z2) + \tkzDefPointBy[inversion negative = center O through A](z2) \tkzGetPoint{Z2} \tkzDrawCircle(O,A) - \tkzDrawPoints[color=black, - fill=red,size=4](Z1,Z2) + \tkzDrawPoints[color=black, fill=red,size=4](Z1,Z2) \tkzDrawSegments(z1,Z1 z2,Z2) - \tkzDrawPoints[color=black, - fill=red,size=4](O,z1,z2) - \tkzLabelPoints(O,A,z1,z2,Z1,Z2) + \tkzDrawPoints[color=black, fill=red,size=4](O,z1,z2) + \tkzLabelPoints[font=\scriptsize](O,A,z1,z2,Z1,Z2) \end{tikzpicture} \end{tkzexample} -\subsubsection{Point Inversion: Orthogonal Circles} -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){A} - \tkzDrawCircle(O,A) - \tkzDefPoint(0.5,-0.25){z1} - \tkzDefPoint(-0.5,-0.5){z2} - \tkzDefPointBy[inversion = % - center O through A](z1) - \tkzGetPoint{Z1} - \tkzCircumCenter(z1,z2,Z1) - \tkzGetPoint{c} - \tkzDrawCircle(c,Z1) - \tkzDrawPoints[color=black, - fill=red,size=4](O,z1,z2,Z1,O,A) -\end{tikzpicture} -\end{tkzexample} \subsection{Transformation of multiple points; \tkzcname{tkzDefPointsBy} } Variant of the previous macro for defining multiple images. @@ -239,7 +427,7 @@ The image is $B'$. \begin{tabular}{lll}% arguments & examples & \\ \midrule -\TAline{\parg{list of points}\marg{list of pts}}{(A,B)\{E,F\}}{$E$ is the image of $A$ and $F$ is the image of $B$.} \\ +\TAline{\parg{list of points}\marg{list of pts}}{(A,B)\{E,F\}}{$E$,$F$ images of $A$, $B$} \\ \bottomrule \end{tabular} @@ -268,13 +456,12 @@ The points are only defined and not drawn. \subsubsection{Example of translation} \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[>=latex] - \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){A'} - \tkzDefPoint(3,0){B} \tkzDefPoint(1,2){C} + \tkzDefPoints{0/0/A,3/0/B,3/1/A',1/2/C} \tkzDefPointsBy[translation= from A to A'](B,C){} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPolygon[color=red](A',B',C') - \tkzDrawPoints[color=blue](A,B,C) - \tkzDrawPoints[color=red](A',B',C') + \tkzDrawPolygon(A,B,C) + \tkzDrawPolygon[new](A',B',C') + \tkzDrawPoints(A,B,C) + \tkzDrawPoints[new](A',B',C') \tkzLabelPoints(A,B,A',B') \tkzLabelPoints[above](C,C') \tkzDrawSegments[color = gray,->, @@ -282,4 +469,32 @@ The points are only defined and not drawn. \end{tikzpicture} \end{tkzexample} -\endinput +\subsubsection{Example of symmetry} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.4] + \tkzDefPoint(-4,0){I} + \tkzDefPoint(4,0){J} + \tkzDefPoint(0,0){O} + \tkzInterCC(J,O)(O,J) \tkzGetPoints{L}{H} + \tkzInterCC(I,O)(O,I) \tkzGetPoints{K}{G} + \tkzDrawLines[add=1.5 and 1.5](I,K I,G J,H J,L) + \tkzDrawLines[add=.5 and .5](I,J) + \tkzInterLL(I,K)(J,H) \tkzGetPoint{M} + \tkzInterLL(I,G)(J,L) \tkzGetPoint{N} + \tkzDefPointsBy[symmetry=center J](L,H){D,E} + \tkzDefPointsBy[symmetry=center I](G,K){C,F} + \tkzDrawPoints(H,L,K,G,I,J,D,E,C,F,M,N) + \tkzDrawCircle[R](O,4) + \tkzDrawCircle[R](I,4) + \tkzDrawCircle[R](J,4) + \tkzDrawArc(N,D)(C) + \tkzDrawArc(M,F)(E) + \tkzDrawArc(J,E)(D) + \tkzDrawArc(I,C)(F) + \tkzLabelPoints[font=\scriptsize](H,L,K,G,I,J,% + D,E,C,F,M,N) +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-points.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-points.tex index cce1c9066f..51c4415438 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-points.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-points.tex @@ -1,4 +1,15 @@ -\section{Definition of a point} +\section{First step: fixed points} + +The first step in a geometric construction is to define the fixed points from which the figure will be constructed. + +The general idea is to avoid manipulating coordinates and to prefer to use the references of the points fixed in the first step or obtained using the tools provided by the package. Even if it's possible, I think it's a bad idea to work directly with coordinates. Preferable is to use named points. + +\tkzname{\tkznameofpack} uses macros and vocabulary specific to geometric construction. It is of course possible to use the tools of \TIKZ\ but it seems more logical to me not to mix the different syntaxes. + +A point in \tkzname{\tkznameofpack} is a particular "node" for \TIKZ. In the next section we will see how to define points using coordinates. The style of the points (color and shape) will not be discussed. You will find some indications in some examples; for more information you can read the following section \ref{custom}. + + +\section{Definition of a point : \tkzcname{tkzDefPoint} or \tkzcname{tkzDefPoints}} Points can be specified in any of the following ways: \begin{itemize} @@ -8,31 +19,10 @@ \item Relative points. \end{itemize} -Even if it's possible, I think it's a bad idea to work directly with coordinates. Preferable is to use named points. + A point is defined if it has a name linked to a unique pair of decimal numbers. Let $(x,y)$ or $(a:d)$ i.e. ($x$ abscissa, $y$ ordinate) or ($a$ angle: $d$ distance). - This is possible because the plan has been provided with an orthonormed Cartesian coordinate system. The working axes are supposed to be (ortho)normed with unity equal to $1$~cm or something equivalent like $0.39370$~in. - Now by default if you use a grid or axes, the rectangle used is defined by the coordinate points: $(0,0)$ and $(10,10)$. It's the macro \tkzcname{tkzInit} of the package \tkzNamePack{tkz-base} that creates this rectangle. Look at the following two codes and the result of their compilation: - -\begin{tkzexample}[latex=10cm,small] -\begin{tikzpicture} -\tkzGrid -\tkzDefPoint(0,0){O} -\tkzDrawPoint[red](O) -\tkzShowBB[line width=2pt,teal] -\end{tikzpicture} -\end{tkzexample} - - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(5,5){A} - \tkzDrawSegment[blue](O,A) - \tkzDrawPoints[red](O,A) - \tkzShowBB[line width=2pt,teal] -\end{tikzpicture} -\end{tkzexample} + This is possible because the plan has been provided with an orthonormed Cartesian coordinate system. The working axes are (ortho)normed with unity equal to $1$~cm. The Cartesian coordinate $(a,b)$ refers to the point $a$ centimeters in the $x$-direction and $b$ centimeters in the @@ -42,14 +32,20 @@ A point is defined if it has a name linked to a unique pair of decimal numbers. and a distance $d$ from the origin with a dimensional unit by default it's the \texttt{cm}. - -\begin{minipage}[b]{0.5\textwidth} + The \tkzNameMacro{tkzDefPoint} macro is used to define a point by assigning coordinates to it. This macro is based on + + \tkzNameMacro{coordinate}, a macro of \TIKZ. It can use \TIKZ-specific options such as \tkzname{shift}. If calculations are required then the \tkzNamePack{xfp} package is chosen. We can use Cartesian or polar coordinates. + +\begin{minipage}[t]{0.45\textwidth} Cartesian coordinates -\begin{tkzexample}[vbox,small] +\begin{tkzexample}[code only,small] \begin{tikzpicture}[scale=1] - \tkzInit[xmax=5,ymax=5] + \tkzInit[xmax=5,ymax=5] + % necessary to limit + % the size of the axes + \tkzDrawX[>=latex] + \tkzDrawY[>=latex] \tkzDefPoints{0/0/O,1/0/I,0/1/J} - \tkzDrawXY[noticks,>=latex] \tkzDefPoint(3,4){A} \tkzDrawPoints(O,A) \tkzLabelPoint(A){$A_1 (x_1,y_1)$} @@ -61,21 +57,22 @@ A point is defined if it has a name linked to a unique pair of decimal numbers. \end{tikzpicture} \end{tkzexample}% \end{minipage} -\begin{minipage}[b]{0.5\textwidth} +\begin{minipage}[t]{0.45\textwidth} Polar coordinates -\begin{tkzexample}[vbox,small] +\begin{tkzexample}[code only,small] \begin{tikzpicture}[,scale=1] \tkzInit[xmax=5,ymax=5] + \tkzDrawX[>=latex] + \tkzDrawY[>=latex] \tkzDefPoints{0/0/O,1/0/I,0/1/J} - \tkzDefPoint(40:4){P} - \tkzDrawXY[noticks,>=triangle 45] + \tkzDefPoint(40:4){P} \tkzDrawSegment[dim={$d$, 16pt,above=6pt}](O,P) \tkzDrawPoints(O,P) \tkzMarkAngle[mark=none,->](I,O,P) - \tkzFillAngle[fill=blue!20, - opacity=.5](I,O,P) - \tkzLabelAngle[pos=1.25](I,O,P){$\alpha$} + \tkzFillAngle[opacity=.5](I,O,P) + \tkzLabelAngle[pos=1.25](I,O,P){% + $\alpha$} \tkzLabelPoint(P){$P (\alpha : d )$} \tkzDrawPoints[shape=cross](I,J) \tkzLabelPoints(O,I) @@ -84,22 +81,55 @@ A point is defined if it has a name linked to a unique pair of decimal numbers. \end{tkzexample} \end{minipage}% -The \tkzNameMacro{tkzDefPoint} macro is used to define a point by assigning coordinates to it. This macro is based on \tkzNameMacro{coordinate}, a macro of \TIKZ. It can use \TIKZ-specific options such as \tkzname{shift}. If calculations are required then the \tkzNamePack{xfp} package is chosen. We can use Cartesian or polar coordinates. +\begin{minipage}[b]{0.45\textwidth} +\begin{tikzpicture}[scale=1] + \tkzInit[xmax=5,ymax=5] + \tkzDrawX[>=latex] + \tkzDrawY[>=latex] + \tkzDefPoints{0/0/O,1/0/I,0/1/J} + \tkzDefPoint(3,4){A} + \tkzDrawPoints(O,A) + \tkzLabelPoint(A){$A_1 (x_1,y_1)$} + \tkzShowPointCoord[xlabel=$x_1$,ylabel=$y_1$](A) + \tkzLabelPoints(O,I) + \tkzLabelPoints[left](J) + \tkzDrawPoints[shape=cross](I,J) +\end{tikzpicture} +\end{minipage} +\begin{minipage}[b]{0.45\textwidth} +\begin{tikzpicture}[,scale=1] + \tkzInit[xmax=5,ymax=5] + \tkzDrawX[>=latex] + \tkzDrawY[>=latex] + \tkzDefPoints{0/0/O,1/0/I,0/1/J} + \tkzDefPoint(40:4){P} + \tkzDrawSegment[dim={$d$, + 16pt,above=6pt}](O,P) + \tkzDrawPoints(O,P) + \tkzMarkAngle[mark=none,->](I,O,P) + \tkzFillAngle[opacity=.5](I,O,P) + \tkzLabelAngle[pos=1.25](I,O,P){$\alpha$} + \tkzLabelPoint(P){$P (\alpha : d )$} + \tkzDrawPoints[shape=cross](I,J) + \tkzLabelPoints(O,I) + \tkzLabelPoints[left](J) +\end{tikzpicture} +\end{minipage}% \subsection{Defining a named point \tkzcname{tkzDefPoint}} -\begin{NewMacroBox}{tkzDefPoint}{\oarg{local options}\parg{$x,y$}\marg{name} or \parg{$\alpha$:$d$}\marg{name}}% +\begin{NewMacroBox}{tkzDefPoint}{\oarg{local options}\parg{$x,y$}\marg{ref} or \parg{$\alpha$:$d$}\marg{ref}}% \begin{tabular}{lll}% arguments & default & definition \\ \midrule \TAline{($x,y$)}{no default}{$x$ and $y$ are two dimensions, by default in cm.} \TAline{($\alpha$:$d$)}{no default}{$\alpha$ is an angle in degrees, $d$ is a dimension} -\TAline{\{name\}}{no default}{Name assigned to the point: $A$, $T_a$ ,$P1$ etc ...} +\TAline{\{ref\}}{no default}{Reference assigned to the point: $A$, $T\_a$ ,$P1$ or $P_1$} \bottomrule \end{tabular} \medskip -The obligatory arguments of this macro are two dimensions expressed with decimals, in the first case they are two measures of length, in the second case they are a measure of length and the measure of an angle in degrees. +The obligatory arguments of this macro are two dimensions expressed with decimals, in the first case they are two measures of length, in the second case they are a measure of length and the measure of an angle in degrees. Do not confuse the reference with the name of a point. The reference is used by calculations, but frequently, the name is identical to the reference. \medskip \begin{tabular}{lll}% @@ -113,9 +143,11 @@ options & default & definition \\ \subsubsection{Cartesian coordinates } -\begin{tkzexample}[latex=7cm,small] +\begin{tkzexample}[latex=5cm,small] \begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] + \tkzInit[xmax=5,ymax=5] % limits the size of the axes + \tkzDrawX[>=latex] + \tkzDrawY[>=latex] \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} \tkzDefPoint(0,3){C} @@ -129,15 +161,14 @@ options & default & definition \\ \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1] \tkzInit[xmax=4,ymax=4] - \tkzGrid + \tkzDrawX\tkzDrawY \tkzDefPoint(-1+2,sqrt(4)){O} \tkzDefPoint({3*ln(exp(1))},{exp(1)}){A} \tkzDefPoint({4*sin(pi/6)},{4*cos(pi/6)}){B} - \tkzDrawPoints[color=blue](O,B,A) + \tkzDrawPoints(O,B,A) \end{tikzpicture} \end{tkzexample} - \subsubsection{Polar coordinates } \begin{tkzexample}[latex=7cm,small] @@ -149,25 +180,12 @@ options & default & definition \\ \end{tikzpicture} \end{tkzexample} -\subsubsection{Calculations and coordinates} -You must follow the syntax of \tkzNamePack{xfp} here. It is always possible to go through \tkzNamePack{pgfmath} but in this case, the coordinates must be calculated before using the macro \tkzcname{tkzDefPoint}. - -\begin{tkzexample}[latex=6cm,small] - \begin{tikzpicture}[scale=.5] - \foreach \an [count=\i] in {0,2,...,358} - { \tkzDefPoint(\an:sqrt(sqrt(\an mm))){A_\i}} - \tkzDrawPoints(A_1,A_...,A_180) - \end{tikzpicture} -\end{tkzexample} - - \subsubsection{Relative points} First, we can use the \tkzNameEnv{scope} environment from \TIKZ. In the following example, we have a way to define an equilateral triangle. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1] - \tkzSetUpLine[color=blue!60] \begin{scope}[rotate=30] \tkzDefPoint(2,3){A} \begin{scope}[shift=(A)] @@ -182,14 +200,14 @@ In the following example, we have a way to define an equilateral triangle. \end{tikzpicture} \end{tkzexample} -%<---------------------------------------------------------------------------> \subsection{Point relative to another: \tkzcname{tkzDefShiftPoint}} -\begin{NewMacroBox}{tkzDefShiftPoint}{\oarg{Point}\parg{$x,y$}\marg{name} or \parg{$\alpha$:$d$}\marg{name}}% +\begin{NewMacroBox}{tkzDefShiftPoint}{\oarg{Point}\parg{$x,y$}\marg{ref} or \parg{$\alpha$:$d$}\marg{ref}}% \begin{tabular}{lll}% arguments & default & definition \\ \midrule \TAline{($x,y$)}{no default}{$x$ and $y$ are two dimensions, by default in cm.} \TAline{($\alpha$:$d$)}{no default}{$\alpha$ is an angle in degrees, $d$ is a dimension} +\TAline{\{ref\}}{no default}{Reference assigned to the point: $A$, $T\_a$ ,$P1$ or $P_1$} \midrule options & default & definition \\ @@ -199,7 +217,7 @@ options & default & definition \\ \end{tabular} \end{NewMacroBox} -\subsubsection{Isosceles triangle with \tkzcname{tkzDefShiftPoint}} +\subsubsection{Isosceles triangle} This macro allows you to place one point relative to another. This is equivalent to a translation. Here is how to construct an isosceles triangle with main vertex $A$ and angle at vertex of $30^{\circ} $. \begin{tkzexample}[latex=7cm,small] @@ -208,7 +226,7 @@ This macro allows you to place one point relative to another. This is equivalent \tkzDefShiftPoint[A](0:4){B} \tkzDefShiftPoint[A](30:4){C} \tkzDrawSegments(A,B B,C C,A) - \tkzMarkSegments[mark=|,color=red](A,B A,C) + \tkzMarkSegments[mark=|](A,B A,C) \tkzDrawPoints(A,B,C) \tkzLabelPoints(B,C) \tkzLabelPoints[above left](A) @@ -227,7 +245,7 @@ Let's see how to get an equilateral triangle (there is much simpler) \tkzDrawPoints(A,B,C) \tkzLabelPoints(B,C) \tkzLabelPoints[above left](A) - \tkzMarkSegments[mark=|,color=red](A,B A,C B,C) + \tkzMarkSegments[mark=|](A,B A,C B,C) \end{tikzpicture} \end{tkzexample} @@ -244,17 +262,16 @@ There's a simpler way \end{tikzpicture} \end{tkzexample} -%<---------------------------------------------------------------------------> \subsection{Definition of multiple points: \tkzcname{tkzDefPoints}} -\begin{NewMacroBox}{tkzDefPoints}{\oarg{local options}\marg{$x_1/y_1/n_1,x_2/y_2/n_2$, ...}}% -$x_i$ and $y_i$ are the coordinates of a referenced point $n_i$ +\begin{NewMacroBox}{tkzDefPoints}{\oarg{local options}\marg{$x_1/y_1/n_1,x_2/y_2/r_2$, ...}}% +$x_i$ and $y_i$ are the coordinates of a referenced point $r_i$ \begin{tabular}{lll}% \toprule arguments & default & example \\ \midrule -\TAline{$x_i/y_i/n_i$}{}{\tkzcname{tkzDefPoints\{0/0/O,2/2/A\}}} +\TAline{$x_i/y_i/r_i$}{}{\tkzcname{tkzDefPoints\{0/0/O,2/2/A\}}} \end{tabular} \medskip @@ -267,7 +284,7 @@ options & default & definition \\ \subsection{Create a triangle} \begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=1] +\begin{tikzpicture}[scale=.75] \tkzDefPoints{0/0/A,4/0/B,4/3/C} \tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) @@ -280,132 +297,8 @@ Note here the syntax for drawing the polygon. \begin{tikzpicture}[scale=1] \tkzDefPoints{0/0/A,2/0/B,2/2/C,0/2/D} \tkzDrawPolygon(A,...,D) - \tkzDrawPoints(A,B,C,D) -\end{tikzpicture} -\end{tkzexample} - -\section{Special points} -The introduction of the dots was done in \tkzname{tkz-base}, the most important macro being \tkzcname{tkzDefPoint}. Here are some special points. -%<---------------------------------------------------------------------------> -\subsection{Middle of a segment \tkzcname{tkzDefMidPoint}} -It is a question of determining the middle of a segment. - -\begin{NewMacroBox}{tkzDefMidPoint}{\parg{pt1,pt2}}% -The result is in \tkzname{tkzPointResult}. We can access it with \tkzcname{tkzGetPoint}. - - \medskip -\begin{tabular}{lll}% -\toprule -arguments & default & definition \\ -\midrule -\TAline{(pt1,pt2)}{no default}{pt1 and pt2 are two points} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Use of \tkzcname{tkzDefMidPoint}} -Review the use of \tkzcname{tkzDefPoint} in \tkzNamePack{tkz-base}. -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoint(2,3){A} - \tkzDefPoint(4,0){B} - \tkzDefMidPoint(A,B) \tkzGetPoint{C} - \tkzDrawSegment(A,B) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints[right](A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Barycentric coordinates } - -$pt_1$, $pt_2$, \dots, $pt_n$ being $n$ points, they define $n$ vectors $\overrightarrow{v_1}$, $\overrightarrow{v_2}$, \dots, $\overrightarrow{v_n}$ with the origin of the referential as the common endpoint. $\alpha_1$, $\alpha_2$, -\dots $\alpha_n$ are $n$ numbers, the vector obtained by: -\begin{align*} - \frac{\alpha_1 \overrightarrow{v_1} + \alpha_2 \overrightarrow{v_2} + \cdots + \alpha_n \overrightarrow{v_n}}{\alpha_1 - + \alpha_2 + \cdots + \alpha_n} -\end{align*} -defines a single point. - -\begin{NewMacroBox}{tkzDefBarycentricPoint}{\parg{pt1=$\alpha_1$,pt2=$\alpha_2$,\dots}}% -\begin{tabular}{lll}% -arguments & default & definition \\ -\midrule -\TAline{(pt1=$\alpha_1$,pt2=$\alpha_2$,\dots)}{no default}{Each point has a assigned weight} -\bottomrule -\end{tabular} - -\medskip -You need at least two points. -\end{NewMacroBox} - - -\subsubsection{Using \tkzcname{tkzDefBarycentricPoint} with two points} -In the following example, we obtain the barycentre of points $A$ and $B$ with coefficients $1$ and $2$, in other words: -\[ - \overrightarrow{AI}= \frac{2}{3}\overrightarrow{AB} -\] - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoint(2,3){A} - \tkzDefShiftPointCoord[2,3](30:4){B} - \tkzDefBarycentricPoint(A=1,B=2) - \tkzGetPoint{I} - \tkzDrawPoints(A,B,I) - \tkzDrawLine(A,B) - \tkzLabelPoints(A,B,I) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Using \tkzcname{tkzDefBarycentricPoint} with three points} -This time $M$ is simply the centre of gravity of the triangle. For reasons of simplification and homogeneity, there is also \tkzcname{tkzCentroid}. -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(2,1){A} - \tkzDefPoint(5,3){B} - \tkzDefPoint(0,6){C} - \tkzDefBarycentricPoint(A=1,B=1,C=1) - \tkzGetPoint{M} - \tkzDefMidPoint(A,B) \tkzGetPoint{C'} - \tkzDefMidPoint(A,C) \tkzGetPoint{B'} - \tkzDefMidPoint(C,B) \tkzGetPoint{A'} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A',B',C') - \tkzDrawPoints(A,B,C,M) - \tkzDrawLines[add=0 and 1](A,M B,M C,M) - \tkzLabelPoint(M){$M$} - \tkzAutoLabelPoints[center=M](A,B,C) - \tkzAutoLabelPoints[center=M,above right](A',B',C') -\end{tikzpicture} -\end{tkzexample} - -\subsection{Internal Similitude Center} -The centres of the two homotheties in which two circles correspond are called external and internal centres of similitude. - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=.75,rotate=-30] - \tkzDefPoint(0,0){O} - \tkzDefPoint(4,-5){A} - \tkzDefIntSimilitudeCenter(O,3)(A,1) - \tkzGetPoint{I} - \tkzExtSimilitudeCenter(O,3)(A,1) - \tkzGetPoint{J} - \tkzDefTangent[from with R= I](O,3 cm) - \tkzGetPoints{D}{E} - \tkzDefTangent[from with R= I](A,1 cm) - \tkzGetPoints{D'}{E'} - \tkzDefTangent[from with R= J](O,3 cm) - \tkzGetPoints{F}{G} - \tkzDefTangent[from with R= J](A,1 cm) - \tkzGetPoints{F'}{G'} - \tkzDrawCircle[R,fill=red!50,opacity=.3](O,3 cm) - \tkzDrawCircle[R,fill=blue!50,opacity=.3](A,1 cm) - \tkzDrawSegments[add = .5 and .5,color=red](D,D' E,E') - \tkzDrawSegments[add= 0 and 0.25,color=blue](J,F J,G) - \tkzDrawPoints(O,A,I,J,D,E,F,G,D',E',F',G') - \tkzLabelPoints[font=\scriptsize](O,A,I,J,D,E,F,G,D',E',F',G') + \tkzDrawPoints(A,...,D) \end{tikzpicture} \end{tkzexample} -\endinput - - +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointsSpc.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointsSpc.tex index f2bdf788ce..2949a6a262 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointsSpc.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointsSpc.tex @@ -1,33 +1,323 @@ -\section{Special points relating to a triangle} +Now that the fixed points are defined, we can with their references using macros from the package or macros that you will create get new points. The calculations may not be apparent but they are usually done by the package. +Vous aurez peut-être besoin d'utiliser certains constantes mathématiques, voici la liste des constantes définies par le package. -\subsection{Triangle center: \tkzcname{tkzDefTriangleCenter}} +\section{Auxiliary tools} +\subsection{Constants} -This macro allows you to define the center of a triangle. +\tkzname{\tkznameofpack} knows some constants, here is the list: +\begin{tkzltxexample}[] + \def\tkzPhi{1.618034} + \def\tkzInvPhi{0.618034} + \def\tkzSqrtPhi{1.27202} + \def\tkzSqrTwo{1.414213} + \def\tkzSqrThree{1.7320508} + \def\tkzSqrFive{2.2360679} + \def\tkzSqrTwobyTwo{0.7071065} + \def\tkzPi{3.1415926} + \def\tkzEuler{2.71828182} +\end{tkzltxexample} +\subsection{New point by calculation } -\begin{NewMacroBox}{tkzDefTriangleCenter}{\oarg{local options}\parg{A,B,C}}% -\tkzHandBomb\ Be careful, the arguments are lists of three points. This macro is used in conjunction with \tkzcname{tkzGetPoint} to get the center you are looking for. You can use \tkzname{tkzPointResult} if it is not necessary to keep the results. +When a macro of \tkzname{tkznameofpack} creates a new point, it is stored internally with the reference \tkzname{tkzPointResult}. You can assign your own reference to it. This is done with the macro \tkzcname{tkzGetPoint}. A new reference is created, your choice of reference must be placed between braces. -\medskip +\begin{NewMacroBox}{tkzGetPoint}{\marg{ref}}% +If the result is in \tkzname{tkzPointResult}, you can access it with \tkzcname{tkzGetPoint}. + + \medskip +\begin{tabular}{lll}% +\toprule +arguments & default & example \\ +\midrule +\TAline{ref}{no default}{ \tkzcname{tkzGetPoint\{M\} } see the next example} +\end{tabular} +\end{NewMacroBox} + +Sometimes you need to get two points. It's possible with + +\begin{NewMacroBox}{tkzGetPoints}{\marg{ref1}\marg{ref2}}% +The result is in \tkzname{tkzPointFirstResult} and \tkzname{tkzPointSecondResult}. + + \medskip +\begin{tabular}{lll}% +\toprule +arguments & default & example \\ +\midrule +\TAline{\{ref1,ref2\}}{no default}{ \tkzcname{tkzGetPoints\{M,N\} } It's the case with \tkzcname{tkzInterCC}} +\end{tabular} +\end{NewMacroBox} + +If you need only the first or the second point you can also use : + +\begin{NewMacroBox}{tkzGetFirstPoint}{\marg{ref1}}% + + \medskip \begin{tabular}{lll}% \toprule +arguments & default & example \\ +\midrule +\TAline{ref1}{no default}{ \tkzcname{tkzGetFirstPoint\{M\} }} +\end{tabular} +\end{NewMacroBox} + +\begin{NewMacroBox}{tkzGetSecondPoint}{\marg{ref2}}% + + \medskip +\begin{tabular}{lll}% +\toprule +arguments & default & example \\ +\midrule +\TAline{ref2}{no default}{ \tkzcname{tkzGetSecondPoint\{M\} }} +\end{tabular} +\end{NewMacroBox} + +Parfois les résultats consistent en un point et une dimension. Vous obtenez le point avec \tkzcname{tkzGetPoint} et la dimension avec \tkzcname{tkzGetLength}. + +\begin{NewMacroBox}{tkzGetLength}{\marg{name of a macro}}% + + \medskip +\begin{tabular}{lll}% +\toprule +arguments & default & example \\ +\midrule +\TAline{name of a macro}{no default}{ \tkzcname{tkzGetLength\{rAB\} \tkzcname{rAB} gives the length in cm}} +\end{tabular} +\end{NewMacroBox} + +%\tkzcname{tkzCalcLength}(A,B) After \tkzcname{tkzGetLength\{dAB\}} \tkzcname{dAB} gives $AB$ in cm} + + +\section{Special points} +Here are some special points. +%<---------------------------------------------------------------------------> +\subsection{Middle of a segment \tkzcname{tkzDefMidPoint}} +It is a question of determining the middle of a segment. + +\begin{NewMacroBox}{tkzDefMidPoint}{\parg{pt1,pt2}}% +The result is in \tkzname{tkzPointResult}. We can access it with \tkzcname{tkzGetPoint}. + + \medskip +\begin{tabular}{lll}% +\toprule +arguments & default & definition \\ +\midrule +\TAline{(pt1,pt2)}{no default}{pt1 and pt2 are two points} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Use of \tkzcname{tkzDefMidPoint}} +Review the use of \tkzcname{tkzDefPoint}. +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=1] + \tkzDefPoint(2,3){A} + \tkzDefPoint(6,2){B} + \tkzDefMidPoint(A,B) + \tkzGetPoint{M} + \tkzDrawSegment(A,B) + \tkzDrawPoints(A,B,M) + \tkzLabelPoints[below](A,B,M) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Barycentric coordinates } + +$pt_1$, $pt_2$, \dots, $pt_n$ being $n$ points, they define $n$ vectors $\overrightarrow{v_1}$, $\overrightarrow{v_2}$, \dots, $\overrightarrow{v_n}$ with the origin of the referential as the common endpoint. $\alpha_1$, $\alpha_2$, +\dots $\alpha_n$ are $n$ numbers, the vector obtained by: +\begin{align*} + \frac{\alpha_1 \overrightarrow{v_1} + \alpha_2 \overrightarrow{v_2} + \cdots + \alpha_n \overrightarrow{v_n}}{\alpha_1 + + \alpha_2 + \cdots + \alpha_n} +\end{align*} +defines a single point. + +\begin{NewMacroBox}{tkzDefBarycentricPoint}{\parg{pt1=$\alpha_1$,pt2=$\alpha_2$,\dots}}% +\begin{tabular}{lll}% arguments & default & definition \\ +\midrule +\TAline{(pt1=$\alpha_1$,pt2=$\alpha_2$,\dots)}{no default}{Each point has a assigned weight} +\bottomrule +\end{tabular} + +\medskip +You need at least two points. Result in \tkzname{tkzPointResult}. +\end{NewMacroBox} + + +\subsubsection{Using \tkzcname{tkzDefBarycentricPoint} with two points} +In the following example, we obtain the barycentre of points $A$ and $B$ with coefficients $1$ and $2$, in other words: +\[ + \overrightarrow{AI}= \frac{2}{3}\overrightarrow{AB} +\] + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoint(2,3){A} + \tkzDefShiftPointCoord[2,3](30:4){B} + \tkzDefBarycentricPoint(A=1,B=2) + \tkzGetPoint{G} + \tkzDrawLine(A,B) + \tkzDrawPoints(A,B,G) + \tkzLabelPoints(A,B,G) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Using \tkzcname{tkzDefBarycentricPoint} with three points} +This time $M$ is simply the center of gravity of the triangle. + + For reasons of simplification and homogeneity, there is also \tkzcname{tkzCentroid}. +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.8] + \tkzDefPoints{2/1/A,5/3/B,0/6/C} + \tkzDefBarycentricPoint(A=1,B=1,C=1) + \tkzGetPoint{G} + \tkzDefMidPoint(A,B) \tkzGetPoint{C'} + \tkzDefMidPoint(A,C) \tkzGetPoint{B'} + \tkzDefMidPoint(C,B) \tkzGetPoint{A'} + \tkzDrawPolygon(A,B,C) + \tkzDrawLines[add=0 and 1,new](A,G B,G C,G) + \tkzLabelPoint(G){$G$} + \tkzDrawPoints[new](A',B',C',G) + \tkzDrawPoints(A,B,C) + \tkzAutoLabelPoints[center=G](A,B,C) + \tkzAutoLabelPoints[center=G,above right](A',B',C') +\end{tikzpicture} +\end{tkzexample} + +\subsection{Golden ration} +From Wikipedia : In mathematics, two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Expressed algebraically, for quantities $a$, $b$ $a > b > 0$ $a+b$ is to $a$ as $a$ is to $b$. + +$ \frac{a+b}{a} = \frac{a}{b} = \phi = \frac{1 + \sqrt{5}}{2}$ + + +One of the two solutions to the equation $x^2 - x - 1 = 0$ +is the golden ratio $\phi$, $\phi = \frac{1 + \sqrt{5}}{2}$. + +\begin{NewMacroBox}{tkzDefGoldenRatio}{\parg{pt1,pt2}}% +\begin{tabular}{lll}% +arguments & default & example \\ +\midrule +\TAline{(pt1,pt2)}{no default}{\tkzcname{tkzDefGoldenRatio(A,C)} \tkzcname{tkzGetPoint}\{B\}} +\bottomrule +\end{tabular} + +\medskip +$AB=a$, $BC=b$ and $\frac{AC}{AB} = \frac{AB}{BC} =\phi$ +\end{NewMacroBox} + +\subsection{Use the golden ratio to divide a line segment} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,6/0/C} + \tkzDefMidPoint(A,C) \tkzGetPoint{I} + %\tkzDefPointWith[linear,K=\tkzInvPhi](A,C) + \tkzDefGoldenRatio(A,C) \tkzGetPoint{B} + \tkzDrawSegments(A,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B,C) +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Internal Similitude Center} +The centres of the two homotheties in which two circles correspond are called external and internal centres of similitude. + +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[rotate=30] + \tkzDefPoints{0/0/O,4/-5/A} + \tkzDefPoints{3/0/x,5/-5/y} + \pgfmathsetmacro\R{3}\pgfmathsetmacro\r{1} + \tkzDefIntSimilitudeCenter[R](O,\R)(A,\r) \tkzGetPoint{I} + \tkzDefExtSimilitudeCenter[R](O,\R)(A,\r) \tkzGetPoint{J} + \tkzDefTangent[from with R= I](O,3) \tkzGetPoints{D}{E} + \tkzDefTangent[from with R= I](A,1) \tkzGetPoints{D'}{E'} + \tkzDefTangent[from with R= J](O,3) \tkzGetPoints{F}{G} + \tkzDefTangent[from with R= J](A,1) \tkzGetPoints{F'}{G'} + \tkzDrawCircles(O,x A,y) \tkzDrawCircles[R](O,3 A,1) + \tkzDrawSegments[add = .5 and .5,new](D,D' E,E') + \tkzDrawSegments[add= 0 and 0.25,new](J,F J,G) + \tkzDrawPoints(O,A,I,J,D,E,F,G,D',E',F',G') + \tkzLabelPoints[font=\scriptsize](O,A,I,J,D,E,F,G,D',E',F',G') +\end{tikzpicture} +\end{tkzexample} + +You can \tkzcname{tkzDefBarycentricPoint} to find a homothetic center + +|\tkzDefBarycentricPoint(O=\r,A=\R) \tkzGetPoint{I}| \\ +|\tkzDefBarycentricPoint(O={-\r},A=\R) \tkzGetPoint{J}| + +%<----------------------------------------------------------------------> +\subsection{ Equidistant points} +%<----------------------------------------------------------------------> +\subsubsection{\tkzcname{tkzDefEquiPoints}} +\begin{NewMacroBox}{tkzDefEquiPoints}{\oarg{local options}\parg{pt1,pt2}}% +\begin{tabular}{lll}% +arguments & default & definition \\ +\midrule +\TAline{(pt1,pt2)}{no default}{unordered list of two items} +\end{tabular} + +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{dist} {2 (cm)} {half the distance between the two points} +\TOline{from=pt} {no default} {reference point} +\TOline{show} {false} {if true displays compass traces} +\TOline{/compass/delta} {0} {compass trace size } +\end{tabular} +\end{NewMacroBox} + +This macro makes it possible to obtain two points on a straight line equidistant from a given point. +\subsubsection{Using \tkzcname{tkzDefEquiPoints} with options} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzSetUpCompass[color=purple,line width=1pt] + \tkzDefPoints{0/1/A,5/2/B,3/4/C} + \tkzDefEquiPoints[from=C,dist=1,show, + /tkzcompass/delta=20](A,B) + \tkzGetPoints{E}{H} + \tkzDrawLines[color=blue](C,E C,H A,B) + \tkzDrawPoints[color=blue](A,B,C) + \tkzDrawPoints[color=red](E,H) + \tkzLabelPoints(E,H) + \tkzLabelPoints[color=blue](A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\newpage +\section{Special points relating to a triangle} + +\subsection{Triangle center: \tkzcname{tkzDefTriangleCenter}} + +\begin{NewMacroBox}{tkzDefTriangleCenter}{\oarg{local options}\parg{A,B,C}}% +\tkzHandBomb\ This macro allows you to define the center of a triangle.. Be careful, the arguments are lists of three points. This macro is used in conjunction with \tkzcname{tkzGetPoint} to get the center you are looking for. + + You can use \tkzname{tkzPointResult} if it is not necessary to keep the results. + +\medskip +\begin{tabular}{lll}% +\toprule +arguments & default & example \\ \midrule -\TAline{(pt1,pt2,pt3)}{no default}{three points} +\TAline{(pt1,pt2,pt3)}{no default}{ \tkzcname{tkzDefTriangleCenter[ortho](B,C,A)}} \midrule options & default & definition \\ \midrule -\TOline{ortho} {circum}{intersection of the altitudes of a triangle} -\TOline{centroid} {circum}{centre of gravity. Intersection of the medians } +\TOline{ortho} {circum}{intersection of the altitudes} +\TOline{orthic} {circum}{\dots} +\TOline{centroid} {circum}{intersection of the medians} +\TOline{median} {circum}{ \dots } \TOline{circum}{circum}{circle center circumscribed} \TOline{in} {circum}{center of the circle inscribed in a triangle } +\TOline{in} {circum}{intersection of the bisectors} \TOline{ex} {circum}{center of a circle exinscribed to a triangle } \TOline{euler}{circum}{center of Euler's circle } -\TOline{symmedian} {circum}{Lemoine's point or symmedian centre or Grebe's point } -\TOline{spieker} {circum}{Spieker Circle Center} +\TOline{gergonne}{circum}{defined with the Contact triangle} +\TOline{symmedian} {circum}{Lemoine's point or symmedian center or Grebe's point } +\TOline{lemoine} {circum}{ \dots} +\TOline{grebe} {circum}{ \dots} +\TOline{spieker} {circum}{Spieker circle center} \TOline{nagel}{circum}{Nagel Center} -\TOline{mittenpunkt} {circum}{also called the middlespoint} +\TOline{mittenpunkt} {circum}{Or middlespoint} \TOline{feuerbach}{circum}{Feuerbach Point} \end{tabular} @@ -36,35 +326,33 @@ options & default & definition \\ \subsubsection{Option \tkzname{ortho} or \tkzname{orthic}} The intersection $H$ of the three altitudes of a triangle is called the orthocenter. -\begin{tkzexample}[latex=5cm,small] +\begin{tkzexample}[latex=6cm,small] \begin{tikzpicture} \tkzDefPoint(0,0){A} \tkzDefPoint(5,1){B} \tkzDefPoint(1,4){C} - \tkzClipPolygon(A,B,C) \tkzDefTriangleCenter[ortho](B,C,A) - \tkzGetPoint{H} + \tkzGetPoint{H} \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c} - \tkzDrawPolygon[color=blue](A,B,C) + \tkzDrawPolygon(A,B,C) + \tkzDrawSegments[new](A,Ha B,Hb C,Hc) \tkzDrawPoints(A,B,C,H) - \tkzDrawLines[add=0 and 1](A,Ha B,Hb C,Hc) \tkzLabelPoint(H){$H$} \tkzAutoLabelPoints[center=H](A,B,C) - \tkzMarkRightAngles(A,Ha,B B,Hb,C C,Hc,A) + \tkzMarkRightAngles(A,Ha,B B,Hb,C C,Hc,A) \end{tikzpicture} \end{tkzexample} \subsubsection{Option \tkzname{centroid}} -\begin{tkzexample}[latex=5cm,small] +\begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=.75] - \tkzDefPoints{-1/1/A,5/1/B} - \tkzDefEquilateral(A,B) - \tkzGetPoint{C} + \tkzDefPoints{0/0/A,5/0/B,1/4/C} \tkzDefTriangleCenter[centroid](A,B,C) - \tkzGetPoint{G} - \tkzDrawPolygon[color=brown](A,B,C) + \tkzGetPoint{G} + \tkzDrawPolygon(A,B,C) + \tkzDrawLines[add = 0 and 2/3,new](A,G B,G C,G) \tkzDrawPoints(A,B,C,G) - \tkzDrawLines[add = 0 and 2/3](A,G B,G C,G) + \tkzLabelPoint(G){$G$} \end{tikzpicture} \end{tkzexample} @@ -73,97 +361,92 @@ options & default & definition \\ \begin{tikzpicture} \tkzDefPoints{0/1/A,3/2/B,1/4/C} \tkzDefTriangleCenter[circum](A,B,C) - \tkzGetPoint{G} - \tkzDrawPolygon[color=brown](A,B,C) - \tkzDrawCircle(G,A) - \tkzDrawPoints(A,B,C,G) - \end{tikzpicture} + \tkzGetPoint{O} + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle(O,A) + \tkzDrawPoints(A,B,C,O) + \tkzLabelPoint(O){$O$} +\end{tikzpicture} \end{tkzexample} \subsubsection{Option \tkzname{in}} In geometry, the incircle or inscribed circle of a triangle is the largest circle contained in the triangle; it touches (is tangent to) the three sides. The center of the incircle is a triangle center called the triangle's incenter. -The center of the incircle, called the incenter, can be found as the intersection of the three internal angle bisectors. The center of an excircle is the intersection of the internal bisector of one angle (at vertex $A$, for example) and the external bisectors of the other two. The center of this excircle is called the excenter relative to the vertex $A$, or the excenter of $A$. Because the internal bisector of an angle is perpendicular to its external bisector, it follows that the center of the incircle together with the three excircle centers form an orthocentric system.(\url{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle}) +The center of the incircle, called the incenter, can be found as the intersection of the three internal angle bisectors. The center of an excircle is the intersection of the internal bisector of one angle (at vertex $A$, for example) and the external bisectors of the other two. The center of this excircle is called the excenter relative to the vertex $A$, or the excenter of $A$. Because the internal bisector of an angle is perpendicular to its external bisector, it follows that the center of the incircle together with the three excircle centers form an orthocentric system.\\ +(\url{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle}) \medskip We get the centre of the inscribed circle of the triangle. The result is of course in \tkzname{tkzPointResult}. We can retrieve it with \tkzcname{tkzGetPoint}. -\begin{tkzexample}[latex=6cm,small] +\begin{tkzexample}[latex=8cm,small] \begin{tikzpicture} - \tkzDefPoints{0/1/A,3/2/B,1/4/C} - \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I} - \tkzDefPointBy[projection=onto A--C](I) - \tkzGetPoint{Ib} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPoints(A,B,C,I) - \tkzDrawLines[add = 0 and 2/3](A,I B,I C,I) - \tkzDrawCircle(I,Ib) +\tkzDefPoints{0/0/A,6/0/B,0.8/4/C} +\tkzDefTriangleCenter[in](A,B,C) + \tkzGetPoint{I} +\tkzDrawLines(A,B B,C C,A) +\tkzDrawCircle[in](A,B,C) +\tkzDrawPoint[red](I) +\tkzDrawPoints(A,B,C) +\tkzLabelPoint(I){$I$} \end{tikzpicture} \end{tkzexample} \subsubsection{Option \tkzname{ex}} -An excircle or escribed circle of the triangle is a circle lying outside the triangle, tangent to one of its sides and tangent to the extensions of the other two. Every triangle has three distinct excircles, each tangent to one of the triangle's sides. +An excircle or escribed circle of the triangle is a circle lying outside the triangle, tangent to one of its sides and tangent to the extensions of the other two. Every triangle has three distinct excircles, each tangent to one of the triangle's sides.\\ (\url{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle}) We get the centre of an inscribed circle of the triangle. The result is of course in \tkzname{tkzPointResult}. We can retrieve it with \tkzcname{tkzGetPoint}. -\begin{tkzexample}[latex=8cm,small] - \begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/1/A,3/2/B,1/4/C} - \tkzDefTriangleCenter[ex](B,C,A) - \tkzGetPoint{J_c} - \tkzDefPointBy[projection=onto A--B](J_c) - \tkzGetPoint{Tc} - %or - % \tkzDefCircle[ex](B,C,A) - % \tkzGetFirstPoint{J_c} - % \tkzGetSecondPoint{Tc} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPoints(A,B,C,J_c) - \tkzDrawCircle[red](J_c,Tc) - \tkzDrawLines[add=1.5 and 0](A,C B,C) - \tkzLabelPoints(J_c) - \end{tikzpicture} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoints{0/1/A,3/2/B,1/4/C} + \tkzDefTriangleCenter[ex](B,C,A) + \tkzGetPoint{J_c} + \tkzDefPointBy[projection=onto A--B](J_c) + \tkzGetPoint{Tc} + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle[new](J_c,Tc) + \tkzDrawLines[add=1.5 and 0](A,C B,C) + \tkzDrawPoints(A,B,C,J_c) + \tkzLabelPoints(J_c) +\end{tikzpicture} \end{tkzexample} \subsubsection{Option \tkzname{euler}} -This macro allows to obtain the center of the circle of the nine points or euler's circle or Feuerbach's circle. -The nine-point circle, also called Euler's circle or the Feuerbach circle, is the circle that passes through the perpendicular feet $H_A$, $H_B$, and $H_C$ dropped from the vertices of any reference triangle $ABC$ on the sides opposite them. Euler showed in 1765 that it also passes through the midpoints $M_A$, $M_B$, $M_C$ of the sides of $ABC$. By Feuerbach's theorem, the nine-point circle also passes through the midpoints $E_A$, $E_B$, and $E_C$ of the segments that join the vertices and the orthocenter $H$. These points are commonly referred to as the Euler points. (\url{http://mathworld.wolfram.com/Nine-PointCircle.html}) +This macro allows to obtain the center of the circle of the nine points or euler's circle or Feuerbach's circle. The nine-point circle, also called Euler's circle or the Feuerbach circle, is the circle that passes through the perpendicular feet $H_A$, $H_B$, and $H_C$ dropped from the vertices of any reference triangle $ABC$ on the sides opposite them. Euler showed in 1765 that it also passes through the midpoints $M_A$, $M_B$, $M_C$ of the sides of $ABC$. By Feuerbach's theorem, the nine-point circle also passes through the midpoints $E_A$, $E_B$, and $E_C$ of the segments that join the vertices and the orthocenter $H$. These points are commonly referred to as the Euler points.\\ (\url{https://mathworld.wolfram.com/Nine-PointCircle.html}) -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1] +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture}[scale=1,rotate=90] \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefSpcTriangle[medial, - name=M](A,B,C){_A,_B,_C} - \tkzDefTriangleCenter[euler](A,B,C) - \tkzGetPoint{N} % I= N nine points - \tkzDefTriangleCenter[ortho](A,B,C) - \tkzGetPoint{H} + \tkzDefSpcTriangle[medial,name=M](A,B,C){_A,_B,_C} + \tkzDefTriangleCenter[euler](A,B,C)\tkzGetPoint{N} + % I= N nine points + \tkzDefTriangleCenter[ortho](A,B,C)\tkzGetPoint{H} \tkzDefMidPoint(A,H) \tkzGetPoint{E_A} \tkzDefMidPoint(C,H) \tkzGetPoint{E_C} \tkzDefMidPoint(B,H) \tkzGetPoint{E_B} \tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawCircle(N,E_A) - \tkzDrawSegments[blue](A,H_A B,H_B C,H_C) + \tkzDrawPolygon(A,B,C) + \tkzDrawCircle[new](N,E_A) + \tkzDrawSegments[new](A,H_A B,H_B C,H_C) \tkzDrawPoints(A,B,C,N,H) - \tkzDrawPoints[red](M_A,M_B,M_C) - \tkzDrawPoints[blue]( H_A,H_B,H_C) + \tkzDrawPoints[new](M_A,M_B,M_C) + \tkzDrawPoints( H_A,H_B,H_C) \tkzDrawPoints[green](E_A,E_B,E_C) \tkzAutoLabelPoints[center=N, - font=\scriptsize](A,B,C,% - M_A,M_B,M_C,% - H_A,H_B,H_C,% - E_A,E_B,E_C) + font=\scriptsize](A,B,C,M_A,M_B,M_C,H_A,H_B,H_C,E_A,E_B,E_C) \tkzLabelPoints[font=\scriptsize](H,N) \tkzMarkSegments[mark=s|,size=3pt, - color=blue,line width=1pt](B,E_B E_B,H) + color=blue,line width=1pt](B,E_B E_B,H) \end{tikzpicture} \end{tkzexample} \subsubsection{Option \tkzname{symmedian}} +The point of concurrence $K$ of the symmedians, sometimes also called the Lemoine point (in England and France) or the Grebe point (in Germany).\\ +\href{https://mathworld.wolfram.com/SymmedianPoint.html}{Weisstein, Eric W. "Symmedian Point." From MathWorld--A Wolfram Web Resource.} + \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture} \tkzDefPoint(0,0){A} @@ -174,39 +457,83 @@ The nine-point circle, also called Euler's circle or the Feuerbach circle, is th \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I} \tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c} \tkzDefSpcTriangle[incentral,name=I](A,B,C){a,b,c} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawLines[add = 0 and 2/3,blue](A,K B,K C,K) - \tkzDrawSegments[red,dashed](A,Ma B,Mb C,Mc) - \tkzDrawSegments[orange,dashed](A,Ia B,Ib C,Ic) + \tkzDrawPolygon(A,B,C) + \tkzDrawLines[add = 0 and 2/3,new](A,K B,K C,K) + \tkzDrawSegments[color=cyan](A,Ma B,Mb C,Mc) + \tkzDrawSegments[color=green](A,Ia B,Ib C,Ic) \tkzDrawLine[add=2 and 2](G,I) \tkzDrawPoints(A,B,C,K,G,I) + \tkzLabelPoints[font=\scriptsize](A,B,K,G,I) + \tkzLabelPoints[above,font=\scriptsize](C) \end{tikzpicture} \end{tkzexample} +\subsubsection{Option \tkzname{spieker}} +The Spieker center is the center $Sp$ of the Spieker circle, i.e., the incenter of the medial triangle of a reference triangle.\\ +\href{https://mathworld.wolfram.com/SpiekerCenter.html}{Weisstein, Eric W. "Spieker Center." From MathWorld--A Wolfram Web Resource. } -\subsubsection{Option \tkzname{nagel}} -Let $Ta$ be the point at which the excircle with center $Ja$ meets the side $BC$ of a triangle $ABC$, and define $Tb$ and $Tc$ similarly. Then the lines $ATa$, $BTb$, and $CTc$ concur in the Nagel point $Na$. -\href{http://mathworld.wolfram.com/NagelPoint.html}{Weisstein, Eric W. "Nagel point." From MathWorld--A Wolfram Web Resource. } +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,6/0/B,5/5/C} + \tkzDefSpcTriangle[medial](A,B,C){Ma,Mb,Mc} + \tkzDefTriangleCenter[centroid](A,B,C) + \tkzGetPoint{G} + \tkzDefTriangleCenter[spieker](A,B,C) + \tkzGetPoint{Sp} + \tkzDrawPolygon[](A,B,C) + \tkzDrawPolygon[new](Ma,Mb,Mc) + \tkzDrawCircle[in](Ma,Mb,Mc) + \tkzDrawPoints(B,C,A,Sp,Ma,Mb,Mc) + \tkzAutoLabelPoints[center=G,dist=.3](Ma,Mb,Mc) + \tkzLabelPoints[right](Sp) + \tkzAutoLabelPoints[center=G](A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Option \tkzname{gergonne}} +The Gergonne Point is the point of concurrency which results from connecting the vertices of a triangle to the opposite points of tangency of the triangle's incircle. +(Joseph Gergonne French mathematician ) \begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture} +\tkzDefPoints{0/0/B,3.6/0/C,2.8/4/A} +\tkzDefTriangleCenter[gergonne](A,B,C) +\tkzGetPoint{Ge} +\tkzDefSpcTriangle[intouch](A,B,C){C_1,C_2,C_3} +\tkzDrawCircle[in](A,B,C) +\tkzDrawLines[add=.25 and .25,teal](A,B A,C B,C) +\tkzDrawSegments[new](A,C_1 B,C_2 C,C_3) +\tkzDrawPoints(A,...,C,C_1,C_2,C_3) +\tkzDrawPoints[red](Ge) +\tkzLabelPoints(A,...,C,C_1,C_2,C_3,Ge) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Option \tkzname{nagel}} +Let $Ta$ be the point at which the excircle with center $Ja$ meets the side $BC$ of a triangle $ABC$, and define $Tb$ and $Tc$ similarly. Then the lines $ATa$, $BTb$, and $CTc$ concur in the Nagel point $Na$.\\ +\href{https://mathworld.wolfram.com/NagelPoint.html}{Weisstein, Eric W. "Nagel point." From MathWorld--A Wolfram Web Resource. } + + +\begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=.5] \tkzDefPoints{0/0/A,6/0/B,4/6/C} \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc} \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc} - \tkzDrawPoints(Ja,Jb,Jc,Ta,Tb,Tc) - \tkzLabelPoints(Ja,Jb,Jc,Ta,Tb,Tc) + \tkzDefTriangleCenter[nagel](A,B,C) + \tkzGetPoint{Na} \tkzDrawPolygon[blue](A,B,C) - \tkzDefTriangleCenter[nagel](A,B,C) \tkzGetPoint{Na} - \tkzDrawPoints[blue](B,C,A) - \tkzDrawPoints[red](Na) - \tkzLabelPoints[blue](B,C,A) - \tkzLabelPoints[red](Na) \tkzDrawLines[add=0 and 1](A,Ta B,Tb C,Tc) - \tkzShowBB\tkzClipBB + \tkzDrawPoints[new](Ja,Jb,Jc,Ta,Tb,Tc) + \tkzClipBB \tkzDrawLines[add=1 and 1,dashed](A,B B,C C,A) - \tkzDrawCircles[ex,gray](A,B,C C,A,B B,C,A) - \tkzDrawSegments[dashed](Ja,Ta Jb,Tb Jc,Tc) + \tkzDrawCircles[ex,new](A,B,C C,A,B B,C,A) + \tkzDrawSegments[new,dashed](Ja,Ta Jb,Tb Jc,Tc) + \tkzDrawPoints(B,C,A) + \tkzDrawPoints[new](Na) + \tkzLabelPoints(B,C,A) + \tkzLabelPoints[new](Na) + \tkzLabelPoints[new](Ja,Jb,Jc,Ta,Tb,Tc) \tkzMarkRightAngles[fill=gray!20](Ja,Ta,C Jb,Tb,A Jc,Tc,B) \end{tikzpicture} @@ -214,6 +541,11 @@ Let $Ta$ be the point at which the excircle with center $Ja$ meets the side $BC$ \subsubsection{Option \tkzname{mittenpunkt}} + +The mittenpunkt (also called the middlespoint) of a triangle $ABC$ is the symmedian point of the excentral triangle, i.e., the point of concurrence M of the lines from the excenters through the corresponding triangle side midpoints.\\ +\href{https://mathworld.wolfram.com/Mittenpunkt.html}{Weisstein, Eric W. "Mittenpunkt." From MathWorld--A Wolfram Web Resource.} + + \begin{tkzexample}[latex=8cm,small] \begin{tikzpicture}[scale=.5] \tkzDefPoints{0/0/A,6/0/B,4/6/C} @@ -222,123 +554,141 @@ Let $Ta$ be the point at which the excircle with center $Ja$ meets the side $BC$ \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc} \tkzDefTriangleCenter[mittenpunkt](A,B,C) \tkzGetPoint{Mi} - \tkzDrawPoints(Ma,Mb,Mc,Ja,Jb,Jc) + \tkzDrawPoints[new](Ma,Mb,Mc,Ja,Jb,Jc) \tkzClipBB \tkzDrawPolygon[blue](A,B,C) \tkzDrawLines[add=0 and 1](Ja,Ma Jb,Mb Jc,Mc) \tkzDrawLines[add=1 and 1](A,B A,C B,C) - \tkzDrawCircles[gray](Ja,Ta Jb,Tb Jc,Tc) - \tkzDrawPoints[blue](B,C,A) - \tkzDrawPoints[red](Mi) - \tkzLabelPoints[red](Mi) + \tkzDrawCircles[new](Ja,Ta Jb,Tb Jc,Tc) + \tkzDrawPoints(B,C,A) + \tkzDrawPoints[new](Mi) + \tkzLabelPoints(Mi) \tkzLabelPoints[left](Mb) - \tkzLabelPoints(Ma,Mc,Jb,Jc) + \tkzLabelPoints[new](Ma,Mc,Jb,Jc) \tkzLabelPoints[above left](Ja,Jc) - \tkzShowBB \end{tikzpicture} \end{tkzexample} -%<----------------------------------------------------------------------> -%<----------------------------------------------------------------------> -\section{Draw a point} -\subsubsection{Drawing points \tkzcname{tkzDrawPoint}} \hypertarget{tdrp}{} - -\begin{NewMacroBox}{tkzDrawPoint}{\oarg{local options}\parg{name}}% -\begin{tabular}{lll}% -arguments & default & definition \\ -\midrule -\TAline{name of point} {no default} {Only one point name is accepted} -\bottomrule -\end{tabular} -\medskip -The argument is required. The disc takes the color of the circle, but lighter. It is possible to change everything. The point is a node and therefore it is invariant if the drawing is modified by scaling. +\subsubsection{Example : relation between \tkzname{gergonne}, \tkzname{centroid} and \tkzname{mittenpunkt}} -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{shape} {circle}{Possible \tkzname{cross} or \tkzname{cross out}} -\TOline{size} {6}{$6 \times$ \tkzcname{pgflinewidth}} -\TOline{color} {black}{the default color can be changed } -\bottomrule -\end{tabular} +The Gergonne point $Ge$, triangle centroid $G$, and mittenpunkt $M$ are collinear, with GeG/GM=2. -\medskip -{We can create other forms such as \tkzname{cross}} -\end{NewMacroBox} - -\subsubsection{Example of point drawings} -Note that \tkzname{scale} does not affect the shape of the dots. Which is normal. Most of the time, we are satisfied with a single point shape that we can define from the beginning, either with a macro or by modifying a configuration file. - - -\begin{tkzexample}[latex=5cm,small] - \begin{tikzpicture}[scale=.5] - \tkzDefPoint(1,3){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(0,0){O} - \tkzDrawPoint[color=red](A) - \tkzDrawPoint[fill=blue!20,draw=blue](B) - \tkzDrawPoint[color=green](O) - \end{tikzpicture} +\begin{tkzexample}[vbox,small] +\begin{tikzpicture} +\tkzDefPoints{0/0/A,2/2/B,8/0/C} +\tkzDefTriangleCenter[gergonne](A,B,C) \tkzGetPoint{Ge} +\tkzDefTriangleCenter[centroid](A,B,C) +\tkzGetPoint{G} +\tkzDefTriangleCenter[mittenpunkt](A,B,C) +\tkzGetPoint{M} +\tkzDrawLines[add=.25 and .25,teal](A,B A,C B,C) +\tkzDrawLines[add=.25 and .25,new](Ge,M) +\tkzDrawPoints(A,...,C) +\tkzDrawPoints[red,size=2](G,M,Ge) +\tkzLabelPoints(A,...,C,M,G,Ge) +\tkzMarkSegment[mark=s||](Ge,G) +\tkzMarkSegment[mark=s|](G,M) +\end{tikzpicture} \end{tkzexample} -It is possible to draw several points at once but this macro is a little slower than the previous one. Moreover, we have to make do with the same options for all the points. +\newpage +\section{Projection of excenters} + +\begin{NewMacroBox}{tkzDefProjExcenter}{\oarg{local options}\parg{A,B,C}\parg{a,b,c}\marg{X,Y,Z}}% +Each excenter has three projections on the sides of the triangle ABC. We can do this with one macro\\ \tkzcname{tkzDefProjExcenter[name=J](A,B,C)(a,b,c)\{Y,Z,X\}}. -\hypertarget{tdrps}{} -\begin{NewMacroBox}{tkzDrawPoints}{\oarg{local options}\parg{liste}}% +\medskip \begin{tabular}{lll}% -arguments & default & definition \\ +\toprule +options & default & definition \\ \midrule -\TAline{points list}{no default}{example \tkzcname{tkzDrawPoints(A,B,C)}} +\TOline{name} {no defaut}{used to name the vertices} \bottomrule \end{tabular} -\medskip \begin{tabular}{lll}% -options & default & definition \\ +arguments & default & definition \\ \midrule -\TOline{shape} {circle}{Possible \tkzname{cross} or \tkzname{cross out}} -\TOline{size} {6}{$6 \times$ \tkzcname{pgflinewidth}} -\TOline{color} {black}{the default color can be changed } +\TAline{(pt1=$\alpha_1$,pt2=$\alpha_2$,\dots)}{no default}{Each point has a assigned weight} \bottomrule \end{tabular} \medskip -\tkzHandBomb\ Beware of the final "s", an oversight leads to cascading errors if you try to draw multiple points. The options are the same as for the previous macro. \end{NewMacroBox} -\subsubsection{First example} +\subsubsection{Excircles} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoint(1,3){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(0,0){C} - \tkzDrawPoints[size=6,color=red, - fill=red!50](A,B,C) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Second example} - -\begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=.5] - \tkzDefPoint(2,3){A} \tkzDefPoint(5,-1){B} - \tkzDefPoint[label=below:$\mathcal{C}$, - shift={(2,3)}](-30:5.5){E} - \begin{scope}[shift=(A)] - \tkzDefPoint(30:5){C} - \end{scope} - \tkzCalcLength[cm](A,B)\tkzGetLength{rAB} - \tkzDrawCircle[R](A,\rAB cm) - \tkzDrawSegment(A,B) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(B,C) - \tkzLabelPoints[above](A) -\end{tikzpicture} +\tkzDefPoints{0/0/A,5/0/B,0.8/4/C} +\tkzDefSpcTriangle[excentral,name=J](A,B,C){a,b,c} +\tkzDefSpcTriangle[intouch,name=I](A,B,C){a,b,c} +\tkzDefProjExcenter[name=J](A,B,C)(a,b,c){X,Y,Z} + +\tkzDefCircle[in](A,B,C) \tkzGetPoint{I} \tkzGetSecondPoint{T} +\tkzDrawCircles[red](Ja,Xa Jb,Yb Jc,Zc) +\tkzDrawCircle(I,T) +\tkzDrawPolygon[dashed,color=blue](Ja,Jb,Jc) +\tkzDrawLines[add=2 and 2,line width=1pt](A,C A,B B,C) +\tkzDrawSegments(Ja,Xa Ja,Ya Ja,Za + Jb,Xb Jb,Yb Jb,Zb + Jc,Xc Jc,Yc Jc,Zc + I,Ia I,Ib I,Ic) +\tkzMarkRightAngles[size=.2,fill=gray!15](% + Ja,Za,B + Ja,Xa,B + Ja,Ya,C + Jb,Yb,C + Jb,Zb,B + Jb,Xb,C + Jc,Yc,A + Jc,Zc,B + Jc,Xc,C + I,Ia,B + I,Ib,C + I,Ic,A) +\tkzDrawSegments[blue](Jc,C Ja,A Jb,B) +\tkzLabelPoints(Xb,Yc,A,B,C,Xa,Xc,Ya,Yb,Ja,Jb,Jc,I) +\tkzLabelPoints[above right](Za,Zb,Zc) +\tkzLabelPoints[below](Ia,Ib,Ic) +\end{tikzpicture} + +\begin{tkzexample}[code only,small] + \begin{tikzpicture}[scale=.5] + \tkzDefPoints{0/0/A,5/0/B,0.8/4/C} + \tkzDefSpcTriangle[excentral,name=J](A,B,C){a,b,c} + \tkzDefSpcTriangle[intouch,name=I](A,B,C){a,b,c} + \tkzDefProjExcenter[name=J](A,B,C)(a,b,c){X,Y,Z} + + \tkzDefCircle[in](A,B,C) \tkzGetPoint{I} \tkzGetSecondPoint{T} + \tkzDrawCircles[red](Ja,Xa Jb,Yb Jc,Zc) + \tkzDrawCircle(I,T) + \tkzDrawPolygon[dashed,color=blue](Ja,Jb,Jc) + \tkzDrawLines[add=2 and 2,line width=1pt](A,C A,B B,C) + \tkzDrawSegments(Ja,Xa Ja,Ya Ja,Za + Jb,Xb Jb,Yb Jb,Zb + Jc,Xc Jc,Yc Jc,Zc + I,Ia I,Ib I,Ic) + \tkzMarkRightAngles[size=.2,fill=gray!15](% + Ja,Za,B + Ja,Xa,B + Ja,Ya,C + Jb,Yb,C + Jb,Zb,B + Jb,Xb,C + Jc,Yc,A + Jc,Zc,B + Jc,Xc,C + I,Ia,B + I,Ib,C + I,Ic,A) + \tkzDrawSegments[blue](Jc,C Ja,A Jb,B) + \tkzLabelPoints(Xb,Yc,A,B,C,Xa,Xc,Ya,Yb,Ja,Jb,Jc,I) + \tkzLabelPoints[above right](Za,Zb,Zc) + \tkzLabelPoints[below](Ia,Ib,Ic) + \end{tikzpicture} \end{tkzexample} + \section{Point on line or circle} \subsection{Point on a line} @@ -363,13 +713,13 @@ options & default & definition \\ \begin{tkzexample}[latex=9cm,small] \begin{tikzpicture} \tkzDefPoints{0/0/A,4/0/B} - \tkzDrawLine[red](A,B) - \tkzDefPointOnLine[pos=1.2](A,B) + \tkzDefPointOnLine[pos=1.2](A,B) \tkzGetPoint{P} - \tkzDefPointOnLine[pos=-0.2](A,B) + \tkzDefPointOnLine[pos=-0.2](A,B) \tkzGetPoint{R} \tkzDefPointOnLine[pos=0.5](A,B) \tkzGetPoint{S} + \tkzDrawLine[new](A,B) \tkzDrawPoints(A,B,P) \tkzLabelPoints(A,B) \tkzLabelPoint[above](P){pos=$1.2$} @@ -394,20 +744,20 @@ options & default & definition \\ \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture} - \tkzDefPoints{0/0/A,4/0/B,0.8/3/C} - \tkzDefPointOnCircle[angle=90,center=B,radius=1 cm] - \tkzGetPoint{I} - \tkzDefCircle[circum](A,B,C) - \tkzGetPoint{G} \tkzGetLength{rG} - \tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt] - \tkzGetPoint{J} - \tkzDrawCircle[R,teal](B,1cm) - \tkzDrawPoint[teal](I) - \tkzDrawPoints(A,B,C) - \tkzDrawCircle(G,J) - \tkzDrawPoints(G,J) - \tkzDrawPoint[red](J) - \tkzLabelPoints(G,J) +\tkzDefPoints{0/0/A,4/0/B,0.8/3/C} +\tkzDefPointOnCircle[angle=90,center=B,radius=1] +\tkzGetPoint{I} +\tkzDefCircle[circum](A,B,C) +\tkzGetPoint{G} \tkzGetLength{rG} +\tkzDefPointOnCircle[angle=30,center=G,radius=\rG] +\tkzGetPoint{J} +\tkzDrawCircle[R,teal](B,1) +\tkzDrawPoint[teal](I) +\tkzDrawPoints(A,B,C) +\tkzDrawCircle(G,J) +\tkzDrawPoints(G,J) +\tkzDrawPoint[red](J) +\tkzLabelPoints(G,J) \end{tikzpicture} \end{tkzexample} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointwith.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointwith.tex index 8af1881003..b157cabef7 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointwith.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointwith.tex @@ -2,7 +2,9 @@ \subsection{\tkzcname{tkzDefPointWith}} There are several possibilities to create points that meet certain vector conditions. -This can be done with \tkzcname{tkzDefPointWith}. The general principle is as follows, two points are passed as arguments, i.e. a vector. The different options allow to obtain a new point forming with the first point (with some exceptions) a collinear vector or a vector orthogonal to the first vector. Then the length is either proportional to that of the first one, or proportional to the unit. Since this point is only used temporarily, it does not have to be named immediately. The result is in \tkzname{tkzPointResult}. The macro \tkzNameMacro{tkzGetPoint} allows you to retrieve the point and name it differently. +This can be done with + +\tkzcname{tkzDefPointWith}. The general principle is as follows, two points are passed as arguments, i.e. a vector. The different options allow to obtain a new point forming with the first point (with some exceptions) a collinear vector or a vector orthogonal to the first vector. Then the length is either proportional to that of the first one, or proportional to the unit. Since this point is only used temporarily, it does not have to be named immediately. The result is in \tkzname{tkzPointResult}. The macro \tkzNameMacro{tkzGetPoint} allows you to retrieve the point and name it differently. There are options to define the distance between the given point and the obtained point. In the general case this distance is the distance between the 2 points given as arguments if the option is of the "normed" type then the distance between the given point and the obtained point is 1 cm. Then the $K$ option allows to obtain multiples. @@ -38,47 +40,68 @@ options & example & explication \\ \end{tabular} \end{NewMacroBox} -\subsubsection{Option \tkzname{colinear at}} +\subsubsection{Option \tkzname{colinear at}, simple example} $(\overrightarrow{AB}=\overrightarrow{CD})$ \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] + vect/.style={->,shorten >=1pt,>=latex'}] \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} \tkzDefPoint(0,1){C} \tkzDefPointWith[colinear=at C](A,B) \tkzGetPoint{D} - \tkzDrawPoints[color=red](A,B,C,D) + \tkzDrawPoints[new](A,B,C,D) \tkzLabelPoints[above right=3pt](A,B,C,D) \tkzDrawSegments[vect](A,B C,D) \end{tikzpicture} \end{tkzexample} +\subsubsection{Option \tkzname{colinear at}, complex example} +\begin{tkzexample}[vbox,small] +\begin{tikzpicture}[scale=.75] +\tkzDefPoints{0/0/B,3.6/0/C,1.5/4/A} +\tkzDefSpcTriangle[ortho](A,B,C){Ha,Hb,Hc} +\tkzDefTriangleCenter[ortho](A,B,C) \tkzGetPoint{H} +\tkzDefSquare(A,C) \tkzGetPoints{R}{S} +\tkzDefSquare(B,A) \tkzGetPoints{M}{N} +\tkzDefSquare(C,B) \tkzGetPoints{P}{Q} +\tkzDefPointWith[colinear= at M](A,S) \tkzGetPoint{A'} +\tkzDefPointWith[colinear= at P](B,N) \tkzGetPoint{B'} +\tkzDefPointWith[colinear= at Q](C,R) \tkzGetPoint{C'} +\tkzDefPointBy[projection=onto P--Q](Ha) \tkzGetPoint{Pa} +\tkzDrawPolygon[teal,thick](A,C,R,S)\tkzDrawPolygon[teal,thick](A,B,N,M) +\tkzDrawPolygon[teal,thick](C,B,P,Q) +\tkzDrawPoints[teal,size=2](A,B,C,Ha,Hb,Hc,A',B',C') +\tkzDrawSegments[ultra thin,red](M,A' A',S P,B' B',N Q,C' C',R B,S C,M C,N B,R A,P A,Q) +\tkzDrawSegments[ultra thin,teal, dashed](A,Ha B,Hb C,Hc) +\tkzDefPointBy[rotation=center A angle 90](S) \tkzGetPoint{S'} +\tkzDrawSegments[ultra thin,teal,dashed](B,S' A,S' A,A' M,S' B',Q P,C' M,S Ha,Pa) +\tkzDrawArc(A,S)(S') +\end{tikzpicture} +\end{tkzexample} -\subsubsection{Option \tkzname{colinear at} with $K$} - +\subsubsection{Option \tkzname{colinear at}} +How to use $K$ \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[vect/.style={->, - shorten >=3pt,>=latex'}] - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPoint(1,2){C} + shorten >=1pt,>=latex'}] + \tkzDefPoints{0/0/A,5/0/B,1/2/C} \tkzDefPointWith[colinear=at C](A,B) \tkzGetPoint{G} - \tkzDefPointWith[colinear=at C,K=0.5](A,B) + \tkzDefPointWith[colinear=at C, K=0.5](A,B) \tkzGetPoint{H} \tkzLabelPoints(A,B,C,G,H) \tkzDrawPoints(A,B,C,G,H) - \tkzDrawSegments[vect](A,B C,H) + \tkzDrawSegments[vect](A,B C,H) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{colinear at} with $K=\frac{\sqrt{2}}{2}$} +\subsubsection{Option \tkzname{colinear at} } +With $K=\frac{\sqrt{2}}{2}$ + \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[vect/.style={->, - shorten >=3pt,>=latex'}] - \tkzDefPoint(1,1){A} - \tkzDefPoint(4,2){B} - \tkzDefPoint(2,2){CU} + shorten >=1pt,>=latex'}] + \tkzDefPoints{1/1/A,4/2/B,2/2/C} \tkzDefPointWith[colinear=at C,K=sqrt(2)/2](A,B) \tkzGetPoint{D} \tkzDrawPoints[color=red](A,B,C,D) @@ -90,9 +113,8 @@ options & example & explication \\ AB=AC since $K=1$. \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} - \tkzDefPoint(4,2){B} + vect/.style={->,shorten >=1pt,>=latex'}] + \tkzDefPoints{2/3/A,4/2/B} \tkzDefPointWith[orthogonal,K=1](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) @@ -105,14 +127,14 @@ AB=AC since $K=1$. -\subsubsection{Option \tkzname{orthogonal} with $K=-1$} +\subsubsection{Option \tkzname{orthogonal}} + With $K=-1$ OK=OI since $\lvert K \rvert=1$ then OI=OJ=OK. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=.75] - \tkzDefPoint(1,2){O} - \tkzDefPoint(2,5){I} - \tkzDefPointWith[orthogonal](O,I) + \tkzDefPoints{1/2/O,2/5/I} + \tkzDefPointWith[orthogonal](O,I) \tkzGetPoint{J} \tkzDefPointWith[orthogonal,K=-1](O,I) \tkzGetPoint{K} @@ -129,16 +151,16 @@ OK=OI since $\lvert K \rvert=1$ then OI=OJ=OK. \begin{tikzpicture}[scale=.75] \tkzDefPoints{0/0/A,6/0/B} \tkzDefMidPoint(A,B) - \tkzGetPoint{I} - \tkzDefPointWith[orthogonal,K=-.75](B,A) + \tkzGetPoint{I} + \tkzDefPointWith[orthogonal,K=-.75](B,A) \tkzGetPoint{C} \tkzInterLC(B,C)(B,I) - \tkzGetPoints{D}{F} + \tkzGetPoints{D}{F} \tkzDuplicateSegment(B,F)(A,F) \tkzGetPoint{E} \tkzDrawArc[delta=10](F,E)(B) \tkzInterLC(A,B)(A,E) - \tkzGetPoints{N}{M} + \tkzGetPoints{N}{M} \tkzDrawArc[delta=10](A,M)(E) \tkzDrawLines(A,B B,C A,F) \tkzCompass(B,F) @@ -150,26 +172,25 @@ OK=OI since $\lvert K \rvert=1$ then OI=OJ=OK. \subsubsection{Options \tkzname{colinear} and \tkzname{orthogonal}} \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,2){B} - \tkzDefPointWith[orthogonal,K=.5](A,B) - \tkzGetPoint{C} - \tkzDefPointWith[colinear=at C,K=.5](A,B) - \tkzGetPoint{D} - \tkzMarkRightAngle[fill=gray!20](B,A,C) - \tkzDrawSegments[vect](A,B A,C C,D) - \tkzDrawPoints(A,...,D) + vect/.style={->,shorten >=1pt,>=latex'}] + \tkzDefPoints{2/1/A,6/2/B} + \tkzDefPointWith[orthogonal,K=.5](A,B) + \tkzGetPoint{C} + \tkzDefPointWith[colinear=at C,K=.5](A,B) + \tkzGetPoint{D} + \tkzMarkRightAngle[fill=gray!20](B,A,C) + \tkzDrawSegments[vect](A,B A,C C,D) + \tkzDrawPoints(A,...,D) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{orthogonal normed}, $K=1$} -$AC=1$. +\subsubsection{Option \tkzname{orthogonal normed}} + $K=1$ $AC=1$. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} + vect/.style={->,shorten >=1pt,>=latex'}] + \tkzDefPoints{2/3/A,4/2/B} \tkzDefPointWith[orthogonal normed](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) @@ -178,36 +199,36 @@ $AC=1$. \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{orthogonal normed} and $K=2$} +\subsubsection{Option \tkzname{orthogonal normed} and K=2} $K=2$ therefore $AC=2$. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} \tkzDefPoint(5,1){B} - \tkzDefPointWith[orthogonal normed,K=2](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzDrawCircle[R](A,2cm) - \tkzDrawSegments[vect](A,B A,C) - \tkzMarkRightAngle[fill=gray!20](B,A,C) - \tkzLabelPoints[above=3pt](A,B,C) + vect/.style={->,shorten >=1pt,>=latex'}] + \tkzDefPoints{2/3/A,5/1/B} + \tkzDefPointWith[orthogonal normed,K=2](A,B) + \tkzGetPoint{C} + \tkzDrawPoints[color=red](A,B,C) + \tkzDrawCircle[R](A,2) + \tkzDrawSegments[vect](A,B A,C) + \tkzMarkRightAngle[fill=gray!20](B,A,C) + \tkzLabelPoints[above=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} \subsubsection{Option \tkzname{linear}} Here $K=0.5$. - + This amounts to applying a homothety or a multiplication of a vector by a real. Here is the middle of $[AB]$. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.2] - \tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B} - \tkzDefPointWith[linear,K=0.5](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzDrawSegment(A,B) - \tkzLabelPoints[above right=3pt](A,B,C) + \tkzDefPoints{1/3/A,4/2/B} + \tkzDefPointWith[linear,K=0.5](A,B) + \tkzGetPoint{C} + \tkzDrawPoints[color=red](A,B,C) + \tkzDrawSegment(A,B) + \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} @@ -216,7 +237,7 @@ In the following example $AC=1$ and $C$ belongs to $(AB)$. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1.2] - \tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B} + \tkzDefPoints{1/3/A,4/2/B} \tkzDefPointWith[linear normed](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) @@ -225,15 +246,10 @@ In the following example $AC=1$ and $C$ belongs to $(AB)$. \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} - - - %<--------------------------------------------------------------------------–> -% tkzGetVectxy +% tkzGetVectxy %<--------------------------------------------------------------------------–> - - -\subsection{\tkzcname{tkzGetVectxy} } +\subsection{\tkzcname{tkzGetVectxy} } Retrieving the coordinates of a vector. \begin{NewMacroBox}{tkzGetVectxy}{\parg{$A,B$}\var{text}}% @@ -254,9 +270,7 @@ arguments & example & explication \\ \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,1){A} - \tkzDefPoint(4,2){B} + \tkzDefPoints{0/0/O,1/1/A,4/2/B} \tkzGetVectxy(A,B){v} \tkzDefPoint(\vx,\vy){V} \tkzDrawSegment[->,color=red](O,V) @@ -265,7 +279,4 @@ arguments & example & explication \\ \tkzLabelPoints(A,B,O,V) \end{tikzpicture} \end{tkzexample} - - - -\endinput
\ No newline at end of file +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-polygons.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-polygons.tex index d63e31fdea..e27221a916 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-polygons.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-polygons.tex @@ -3,7 +3,7 @@ We have seen the definitions of some triangles. Let us look at the definitions of some quadrilaterals and regular polygons. \begin{NewMacroBox}{tkzDefSquare}{\parg{pt1,pt2}}% -The square is defined in the forward direction. From two points, two more points are obtained such that the four taken in order form a square. The square is defined in the forward direction. The results are in \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult}.\\ +The square is defined in the forward direction. From two points, two more points are obtained such that the four taken in order form a square. The square is defined in the forward direction. \\The results are in \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult}.\\ We can rename them with \tkzcname{tkzGetPoints}. \medskip @@ -22,15 +22,15 @@ Note the inversion of the first two points and the result. \begin{tikzpicture}[scale=.5] \tkzDefPoint(0,0){A} \tkzDefPoint(3,0){B} \tkzDefSquare(A,B) - \tkzDrawPolygon[color=red](A,B,tkzFirstPointResult,% + \tkzDrawPolygon[new](A,B,tkzFirstPointResult,% tkzSecondPointResult) \tkzDefSquare(B,A) - \tkzDrawPolygon[color=blue](B,A,tkzFirstPointResult,% + \tkzDrawPolygon(B,A,tkzFirstPointResult,% tkzSecondPointResult) \end{tikzpicture} \end{tkzexample} - We may only need one point to draw an isosceles right-angled triangle so we use \tkzcname{tkzGetFirstPoint} or \tkzcname{tkzGetSecondPoint}. + We may only need one point to draw an isosceles right-angled triangle so we use \\ \tkzcname{tkzGetFirstPoint} or \tkzcname{tkzGetSecondPoint}. \subsubsection{Use of \tkzcname{tkzDefSquare} to obtain an isosceles right-angled triangle} \begin{tkzexample}[latex=7cm,small] @@ -38,42 +38,64 @@ Note the inversion of the first two points and the result. \tkzDefPoint(0,0){A} \tkzDefPoint(3,0){B} \tkzDefSquare(A,B) \tkzGetFirstPoint{C} - \tkzDrawPolygon[color=blue,fill=blue!30](A,B,C) + \tkzDrawSegment(A,B) + \tkzDrawSegments[new](A,C B,C) + \tkzMarkRightAngles(A,B,C) + \tkzDrawPoints(A,B) \tkzDrawPoint[new](C) + \tkzLabelPoints(A,B) + \tkzLabelPoints[new](C) \end{tikzpicture} \end{tkzexample} \subsubsection{Pythagorean Theorem and \tkzcname{tkzDefSquare} } \begin{tkzexample}[latex=8cm,small] \begin{tikzpicture}[scale=.5] -\tkzInit \tkzDefPoint(0,0){C} \tkzDefPoint(4,0){A} \tkzDefPoint(0,3){B} \tkzDefSquare(B,A)\tkzGetPoints{E}{F} \tkzDefSquare(A,C)\tkzGetPoints{G}{H} \tkzDefSquare(C,B)\tkzGetPoints{I}{J} -\tkzFillPolygon[fill = red!50 ](A,C,G,H) -\tkzFillPolygon[fill = blue!50 ](C,B,I,J) -\tkzFillPolygon[fill = purple!50](B,A,E,F) -\tkzFillPolygon[fill = orange,opacity=.5](A,B,C) -\tkzDrawPolygon[line width = 1pt](A,B,C) -\tkzDrawPolygon[line width = 1pt](A,C,G,H) -\tkzDrawPolygon[line width = 1pt](C,B,I,J) -\tkzDrawPolygon[line width = 1pt](B,A,E,F) -\tkzLabelSegment[](A,C){$a$} -\tkzLabelSegment[](C,B){$b$} +\tkzDrawPolygon(A,B,C) +\tkzDrawPolygon(A,C,G,H) +\tkzDrawPolygon(C,B,I,J) +\tkzDrawPolygon(B,A,E,F) +\tkzLabelSegment(A,C){$a$} +\tkzLabelSegment(C,B){$b$} \tkzLabelSegment[swap](A,B){$c$} \end{tikzpicture} \end{tkzexample} +\subsection{Defining the points of a rectangle} +. + +\begin{NewMacroBox}{tkzDefRectangle}{\parg{pt1,pt2}}% +The rectangle is defined in the forward direction. From two points, two more points are obtained such that the four taken in order form a rectangle. The two points passed in arguments are the ends of a diagonal of the rectangle. The sides are parallel to the axes.\\ + The results are in \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult}.\\ +We can rename them with \tkzcname{tkzGetPoints}. + +\medskip +\begin{tabular}{lll}% +\toprule +Arguments & example & explication \\ +\midrule +\TAline{\parg{pt1,pt2}}{\tkzcname{tkzDefRectangle}\parg{A,B}}{The rectangle is defined in the direct direction.} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Example of a rectangle definition} +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture} +\tkzDefPoints{0/0/A,5/2/C} +\tkzDefRectangle(A,C) \tkzGetPoints{B}{D} +\tkzDrawPolygon[fill=teal!15](A,...,D) +\end{tikzpicture} +\end{tkzexample} + \subsection{Definition of parallelogram} -\subsection{Defining the points of a parallelogram} -It is a matter of completing three points in order to obtain a parallelogram. +Defining the points of a parallelogram. It is a matter of completing three points in order to obtain a parallelogram. \begin{NewMacroBox}{tkzDefParallelogram}{\parg{pt1,pt2,pt3}}% -From three points, another point is obtained such that the four taken in order form a parallelogram. The result is in \tkzname{tkzPointResult}. \\ -We can rename it with the name \tkzcname{tkzGetPoint}... - \begin{tabular}{lll}% \toprule arguments & default & definition \\ @@ -83,12 +105,18 @@ arguments & default & definition \\ \end{tabular} \end{NewMacroBox} +From three points, another point is obtained such that the four taken in order form a parallelogram. +\\ The result is in \tkzname{tkzPointResult}. \\ +We can rename it with the name \tkzcname{tkzGetPoint}... + + \subsubsection{Example of a parallelogram definition} \begin{tkzexample}[latex=7 cm,small] \begin{tikzpicture}[scale=1] \tkzDefPoints{0/0/A,3/0/B,4/2/C} \tkzDefParallelogram(A,B,C) + % or \tkzDefPointWith[colinear= at C](B,A) \tkzGetPoint{D} \tkzDrawPolygon(A,B,C,D) \tkzLabelPoints(A,B) @@ -98,92 +126,11 @@ arguments & default & definition \\ \end{tkzexample} - -\subsubsection{Simple example} -Explanation of the definition of a parallelogram -\begin{tkzexample}[latex=7 cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,3/0/B,4/2/C} - \tkzDefPointWith[colinear= at C](B,A) - \tkzGetPoint{D} - \tkzDrawPolygon(A,B,C,D) - \tkzLabelPoints(A,B) - \tkzLabelPoints[above right](C,D) - \tkzDrawPoints(A,...,D) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Construction of the golden rectangle } - -\begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture}[scale=.5] - \tkzInit[xmax=14,ymax=10] - \tkzClip[space=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} - \tkzDefMidPoint(A,B)\tkzGetPoint{I} - \tkzDefSquare(A,B)\tkzGetPoints{C}{D} - \tkzDrawSquare(A,B) - \tkzInterLC(A,B)(I,C)\tkzGetPoints{G}{E} - \tkzDrawArc[style=dashed,color=gray](I,E)(D) - \tkzDefPointWith[colinear= at C](E,B) - \tkzGetPoint{F} - \tkzDrawPoints(C,D,E,F) - \tkzLabelPoints(A,B,C,D,E,F) - \tkzDrawSegments[style=dashed,color=gray]% -(E,F C,F B,E) -\end{tikzpicture} -\end{tkzexample} - - - - -\subsection{Drawing a square} -\begin{NewMacroBox}{tkzDrawSquare}{\oarg{local options}\parg{pt1,pt2}}% -The macro draws a square but not the vertices. It is possible to color the inside. The order of the points is that of the direct direction of the trigonometric circle. - -\medskip -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2}}{|\tkzcname{tkzDrawSquare}|\parg{A,B}}{|\tkzcname{tkzGetPoints\{C\}\{D\}}|} -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -options & example & explication \\ -\midrule -\TOline{Options TikZ}{|red,line width=1pt|}{} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{The idea is to inscribe two squares in a semi-circle.} - -\begin{tkzexample}[latex=6 cm,small] -\begin{tikzpicture}[scale=.75] - \tkzInit[ymax=8,xmax=8] - \tkzClip[space=.25] \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} \tkzDefPoint(4,0){I} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzInterLC(I,C)(I,B) \tkzGetPoints{E'}{E} - \tkzInterLC(I,D)(I,B) \tkzGetPoints{F'}{F} - \tkzDefPointsBy[projection=onto A--B](E,F){H,G} - \tkzDefPointsBy[symmetry = center H](I){J} - \tkzDefSquare(H,J) \tkzGetPoints{K}{L} - \tkzDrawSector[fill=yellow](I,B)(A) - \tkzFillPolygon[color=red!40](H,E,F,G) - \tkzFillPolygon[color=blue!40](H,J,K,L) - \tkzDrawPolySeg[color=red](H,E,F,G) - \tkzDrawPolySeg[color=red](J,K,L) - \tkzDrawPoints(E,G,H,F,J,K,L) -\end{tikzpicture} -\end{tkzexample} - \subsection{The golden rectangle} - \begin{NewMacroBox}{tkzDefGoldRectangle}{\parg{point,point}}% -The macro determines a rectangle whose size ratio is the number $\Phi$. The created points are in \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult}. They can be obtained with the macro \tkzcname{tkzGetPoints}. The following macro is used to draw the rectangle. + \begin{NewMacroBox}{tkzDefGoldenRectangle}{\parg{point,point}}% +The macro determines a rectangle whose size ratio is the number $\Phi$.\\ + The created points are in \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult}. \\ + They can be obtained with the macro \tkzcname{tkzGetPoints}. The following macro is used to draw the rectangle. \begin{tabular}{lll}% \toprule @@ -191,22 +138,10 @@ arguments & example & explication \\ \midrule \TAline{\parg{pt1,pt2}}{\parg{A,B}}{If C and D are created then $AB/BC=\Phi$.} \end{tabular} + + \tkzcname{tkzDefGoldenRectangle} or \tkzcname{tkzDefGoldRectangle} \end{NewMacroBox} - \begin{NewMacroBox}{tkzDrawGoldRectangle}{\oarg{local options}\parg{point,point}} -\begin{tabular}{lll}% -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2}}{\parg{A,B}}{Draws the golden rectangle based on the segment $[AB]$} -\end{tabular} - -\medskip -\begin{tabular}{lll}% -options & example & explication \\ -\midrule -\TOline{Options TikZ}{|red,line width=1pt|}{} -\end{tabular} -\end{NewMacroBox} \subsubsection{Golden Rectangles} \begin{tkzexample}[latex=6 cm,small] @@ -214,170 +149,38 @@ options & example & explication \\ \tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B} \tkzDefGoldRectangle(A,B) \tkzGetPoints{C}{D} \tkzDefGoldRectangle(B,C) \tkzGetPoints{E}{F} - \tkzDrawPolygon[color=red,fill=red!20](A,B,C,D) - \tkzDrawPolygon[color=blue,fill=blue!20](B,C,E,F) -\end{tikzpicture} -\end{tkzexample} - -\subsection{Drawing a polygon} - \begin{NewMacroBox}{tkzDrawPolygon}{\oarg{local options}\parg{points list}}% -Just give a list of points and the macro plots the polygon using the \TIKZ\ options present. You can replace $(A,B,C,D,E)$ by $(A,...,E)$ and $(P_1,P_2,P_3,P_4,P_5)$ by $(P_1,P...,P_5)$ - -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2,pt3,...}}{|\BS tkzDrawPolygon[gray,dashed](A,B,C)|}{Drawing a triangle} - \end{tabular} - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & example \\ -\midrule -\TOline{Options TikZ}{...}{|\BS tkzDrawPolygon[red,line width=2pt](A,B,C)|} - \end{tabular} -\end{NewMacroBox} - -\subsubsection{\tkzcname{tkzDrawPolygon}} - -\begin{tkzexample}[latex=7cm, small] -\begin{tikzpicture} [rotate=18,scale=1.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2.25,0.2){B} - \tkzDefPoint(2.5,2.75){C} - \tkzDefPoint(-0.75,2){D} - \tkzDrawPolygon[fill=black!50!blue!20!](A,B,C,D) - \tkzDrawSegments[style=dashed](A,C B,D) -\end{tikzpicture}\end{tkzexample} - -\subsection{Drawing a polygonal chain} - \begin{NewMacroBox}{tkzDrawPolySeg}{\oarg{local options}\parg{points list}}% -Just give a list of points and the macro plots the polygonal chain using the \TIKZ\ options present. - -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2,pt3,...}}{|\BS tkzDrawPolySeg[gray,dashed](A,B,C)|}{Drawing a triangle} - \end{tabular} - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & example \\ -\midrule -\TOline{Options TikZ}{...}{|\BS tkzDrawPolySeg[red,line width=2pt](A,B,C)|} - \end{tabular} -\end{NewMacroBox} - -\subsubsection{Polygonal chain} - -\begin{tkzexample}[latex=7cm, small] -\begin{tikzpicture} - \tkzDefPoints{0/0/A,6/0/B,3/4/C,2/2/D} - \tkzDrawPolySeg(A,...,D) - \tkzDrawPoints(A,...,D) + \tkzDefGoldRectangle(C,E) \tkzGetPoints{G}{H} + \tkzDrawPolygon(A,B,C,D) + \tkzDrawSegments(E,F G,H) \end{tikzpicture} \end{tkzexample} -\subsubsection{Polygonal chain: index notation} +\subsubsection{Construction of the golden rectangle } +Without the previous macro here is how to get the golden rectangle. -\begin{tkzexample}[latex=7cm, small] -\begin{tikzpicture} -\foreach \pt in {1,2,...,8} {% -\tkzDefPoint(\pt*20:3){P_\pt}} -\tkzDrawPolySeg(P_1,P_...,P_8) -\tkzDrawPoints(P_1,P_...,P_8) +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}[scale=.5] +\tkzDefPoint(0,0){A} +\tkzDefPoint(8,0){B} +\tkzDefMidPoint(A,B) +\tkzGetPoint{I} +\tkzDefSquare(A,B)\tkzGetPoints{C}{D} +\tkzInterLC(A,B)(I,C)\tkzGetPoints{G}{E} +\tkzDefPointWith[colinear= at C](E,B) + \tkzGetPoint{F} +\tkzDefPointBy[projection=onto D--C ](E) + \tkzGetPoint{H} +\tkzDrawArc[style=dashed](I,E)(D) +\tkzDrawSquare(A,B) +\tkzDrawPoints(C,D,E,F,H) +\tkzLabelPoints(A,B,C,D,E,F,H) +\tkzDrawSegments[style=dashed,color=gray]% +(E,F C,F B,E F,H H,C E,H) \end{tikzpicture} \end{tkzexample} -\subsection{Clip a polygon} - \begin{NewMacroBox}{tkzClipPolygon}{\oarg{local options}\parg{points list}}% -This macro makes it possible to contain the different plots in the designated polygon. -\medskip -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2}}{\parg{A,B}}{} -%\bottomrule - \end{tabular} -\end{NewMacroBox} -\subsubsection{\tkzcname{tkzClipPolygon}} -\begin{tkzexample}[latex=7 cm,small] -\begin{tikzpicture}[scale=1.25] - \tkzInit[xmin=0,xmax=4,ymin=0,ymax=3] - \tkzClip[space=.5] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzDefPoint(0,2){D} \tkzDefPoint(2,0){E} - \tkzDrawPoints(D,E) \tkzLabelPoints(D,E) - \tkzClipPolygon(A,B,C) - \tkzDrawLine[color=red](D,E) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Example: use of "Clip" for Sangaku in a square} -\begin{tkzexample}[latex=7cm, small] -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzDrawPolygon(B,C,D,A) - \tkzClipPolygon(B,C,D,A) - \tkzDefPoint(4,8){F} - \tkzDefTriangle[equilateral](C,D) - \tkzGetPoint{I} - \tkzDrawPoint(I) - \tkzDefPointBy[projection=onto B--C](I) - \tkzGetPoint{J} - \tkzInterLL(D,B)(I,J) \tkzGetPoint{K} - \tkzDefPointBy[symmetry=center K](B) - \tkzGetPoint{M} - \tkzDrawCircle(M,I) - \tkzCalcLength(M,I) \tkzGetLength{dMI} - \tkzFillPolygon[color = orange](A,B,C,D) - \tkzFillCircle[R,color = yellow](M,\dMI pt) - \tkzFillCircle[R,color = blue!50!black](F,4 cm)% -\end{tikzpicture} -\end{tkzexample} - -\subsection{Color a polygon} - \begin{NewMacroBox}{tkzFillPolygon}{\oarg{local options}\parg{points list}}% -You can color by drawing the polygon, but in this case you color the inside of the polygon without drawing it. - -\medskip -\begin{tabular}{lll}% -\toprule -arguments & example & explication \\ -\midrule -\TAline{\parg{pt1,pt2,\dots}}{\parg{A,B,\dots}}{} -%\bottomrule - \end{tabular} -\end{NewMacroBox} - -\subsubsection{\tkzcname{tkzFillPolygon}} -\begin{tkzexample}[latex=7cm, small] -\begin{tikzpicture}[scale=0.7] -\tkzInit[xmin=-3,xmax=6,ymin=-1,ymax=6] -\tkzDrawX[noticks] -\tkzDrawY[noticks] -\tkzDefPoint(0,0){O} \tkzDefPoint(4,2){A} -\tkzDefPoint(-2,6){B} -\tkzPointShowCoord[xlabel=$x$,ylabel=$y$](A) -\tkzPointShowCoord[xlabel=$x'$,ylabel=$y'$,% - ystyle={right=2pt}](B) -\tkzDrawSegments[->](O,A O,B) -\tkzLabelSegment[above=3pt](O,A){$\vec{u}$} -\tkzLabelSegment[above=3pt](O,B){$\vec{v}$} -\tkzMarkAngle[fill= yellow,size=1.8cm,% - opacity=.5](A,O,B) -\tkzFillPolygon[red!30,opacity=0.25](A,B,O) -\tkzLabelAngle[pos = 1.5](A,O,B){$\alpha$} -\end{tikzpicture} -\end{tkzexample} \subsection{Regular polygon} \begin{NewMacroBox}{tkzDefRegPolygon}{\oarg{local options}\parg{pt1,pt2}}% @@ -407,14 +210,15 @@ options & default & example \\ \subsubsection{Option \tkzname{center}} \begin{tkzexample}[latex=7cm, small] \begin{tikzpicture} - \tkzDefPoints{0/0/P0,0/0/Q0,2/0/P1} - \tkzDefMidPoint(P0,P1) \tkzGetPoint{Q1} + \tkzDefPoints{0/0/P0,0/0/Q0,2/0/P1} + \tkzDefMidPoint(P0,P1) \tkzGetPoint{Q1} \tkzDefRegPolygon[center,sides=7](P0,P1) - \tkzDefMidPoint(P1,P2) \tkzGetPoint{Q1} + \tkzDefMidPoint(P1,P2) \tkzGetPoint{Q1} \tkzDefRegPolygon[center,sides=7,name=Q](P0,Q1) - \tkzDrawPolygon(P1,P...,P7) - \tkzFillPolygon[gray!20](Q0,Q1,P2,Q2) - \foreach \j in {1,...,7} {\tkzDrawSegment[black](P0,Q\j)} + \tkzFillPolygon[teal!20](Q0,Q1,P2,Q2) + \tkzDrawPolygon(P1,P...,P7) + \foreach \j in {1,...,7} {% + \tkzDrawSegment[black](P0,Q\j)} \end{tikzpicture} \end{tkzexample} diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex index 44aa4cd007..826c521f80 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex @@ -2,7 +2,7 @@ \begin{tkzexample}[latex=5cm,small] \begin{tikzpicture}[scale=.25] - \tkzDefPoints{00/0/A,12/0/B,6/12*sind(60)/C} + \tkzDefPoints{0/0/A,12/0/B,6/12*sind(60)/C} \foreach \density in {20,30,...,240}{% \tkzDrawPolygon[fill=teal!\density](A,B,C) \pgfnodealias{X}{A} @@ -25,16 +25,324 @@ The objects, of course, are points, segments, lines, triangles, polygons and cir The syntax is perhaps too verbose but it is, I believe, easily accessible. As a result, the students like teachers were able to easily access this tool. -\subsection{\tkzname{\tkznameofpack} vs \tkzname{\TIKZ } } +\subsection{ \tkzname{\TIKZ } vs \tkzname{\tkznameofpack} } I love programming with \TIKZ, and without \TIKZ\ I would never have had the idea to create \tkzname{\tkznameofpack} but never forget that behind it there is \TIKZ\ and that it is always possible to insert code from \TIKZ. \tkzname{\tkznameofpack} doesn't prevent you from using \TIKZ. That said, I don't think mixing syntax is a good thing. There is no need to compare \TIKZ\ and \tkzname{\tkznameofpack}. The latter is not addressed to the same audience as \TIKZ. The first one allows you to do a lot of things, the second one only does geometry drawings. The first one can do everything the second one does, but the second one will more easily do what you want. -\subsection{How it works} +The main purpose is to define points to create geometrical figures. \tkzname{\tkznameofpack} allows you to draw the essential objects of Euclidean geometry from these points but it may be insufficient for some actions like coloring surfaces. In this case you will have to use \TIKZ\ which is always possible. -\subsubsection{Example Part I: gold triangle} +Here are some comparisons between \tkzname{\TIKZ } and \tkzname{\tkznameofpack} 4. For this I will use the geometry examples from the PGFManual. + The two most important Euclidean tools used by early Greeks to construct different geometrical shapes and angles were a compass and a straightedge. My idea is to allow you to follow step by step a construction that would be done by hand (with compass and straightedge) as naturally as possible. + +\subsubsection{Book I, proposition I \_Euclid's Elements\_ } + +\begin{tikzpicture} +\node [mybox,title={Book I, proposition I \_Euclid's Elements\_}] (box){% + \begin{minipage}{0.90\textwidth} +{\emph{To construct an equilateral triangle on a given finite straight line.} +} + \end{minipage} +}; +\end{tikzpicture}% + + +Explanation : + +The fourth tutorial of the \emph{PgfManual} is about geometric constructions. \emph{T. Tantau} proposes to get the drawing with its beautiful tool Ti\emph{k}Z. Here I propose the same construction with \emph{tkz-elements}. The color of the Ti\emph{k}Z code is green and that of \emph{tkz-elements} is red. + +\medskip + +\hspace*{1cm}\vbox{\orange |\usepackage{tikz}|\\ +|\usetikzlibrary{calc,intersections,through,backgrounds}|} + +\medskip +\hspace*{1cm}\vbox{\red |\usepackage{tkz-euclide}|} + +\medskip +How to get the line AB ? To get this line, we use two fixed points.\\ + +\medskip +\hspace*{1cm}\vbox{\orange +|\coordinate [label=left:$A$] (A) at (0,0);|\\ +|\coordinate [label=right:$B$] (B) at (1.25,0.25);|\\ +|\draw (A) -- (B);|} + +\medskip +\hspace*{1cm}\vbox{\red +|\tkzDefPoint(0,0){A}|\\ +|\tkzDefPoint(1.25,0.25){B}|\\ +|\tkzDrawSegment(A,B)|\\ +|\tkzLabelPoint[left](A){$A$}|\\ +|\tkzLabelPoint[right](B){$B$}|} + +We want to draw a circle around the points $A$ and $B$ whose radius is given by the length of the line AB. +\medskip + +\hspace*{1cm}\vbox{\orange +|\draw let \p1 = ($ (B) - (A) $),|\\ +|\n2 = {veclen(\x1,\y1)} in|\\ +| (A) circle (\n2)|\\ +| (B) circle (\n2);|} + +\medskip +\hspace*{1cm}\vbox{\red +|\tkzDrawCircles(A,B B,A)| +} + +The intersection of the circles + +\medskip + +\hspace*{1cm}\vbox{\orange +|draw [name path=A--B] (A) -- (B);|\\ +|node (D) [name path=D,draw,circle through=(B),label=left:$D$] at (A) {}; |\\ +|node (E) [name path=E,draw,circle through=(A),label=right:$E$] at (B) {};|\\ +|path [name intersections={of=D and E, by={[label=above:$C$]C, [label=below:$C'$]C'}}]; |\\ +|draw [name path=C--C',red] (C) -- (C');|\\ +|path [name intersections={of=A--B and C--C',by=F}];|\\ +|node [fill=red,inner sep=1pt,label=-45:$F$] at (F) {};|\\} + +\medskip +\hspace*{1cm}\vbox{\red |\tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{X}|\\} + + +How to draw points : + +\medskip +\hspace*{1cm}\vbox{\orange |\foreach \point in {A,B,C}|\\ +|\fill [black,opacity=.5] (\point) circle (2pt);|\\} + +\medskip +\hspace*{1cm}\vbox{\red| \tkzDrawPoints[fill=gray,opacity=.5](A,B,C)|\\} + +\subsubsection{Complete code with \pkg{tkz-euclide}} + +\colorlet{input}{red!80!black} +\colorlet{output}{red!70!black} +\colorlet{triangle}{orange!40} + + + +\begin{tkzexample}[vbox,small] + \begin{tikzpicture}[scale=1.25,thick,help lines/.style={thin,draw=black!50}] + \tkzDefPoint(0,0){A} + \tkzDefPoint(1.25+rand(),0.25+rand()){B} + \tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{X} + + \tkzFillPolygon[triangle,opacity=.5](A,B,C) + \tkzDrawSegment[input](A,B) + \tkzDrawSegments[red](A,C B,C) + \tkzDrawCircles[help lines](A,B B,A) + + \tkzLabelPoints(A,B) + \tkzLabelCircle[below=12pt](A,B)(180){$D$} + \tkzLabelCircle[above=12pt](B,A)(180){$E$} + \tkzLabelPoint[above,red](C){$C$} + \tkzDrawPoints[fill=gray,opacity=.5](A,B,C) + + \end{tikzpicture} +\end{tkzexample} + +\subsubsection*{Book I, Proposition II \_Euclid's Elements\_} + +\begin{tikzpicture} +\node [mybox,title={Book I, Proposition II \_Euclid's Elements\_}] (box){% +\begin{minipage}{0.90\textwidth} + {\emph{To place a straight line equal to a given straight line with one end at a given point.}} +\end{minipage} +}; +\end{tikzpicture}% + +Explanation + +In the first part, we need to find the midpoint of the straight line $AB$. With TikZ we can use the calc library + +\medskip +\hspace*{1cm}\vbox{\orange |\coordinate [label=left:$A$] (A) at (0,0);|\\ +|\coordinate [label=right:$B$] (B) at (1.25,0.25);|\\ +|\draw (A) -- (B);|\\ +|\node [fill=red,inner sep=1pt,label=below:$X$] (X) at ($ (A)!.5!(B) $) {};|\\} + +With \pkg{tkz-euclide} we have a macro \tkzcname{tkzDefMidPoint}, we get the point X with \tkzcname{tkzGetPoint} but we don't need this point to get the next step. + + +\medskip +\hspace*{1cm}\vbox{\red |\tkzDefPoints{0/0/A,0.75/0.25/B,1/1.5/C}|\\ +|\tkzDefMidPoint(A,B) \tkzGetPoint{X}|}\\ + +\medskip +Then we need to construct a triangle equilateral. It's easy with \pkg{tkz-euclide} . With TikZ you need some effort because you need to use the midpoint $X$ to get the point $D$ with trigonometry calculation. + +\medskip +\hspace*{1cm}\vbox{\orange +|\node [fill=red,inner sep=1pt,label=below:$X$] (X) at ($ (A)!.5!(B) $) {}; | \\ +|\node [fill=red,inner sep=1pt,label=above:$D$] (D) at | \\ +|($ (X) ! {sin(60)*2} ! 90:(B) $) {}; | \\ +|\draw (A) -- (D) -- (B); | \\ +} \\ + +\medskip +\hspace*{1cm}\vbox{\red |\tkzDefTriangle[equilateral](A,B) \tkzGetPoint{D}|}\\ + +We can draw the triangle at the end of the picture with + +\medskip +\hspace*{1cm}\vbox{\red |\tkzDrawPolygon{A,B,C}|} + +\medskip +We know how to draw the circle around $B$ through $C$ and how to place the points $E$ and $F$ + +\medskip +\hspace*{1cm}\vbox{\orange +|\node (H) [label=135:$H$,draw,circle through=(C)] at (B) {};| \\ +|\draw (D) -- ($ (D) ! 3.5 ! (B) $) coordinate [label=below:$F$] (F);| \\ +|\draw (D) -- ($ (D) ! 2.5 ! (A) $) coordinate [label=below:$E$] (E);|} \\ + +\medskip + +\hspace*{1cm}\vbox{\red |\tkzDrawCircle(B,C)|\\ +|\tkzDrawLines[add=0 and 2](D,A D,B)|} + +\medskip +We can place the points $E$ and $F$ at the end of the picture. We don't need them now. + +Intersecting a Line and a Circle : here we search the intersection of the circle around B through C and the line DB. +The infinite straight line DB intercepts the circle but with TikZ we need to extend the lines DB and that can be done using partway calculations. We get the point F and BF or DF intercepts the circle + +\medskip +\hspace*{1cm}\vbox{\orange| \node (H) [label=135:$H$,draw,circle through=(C)] at (B) {}; | \\ +|\path let \p1 = ($ (B) - (C) $) in| \\ +| coordinate [label=left:$G$] (G) at ($ (B) ! veclen(\x1,\y1) ! (F) $); | \\ +|\fill[red,opacity=.5] (G) circle (2pt);|} \\ + +\medskip +Like the intersection of two circles, it's easy to find the intersection of a line and a circle with \pkg{elements}. We don't need $F$ + +\medskip +\hspace*{1cm}\vbox{\red | \tkzInterLC(B,D)(B,C)\tkzGetFirstPoint{G}|} + +\medskip +there are no more difficulties. Here the final code with some simplications. + + +\begin{tkzexample}[vbox,small] + \begin{tikzpicture}[scale=2] + \tkzDefPoint(0,0){A} + \tkzDefPoint(0.75,0.25){B} + \tkzDefPoint(1,1.5){C} + \tkzDefTriangle[equilateral](A,B) \tkzGetPoint{D} + \tkzInterLC(B,D)(B,C)\tkzGetFirstPoint{G} + \tkzInterLC(D,A)(D,G)\tkzGetSecondPoint{L} + \tkzDrawCircles(B,C D,G) + \tkzDrawLines[add=0 and 2](D,A D,B) + \tkzDrawSegment(A,B) + \tkzDrawSegments[red](A,L B,C) + \tkzDrawPoints[red](D,L) + \tkzDrawPoints[fill=gray](A,B,C) + \tkzLabelPoints[left,red](A) + \tkzLabelPoints[below right,red](L) + \tkzLabelCircle[above left=6pt](B,G)(180){$H$} + \tkzLabelPoints[above left](D,G) + \tkzLabelPoints[above,red](C) + \tkzLabelPoints[right,red](B) + \tkzLabelCircle[above left=6pt](D,G)(180){$K$} + \end{tikzpicture} +\end{tkzexample} + +\subsection{\tkzname{\tkznameofpack 4} vs \tkzname{\tkznameofpack 3}} + +Now I am no longer a Mathematics teacher, and I only spend a few hours studying geometry. I wanted to avoid multiple complications by trying to make \tkzname{tkz-euclide} independent of \tkzname{tkz-base}. Thus was born \tkzname{\tkznameofpack} 4. The latter is a simplified version of its predecessor. The macros of \tkzname{tkz-euclide 3} have been retained. The unit is now \tkzname{cm}. Si vous avez besoin de certaines macros de \tkzname{tkz-base}, il vous faudra sans doute utiliser la macro \tkzcname{tkzInit}. + +\subsection{How to use the \tkzname{\tkznameofpack} package ?} +\subsubsection{Let's look at a classic example} +In order to show the right way, we will see how to build an equilateral triangle. Several possibilities are open to us, we are going to follow the steps of Euclid. + +\begin{itemize} +\item First of all, you have to use a document class. The best choice to test your code is to create a single figure with the class \tkzname{standalone}\index{standalone}. +\begin{verbatim} +\documentclass{standalone} +\end{verbatim} +\item Then load the \tkzname{\tkznameofpack} package: +\begin{verbatim} +\usepackage{tkz-euclide} +\end{verbatim} + + You don't need to load \TIKZ\ because the \tkzname{\tkznameofpack} package works on top of TikZ and loads it. + + \item Start the document and open a TikZ picture environment: +\begin{verbatim} +\begin{document} +\begin{tikzpicture} +\end{verbatim} + +\item Now we define two fixed points: +\begin{verbatim} +\tkzDefPoint(0,0){A} +\tkzDefPoint(5,2){B} +\end{verbatim} + +\item Two points define two circles, let's use these circles: + + circle with center $A$ through $B$ and circle with center $B$ through $A$. These two circles have two points in common. +\begin{verbatim} +\tkzInterCC(A,B)(B,A) +\end{verbatim} +We can get the points of intersection with +\begin{verbatim} +\tkzGetPoints{C}{D} +\end{verbatim} + +\item All the necessary points are obtained, we can move on to the final steps including the plots. +\begin{verbatim} +\tkzDrawCircles[gray,dashed](A,B B,A) +\tkzDrawPolygon(A,B,C)% The triangle +\end{verbatim} +\item Draw all points $A$, $B$, $C$ and $D$: +\begin{verbatim} +\tkzDrawPoints(A,...,D) +\end{verbatim} + +\item The final step, we print labels to the points and use options for positioning:\\ +\begin{verbatim} +\tkzLabelSegments[swap](A,B){$c$} +\tkzLabelPoints(A,B,D) +\tkzLabelPoints[above](C) +\end{verbatim} +\item We finally close both environments +\begin{verbatim} +\end{tikzpicture} +\end{document} +\end{verbatim} + +\item The complete code + +\begin{tkzexample}[latex=8cm,small] + \begin{tikzpicture}[scale=.5] + % fixed points + \tkzDefPoint(0,0){A} + \tkzDefPoint(5,2){B} + % calculus + \tkzInterCC(A,B)(B,A) + \tkzGetPoints{C}{D} + % drawings + \tkzDrawCircles(A,B B,A) + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,...,D) + % marking + \tkzMarkSegments[mark=s||](A,B B,C C,A) + % labelling + \tkzLabelSegments[swap](A,B){$c$} + \tkzLabelPoints(A,B,D) + \tkzLabelPoints[above](C) +\end{tikzpicture} +\end{tkzexample} + + \end{itemize} + +\subsubsection{ Part I: golden triangle} \begin{center} \begin{tikzpicture} @@ -46,15 +354,18 @@ There is no need to compare \TIKZ\ and \tkzname{\tkznameofpack}. The latter is % Toget A we use an intersection of lines \tkzInterLL(B,E)(C,D) \tkzGetPoint{A} \tkzInterLL(C,E)(B,D) \tkzGetPoint{H} -% drawing -\tkzDrawArc[delta=10](B,C)(E) -\tkzDrawPolygon(C,B,D) -\tkzDrawSegments(D,A B,A C,E) + % angles -\tkzMarkAngles(C,B,D E,A,D) %this is to draw the arcs +\tkzMarkAngles[size=2](C,B,D E,A,D) %this is to draw the arcs \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} \tkzMarkRightAngle(B,H,C) \tkzDrawPoints(A,...,E) + +% drawing +\tkzDrawArc[delta=10](B,C)(E) +\tkzDrawPolygon(C,B,D) +\tkzDrawSegments(D,A B,A C,E) + % Label only now \tkzLabelPoints[below left](C,A) \tkzLabelPoints[below right](D) @@ -106,14 +417,15 @@ How construct a gold triangle or an angle of $36^\circ$? \tkzInterCC[with nodes](C,C,n)(D,C,n) \tkzGetFirstPoint{B} \tkzDrawSegment[brown,dashed](f,n) - \pgfinterruptboundingbox + \pgfinterruptboundingbox% from tikz \tkzDrawPolygon[brown,dashed](C,D,e,f) \tkzDrawArc[brown,dashed](m,e)(n) \tkzCompass[brown,dashed,delta=20](C,B) \tkzCompass[brown,dashed,delta=20](D,B) \endpgfinterruptboundingbox - \tkzDrawPoints(C,D,B) \tkzDrawPolygon(B,...,D) + \tkzDrawPoints(B,C,D,e,f,m,n) + \tkzLabelPoints(B,C,D,e,f,m,n) \end{tikzpicture} \end{minipage} \begin{minipage}{.6\textwidth} @@ -130,12 +442,10 @@ How construct a gold triangle or an angle of $36^\circ$? \tkzInterCC[with nodes](C,C,n)(D,C,n) \tkzGetFirstPoint{B} \tkzDrawSegment[brown,dashed](f,n) - \pgfinterruptboundingbox \tkzDrawPolygon[brown,dashed](C,D,e,f) \tkzDrawArc[brown,dashed](m,e)(n) \tkzCompass[brown,dashed,delta=20](C,B) \tkzCompass[brown,dashed,delta=20](D,B) - \endpgfinterruptboundingbox \tkzDrawPoints(C,D,B) \tkzDrawPolygon(B,...,D) \end{tikzpicture} @@ -144,39 +454,6 @@ How construct a gold triangle or an angle of $36^\circ$? After building the golden triangle $BCD$, we build the point $A$ by noticing that $BD=DA$. Then we get the point $E$ and finally the point $F$. This is done with already intersections of defined objects (line and circle). - - -\begin{center} - \begin{tikzpicture} - \tkzDefPoint(0,0){C} - \tkzDefPoint(4,0){D} - \tkzDefSquare(C,D) - \tkzGetPoints{e}{f} - \tkzDefMidPoint(C,f) - \tkzGetPoint{m} - \tkzInterLC(C,f)(m,e) - \tkzGetSecondPoint{n} - \tkzInterCC[with nodes](C,C,n)(D,C,n) - \tkzGetFirstPoint{B} - \tkzInterLC(C,D)(D,B) \tkzGetSecondPoint{A} - \tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E} - \tkzInterLL(B,D)(C,E) \tkzGetPoint{F} - \tkzDrawPoints(C,D,B) - \tkzDrawPolygon(B,...,D) - \tkzDrawPolygon(B,C,D) - \tkzDrawSegments(D,A A,B C,E) - \tkzDrawArc[delta=10](B,C)(E) - \tkzMarkRightAngle[fill=blue!20](B,F,C) - \tkzFillAngles[fill=blue!10](C,B,D E,A,D) - \tkzMarkAngles(C,B,D E,A,D) - \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} - \tkzLabelPoints[below](A,C,D,E) - \tkzLabelPoints[above right](B,F) - \tkzDrawPoints(A,...,F) - \end{tikzpicture} -\end{center} - - \begin{tkzexample}[code only,small] \begin{tikzpicture} @@ -199,8 +476,7 @@ After building the golden triangle $BCD$, we build the point $A$ by noticing tha \tkzDrawSegments(D,A A,B C,E) \tkzDrawArc[delta=10](B,C)(E) \tkzDrawPoints(A,...,F) - \tkzMarkRightAngle[fill=blue!20](B,F,C) - \tkzFillAngles[fill=blue!10](C,B,D E,A,D) + \tkzMarkRightAngle(B,F,C) \tkzMarkAngles(C,B,D E,A,D) \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} \tkzLabelPoints[below](A,C,D,E) @@ -208,9 +484,9 @@ After building the golden triangle $BCD$, we build the point $A$ by noticing tha \end{tikzpicture} \end{tkzexample} -\subsubsection{Example Part II: two others methods gold and euclide triangle} +\subsubsection{Part II: two others methods with golden and euclid triangle} -\tkzname{\tkznameofpack} knows how to define a "gold" or "euclide" triangle. We can define $BCD$ and $BCA$ like gold triangles. +\tkzname{\tkznameofpack} knows how to define a "golden" or "euclide" triangle. We can define $BCD$ and $BCA$ like gold triangles. \begin{center} @@ -218,9 +494,9 @@ After building the golden triangle $BCD$, we build the point $A$ by noticing tha \begin{tikzpicture} \tkzDefPoint(0,0){C} \tkzDefPoint(4,0){D} - \tkzDefTriangle[euclide](C,D) + \tkzDefTriangle[euclid](C,D) \tkzGetPoint{B} - \tkzDefTriangle[euclide](B,C) + \tkzDefTriangle[euclid](B,C) \tkzGetPoint{A} \tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E} \tkzInterLL(B,D)(C,E) \tkzGetPoint{F} @@ -230,8 +506,7 @@ After building the golden triangle $BCD$, we build the point $A$ by noticing tha \tkzDrawSegments(D,A A,B C,E) \tkzDrawArc[delta=10](B,C)(E) \tkzDrawPoints(A,...,F) - \tkzMarkRightAngle[fill=blue!20](B,F,C) - \tkzFillAngles[fill=blue!10](C,B,D E,A,D) + \tkzMarkRightAngle(B,F,C) \tkzMarkAngles(C,B,D E,A,D) \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} \tkzLabelPoints[below](A,C,D,E) @@ -342,8 +617,8 @@ The following code consists of several parts: \tkzGetPoint{M} \tkzDefPointWith[orthogonal](I,M) \tkzGetPoint{H} - \tkzInterLC(I,H)(M,A) - \tkzGetSecondPoint{B} + \tkzInterLC(I,H)(M,B) + \tkzGetSecondPoint{C} \end{tkzltxexample} @@ -352,23 +627,23 @@ The following code consists of several parts: \tkzDrawSegment[style=orange](I,H) \tkzDrawPoints(O,I,A,B,M) \tkzDrawArc(M,A)(O) - \tkzDrawSegment[dim={$1$,-16pt,}](O,I) + \tkzDrawSegment[dim={$1$,-16pt,}](A,I) \tkzDrawSegment[dim={$a/2$,-10pt,}](I,M) - \tkzDrawSegment[dim={$a/2$,-16pt,}](M,A) + \tkzDrawSegment[dim={$a/2$,-16pt,}](M,B) \end{tkzltxexample} \item Marking: the fourth is devoted to marking; \begin{tkzltxexample}[] - \tkzMarkRightAngle(A,I,B) + \tkzMarkRightAngle[ra](A,I,C) \end{tkzltxexample} \item Labelling: the latter only deals with the placement of labels. \begin{tkzltxexample}[] - \tkzLabelPoint[left](O){$A(0,0)$} - \tkzLabelPoint[right](A){$B(10,0)$} - \tkzLabelSegment[right=4pt](I,B){$\sqrt{a^2}=a \ (a>0)$} + \tkzLabelPoint[left](A){$A(0,0)$} + \tkzLabelPoint[right](B){$B(10,0)$} + \tkzLabelSegment[right=4pt](I,C){$\sqrt{a^2}=a \ (a>0)$} \end{tkzltxexample} @@ -401,253 +676,4 @@ The following code consists of several parts: \end{tkzexample} \end{itemize} -\subsection{The Elements of tkz code} -In this paragraph, we start looking at the "rules" and "symbols" used to create a figure with \tkzname{\tkznameofpack}. - - The primitive objects are points. You can refer to a point at any time using the name given when defining it. (it is possible to assign a different name later on). - -\medskip -In general, \tkzname{\tkznameofpack} macros have a name beginning with tkz. There are four main categories starting with: -|\tkzDef...| |\tkzDraw...| |\tkzMark...| and |\tkzLabel...| - -Among the first category, |\tkzDefPoint| allows you to define fixed points. It will be studied in detail later. Here we will see in detail the macro |\tkzDefTriangle|. - -This macro makes it possible to associate to a pair of points a third point in order to define a certain triangle |\tkzDefTriangle(A,B)|. The obtained point is referenced |tkzPointResult| and it is possible to choose another reference with |\tkzGetPoint{C}| for example. -Parentheses are used to pass arguments. In |(A,B)| $A$ and $B$ are the points with which a third will be defined. - -However, in |{C}| we use braces to retrieve the new point. -In order to choose a certain type of triangle among the following choices: - |equilateral|, |half|, |pythagoras|, |school|, |golden or sublime|, |euclide|, |gold|, |cheops|... - and |two angles| you just have to choose between hooks, for example: - -|\tkzDefTriangle[euclide](A,B) \tkzGetPoint{C}| - -\begin{minipage}{0.5\textwidth} - \begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,8/0/B} - \foreach \tr in {equilateral,half,pythagore,% - school,golden,euclide, gold,cheops} - {\tkzDefTriangle[\tr](A,B) \tkzGetPoint{C} - \tkzDrawPoint(C) - \tkzLabelPoint[right](C){\tr} - \tkzDrawSegments(A,C C,B)} - \tkzDrawPoints(A,B) - \tkzDrawSegments(A,B) - \end{tikzpicture} -\end{minipage} -\begin{minipage}{0.5\textwidth} - \begin{tkzexample}[code only,small] - \begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,8/0/B} - \foreach \tr in {equilateral,half,pythagore,% - school,golden,euclide, gold,cheops} - {\tkzDefTriangle[\tr](A,B) \tkzGetPoint{C} - \tkzDrawPoint(C) - \tkzLabelPoint[right](C){\tr} - \tkzDrawSegments(A,C C,B)} - \tkzDrawPoints(A,B) - \tkzDrawSegments(A,B) - \end{tikzpicture} - \end{tkzexample} - -\end{minipage} - - -\subsection{Notations and conventions} - -I deliberately chose to use the geometric French and personal conventions to describe the geometric objects represented. The objects defined and represented by \tkzname{\tkznameofpack} are points, lines and circles located in a plane. They are the primary objects of Euclidean geometry from which we will construct figures. - -According to \tkzimp{Euclidian} these figures will only illustrate pure ideas produced by our brain. -Thus a point has no dimension and therefore no real existence. In the same way the line has no width and therefore no existence in the real world. The objects that we are going to consider are only representations of ideal mathematical objects. \tkzname{\tkznameofpack} will follow the steps of the ancient Greeks to obtain geometrical constructions using the ruler and the compass. - -Here are the notations that will be used: - - -\begin{itemize} -\item The points are represented geometrically either by a small disc or by the intersection of two lines (two straight lines, a straight line and a circle or two circles). In this case, the point is represented by a cross. - -\begin{tkzexample}[latex=6cm, small] - \begin{tikzpicture} - \tkzDefPoints{0/0/A,4/2/B} - \tkzDrawPoints(A,B) - \tkzLabelPoints(A,B) - \end{tikzpicture} -\end{tkzexample} - -or else - -\begin{tkzexample}[latex=6cm, small] - \begin{tikzpicture} - \tkzSetUpPoint[shape=cross, color=red] - \tkzDefPoints{0/0/A,4/2/B} - \tkzDrawPoints(A,B) - \tkzLabelPoints(A,B) - \end{tikzpicture} - \end{tkzexample} - -The existence of a point being established, we can give it a label which will be a capital letter (with some exceptions) of the Latin alphabet such as $A$, $B$ or $C$. For example: -\begin{itemize} -\item $O$ is a center for a circle, a rotation, etc.; -\item $M$ defined a midpoint; -\item $H$ defined the foot of an altitude; -\item $P'$ is the image of $P$ by a transformation ; -\end{itemize} - -It is important to note that the reference name of a point in the code may be different from the label to designate it in the text. So we can define a point A and give it as label $P$. In particular the style will be different, point A will be labeled $A$. - -\begin{tkzexample}[latex=6cm, small] - \begin{tikzpicture} - \tkzDefPoints{0/0/A} - \tkzDrawPoints(A) - \tkzLabelPoint(A){$P$} - \end{tikzpicture} -\end{tkzexample} - -Exceptions: some points such as the middle of the sides of a triangle share a characteristic, so it is normal that their names also share a common character. We will designate these points by $M_a$, $M_b$ and $M_c$ or $M_A$, $M_B$ and $M_C$. - -In the code, these points will be referred to as: M\_A, M\_B and M\_C. - -Another exception relates to intermediate construction points which will not be labelled. They will often be designated by a lowercase letter in the code. - -\item The line segments are designated by two points representing their ends in square brackets: $[AB]$. - -\item The straight lines are in Euclidean geometry defined by two points so $A$ and $B$ define the straight line $(AB)$. We can also designate this stright line using the Greek alphabet and name it $(\delta)$ or $(\Delta)$. It is also possible to designate the straight line with lowercase letters such as $d$ and $d'$. - -\item The semi-straight line is designated as follows $[AB)$. - - -\item Relation between the straight lines. Two perpendicular $(AB)$ and $(CD)$ lines will be written $(AB) \perp (CD)$ and if they are parallel we will write $(AB) \parallelslant (CD)$. - -\item The lengths of the sides of triangle ABC are $AB$, $AC$ and $BC$. The numbers are also designated by a lowercase letter so we will write: $AB=c$, $AC=b$ and $BC=a$. The letter $a$ is also used to represent an angle, and $r$ is frequently used to represent a radius, $d$ a diameter, $l$ a length, $d$ a distance. - -\item Polygons are designated afterwards by their vertices so $ABC$ is a triangle, $EFGH$ a quadrilateral. - -\item Angles are generally measured in degrees (ex $60^\circ$) and in an equilateral $ABC$ triangle we will write $\widehat{ABC}=\widehat{B}=60^\circ$. - -\item The arcs are designated by their extremities. For example if $A$ and $B$ are two points of the same circle then $\widearc{AB}$. - - -\item Circles are noted either $\mathcal{C}$ if there is no possible confusion or $\mathcal{C}$ $(O~;~A)$ for a circle with center $O$ and passing through the point $A$ or $\mathcal{C}$ $(O~;~1)$ for a circle with center O and radius 1 cm. - -\item Name of the particular lines of a triangle: I used the terms bisector, bisector out, mediator (sometimes called perpendicular bisectors), altitude, median and symmedian. - -\item ($x_1$,$y_1$) coordinates of the point $A_1$, ($x_A$,$y_A$) coordinates of the point $A$. - -\end{itemize} - - - - -\subsection{How to use the \tkzname{\tkznameofpack} package ?} -\subsubsection{Let's look at a classic example} -In order to show the right way, we will see how to build an equilateral triangle. Several possibilities are open to us, we are going to follow the steps of Euclid. - -\begin{itemize} -\item First of all you have to use a document class. The best choice to test your code is to create a single figure with the class \tkzname{standalone}\index{standalone}. -\begin{verbatim} -\documentclass{standalone} -\end{verbatim} -\item Then load the \tkzname{\tkznameofpack} package: -\begin{verbatim} -\usepackage{tkz-euclide} -\end{verbatim} - - You don't need to load \TIKZ\ because the \tkzname{\tkznameofpack} package works on top of TikZ and loads it. - \item {\color{red} \bomb \sout{|\BS usetkzobj{all}| }} - With the new version 3.03 you don't need this line anymore. All objects are now loaded. - \item Start the document and open a TikZ picture environment: -\begin{verbatim} -\begin{document} -\begin{tikzpicture} -\end{verbatim} - -\item Now we define two fixed points: -\begin{verbatim} -\tkzDefPoint(O,O){A} -\tkzDefPoint(5,2){B} -\end{verbatim} - -\item Two points define two circles, let's use these circles: - - circle with center $A$ through $B$ and circle with center $B$ through $A$. These two circles have two points in common. -\begin{verbatim} -\tkzInterCC(A,B)(B,A) -\end{verbatim} -We can get the points of intersection with -\begin{verbatim} -\tkzGetPoints{C}{D} -\end{verbatim} - -\item All the necessary points are obtained, we can move on to the final steps including the plots. -\begin{verbatim} -\tkzDrawCircles[gray,dashed](A,B B,A) -\tkzDrawPolygon(A,B,C)% The triangle -\end{verbatim} -\item Draw all points $A$, $B$, $C$ and $D$: -\begin{verbatim} -\tkzDrawPoints(A,...,D) -\end{verbatim} - -\item The final step, we print labels to the points and use options for positioning:\\ -\begin{verbatim} -\tkzLabelSegments[swap](A,B){$c$} -\tkzLabelPoints(A,B,D) -\tkzLabelPoints[above](C) -\end{verbatim} -\item We finally close both environments -\begin{verbatim} -\end{tikzpicture} -\end{document} -\end{verbatim} - -\item The complete code - -\begin{tkzexample}[latex=8cm,small] - \begin{tikzpicture}[scale=.5] - % fixed points - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,2){B} - % calculus - \tkzInterCC(A,B)(B,A) - \tkzGetPoints{C}{D} - % drawings - \tkzDrawCircles[gray,dashed](A,B B,A) - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,...,D) - % marking - \tkzMarkSegments[mark=s||](A,B B,C C,A) - % labelling - \tkzLabelSegments[swap](A,B){$c$} - \tkzLabelPoints(A,B,D) - \tkzLabelPoints[above](C) -\end{tikzpicture} -\end{tkzexample} - - \end{itemize} - -\subsubsection{\tkzname{Set, Calculate, Draw, Mark, Label}} -The title could have been: \texttt{Separation of Calculus and Drawings} - -When a document is prepared using the \LATEX\ system, the source code of the document can be divided into two parts: the document body and the preamble. -Under this methodology, publications can be structured, styled and typeset with minimal effort. -I propose a similar methodology for creating figures with \tkzname{\tkznameofpack}. - -The first part defines the fixed points, the second part allows the creation of new points. These are the two main parts. All that is left to do is to draw, mark and label. - - - - -\endinput - - - - - - - - - - - - - +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rapporteur.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rapporteur.tex index ebd7f3fd80..5ee7fd055c 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rapporteur.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rapporteur.tex @@ -12,7 +12,6 @@ options & default & definition \\ \end{tabular} \end{NewMacroBox} - \subsection{The circular protractor} Measuring in the forward direction @@ -39,6 +38,4 @@ Measuring in the forward direction \tkzProtractor[return](A,C) \end{tikzpicture} \end{tkzexample} - - \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rnd.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rnd.tex index 47a5bd70f0..9427fd8da3 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rnd.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-rnd.tex @@ -23,7 +23,7 @@ options & default & definition \\ \TOline{rectangle=pt1 and pt2} {}{[rectangle=A and B]} \TOline{segment= pt1--pt2} {}{[segment=A--B]} \TOline{line=pt1--pt2}{}{[line=A--B]} -\TOline{circle =center pt1 radius dim}{}{[circle = center A radius 2 cm]} +\TOline{circle =center pt1 radius dim}{}{[circle = center A radius 2]} \TOline{circle through=center pt1 through pt2}{}{[circle through= center A through B]} \TOline{disk through=center pt1 through pt2}{}{[disk through=center A through B]} \end{tabular} @@ -70,42 +70,24 @@ options & default & definition \\ \end{tkzexample} -\subsubsection{Example of random points} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzDefPoints{0/0/A,2/2/B,-1/-1/C} - \tkzDefCircle[through=](A,C) - \tkzGetLength{rAC} - \tkzDrawCircle(A,C) - \tkzDrawCircle(A,B) - \tkzDefRandPointOn[rectangle=A and B] - \tkzGetPoint{a} - \tkzDefRandPointOn[segment=A--B] - \tkzGetPoint{b} - \tkzDefRandPointOn[circle=center A radius \rAC pt] - \tkzGetPoint{d} - \tkzDefRandPointOn[circle through= center A through B] - \tkzGetPoint{c} - \tkzDefRandPointOn[disk through=center A through B] - \tkzGetPoint{e} - \tkzLabelPoints[above right=3pt](A,B,C,a,b,...,e) - \tkzDrawPoints[](A,B,C,a,b,...,e) - \tkzDrawRectangle(A,B) -\end{tikzpicture} -\end{tkzexample} -\subsection{Random point on a circle} + +\subsubsection{Random point on a circle} \begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] \tkzGrid - \tkzDefPoints{3/2/A,1/1/B} - \tkzCalcLength[cm](A,B) \tkzGetLength{rAB} - \tkzDrawCircle[R](A,\rAB cm) - \tkzDefRandPointOn[circle = center A radius - \rAB cm]\tkzGetPoint{a} - \tkzDrawSegment(A,a) - \tkzDrawPoints(A,B,a) - \tkzLabelPoints(A,B,a) +\begin{tikzpicture} +\tkzInit[ymin=-1,xmax=6,ymax=5] \tkzGrid +\tkzDefPoints{3/2/A,1/1/B} +\tkzCalcLength(A,B) \tkzGetLength{rAB} +\tkzDefRandPointOn[circle = center A radius \rAB] +\tkzGetPoint{a} +\tkzDefRandPointOn[circle through= center A through B] +\tkzGetPoint{b} +\tkzDefRandPointOn[disk through=center A through B] +\tkzGetPoint{c} +\tkzDrawCircle[R](A,\rAB) +\tkzDrawSegment(A,a) +\tkzDrawPoints(A,B,a,b,c) +\tkzLabelPoints(A,B,a,b,c) \end{tikzpicture} \end{tkzexample} @@ -118,21 +100,22 @@ options & default & definition \\ \tkzGetPoint{P} \tkzDefApolloniusPoint[K=\coeffK](A,B) \tkzGetPoint{M} + \tkzDefRandPointOn[circle through=% + center P through M] + \tkzGetPoint{N} \tkzDefApolloniusRadius[K=\coeffK](A,B) \tkzDrawCircle[R,color = blue!50!black, fill=blue!20, - opacity=.4](tkzPointResult,\tkzLengthResult pt) - \tkzDefRandPointOn[circle through= center P through M] - \tkzGetPoint{N} + opacity=.4](tkzPointResult,\tkzLengthResult) + \tkzLabelCircle[R,draw,fill=green!10,% + text width=3cm,% + text centered](P,\tkzLengthResult+1)(-120)% + { $MA/MB=\coeffK$\\$NA/NB=\coeffK$} \tkzDrawPoints(A,B,P,M,N) \tkzLabelPoints(A,B,P,M,N) \tkzDrawSegments[red](N,A N,B) \tkzDrawPoints(A,B) \tkzDrawSegments[red](A,B) - \tkzLabelCircle[R,draw,fill=green!10,% - text width=3cm,% - text centered](P,\tkzLengthResult pt-20pt)(-120)% - { $MA/MB=\coeffK$\\$NA/NB=\coeffK$} \end{tikzpicture} \end{tkzexample} @@ -141,34 +124,56 @@ options & default & definition \\ \subsection{Middle of a compass segment} To conclude this section, here is a more complex example. It involves determining the middle of a segment, using only a compass. -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=.75] +\begin{tikzpicture} \tkzDefPoint(0,0){A} - \tkzDefRandPointOn[circle= center A radius 4cm] + \tkzDefRandPointOn[circle= center A radius 4] \tkzGetPoint{B} - \tkzDrawPoints(A,B) \tkzDefPointBy[rotation= center A angle 180](B) \tkzGetPoint{C} - \tkzInterCC[R](A,4 cm)(B,4 cm) + \tkzInterCC[R](A,4)(B,4) \tkzGetPoints{I}{I'} - \tkzInterCC[R](A,4 cm)(I,4 cm) + \tkzInterCC[R](A,4)(I,4) \tkzGetPoints{J}{B} \tkzInterCC(B,A)(C,B) \tkzGetPoints{D}{E} \tkzInterCC(D,B)(E,B) \tkzGetPoints{M}{M'} - \tikzset{arc/.style={color=brown,style=dashed,delta=10}} - \tkzDrawArc[arc](C,D)(E) - \tkzDrawArc[arc](B,E)(D) - \tkzDrawCircle[color=brown,line width=.2pt](A,B) - \tkzDrawArc[arc](D,B)(M) - \tkzDrawArc[arc](E,M)(B) - \tkzCompasss[color=red,style=solid](B,I I,J J,C) - \tkzDrawPoints(B,C,D,E,M) + \tkzSetUpArc[color=teal,style=dashed,delta=10] + \tkzDrawArc(C,D)(E) + \tkzDrawArc(B,E)(D) + \tkzDrawCircle[color=teal,line width=.2pt](A,B) + \tkzDrawArc(D,B)(M) + \tkzDrawArc(E,M)(B) + \tkzCompasss[style=solid](B,I I,J J,C) + \tkzDrawPoints(A,B,C,D,E,M) + \tkzLabelPoints(A,B,M) + \end{tikzpicture} + +\begin{tkzexample}[code only,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDefRandPointOn[circle= center A radius 4] + \tkzGetPoint{B} + \tkzDefPointBy[rotation= center A angle 180](B) + \tkzGetPoint{C} + \tkzInterCC[R](A,4)(B,4) + \tkzGetPoints{I}{I'} + \tkzInterCC[R](A,4)(I,4) + \tkzGetPoints{J}{B} + \tkzInterCC(B,A)(C,B) + \tkzGetPoints{D}{E} + \tkzInterCC(D,B)(E,B) + \tkzGetPoints{M}{M'} + \tkzSetUpArc[ccolor=teal,style=dashed,delta=10] + \tkzDrawArc(C,D)(E) + \tkzDrawArc(B,E)(D) + \tkzDrawCircle[color=teal,line width=.2pt](A,B) + \tkzDrawArc(D,B)(M) + \tkzDrawArc(E,M)(B) + \tkzCompasss[color=orange,style=solid](B,I I,J J,C) + \tkzDrawPoints(A,B,C,D,E,M) \tkzLabelPoints(A,B,M) \end{tikzpicture} \end{tkzexample} -\endinput - -
\ No newline at end of file +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-sectors.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-sectors.tex deleted file mode 100644 index 030af8917f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-sectors.tex +++ /dev/null @@ -1,224 +0,0 @@ -\section{Sectors} -\subsection{\tkzcname{tkzDrawSector}} -\tkzHandBomb\ Attention the arguments vary according to the options. -\begin{NewMacroBox}{tkzDrawSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{towards}{towards}{$O$ is the center and the arc from $A$ to $(OB)$} -\TOline{rotate} {towards}{the arc starts from $A$ and the angle determines its length } -\TOline{R}{towards}{We give the radius and two angles} -\TOline{R with nodes}{towards}{We give the radius and two points} -\bottomrule -\end{tabular} - -\medskip -You have to add, of course, all the styles of \TIKZ\ for tracings... - -\medskip -\begin{tabular}{lll}% -\toprule -options & arguments & example \\ -\midrule -\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzDrawSector(O,A)(B)}} -\TOline{rotate} {\parg{pt,pt}\parg{an}}{\tkzcname{tkzDrawSector[rotate,color=red](O,A)(90)}} -\TOline{R}{\parg{pt,$r$}\parg{an,an}}{\tkzcname{tkzDrawSector[R,color=blue](O,2 cm)(30,90)}} -\TOline{R with nodes}{\parg{pt,$r$}\parg{pt,pt}}{\tkzcname{tkzDrawSector[R with nodes](O,2 cm)(A,B)}} -\bottomrule -\end{tabular} -\end{NewMacroBox} - -Here are a few examples: - -\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{towards}} -There's no need to put \tkzname{towards}. You can use \tkzname{fill} as an option. - -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzDrawSector[fill=red!50](O,A)(tkzPointResult) - \begin{scope}[shift={(-60:1cm)}] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzDrawSector[fill=blue!50](O,tkzPointResult)(A) - \end{scope} -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{rotate}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=2] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,2){A} - \tkzDrawSector[rotate,draw=red!50!black,% - fill=red!20](O,A)(30) - \tkzDrawSector[rotate,draw=blue!50!black,% - fill=blue!20](O,A)(-30) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{R}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDrawSector[R,draw=white,% - fill=red!50](O,2cm)(30,90) - \tkzDrawSector[R,draw=white,% - fill=red!60](O,2cm)(90,180) - \tkzDrawSector[R,draw=white,% - fill=red!70](O,2cm)(180,270) - \tkzDrawSector[R,draw=white,% - fill=red!90](O,2cm)(270,360) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{R}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){O} - \tkzDefPoint(4,-2){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(3,3){C} - \tkzDrawSector[R with nodes,% - fill=blue!20](O,1 cm)(B,C) - \tkzDrawSector[R with nodes,% - fill=red!20](O,1.25 cm)(A,B) -\tkzDrawSegments(O,A O,B O,C) -\tkzDrawPoints(O,A,B,C) -\tkzLabelPoints(A,B,C) -\tkzLabelPoints[left](O) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{\tkzcname{tkzDrawSector} and \tkzname{R with nodes}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} [scale=.5] - \tkzDefPoint(-1,-2){A} - \tkzDefPoint(1,3){B} - \tkzDefRegPolygon[side,sides=6](A,B) - \tkzGetPoint{O} - \tkzDrawPolygon[fill=black!10, - draw=blue](P1,P...,P6) - \tkzLabelRegPolygon[sep=1.05](O){A,...,F} - \tkzDrawCircle[dashed](O,A) - \tkzLabelSegment[above,sloped, - midway](A,B){\(A B = 16m\)} - \foreach \i [count=\xi from 1] in {2,...,6,1} - {% - \tkzDefMidPoint(P\xi,P\i) - \path (O) to [pos=1.1] node {\xi} (tkzPointResult) ; - } - \tkzDefRandPointOn[segment = P3--P5] - \tkzGetPoint{S} - \tkzDrawSegments[thick,dashed,red](A,S S,B) - \tkzDrawPoints(P1,P...,P6,S) - \tkzLabelPoint[left,above](S){$S$} - \tkzDrawSector[R with nodes,fill=red!20](S,2 cm)(A,B) - \tkzLabelAngle[pos=1.5](A,S,B){$\alpha$} -\end{tikzpicture} -\end{tkzexample} - -\subsection{\tkzcname{tkzFillSector}} -\tkzHandBomb\ Attention the arguments vary according to the options. -\begin{NewMacroBox}{tkzFillSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{towards}{towards}{$O$ is the center and the arc from $A$ to $(OB)$} -\TOline{rotate} {towards}{the arc starts from A and the angle determines its length } -\TOline{R}{towards}{We give the radius and two angles} -\TOline{R with nodes}{towards}{We give the radius and two points} -\bottomrule -\end{tabular} - -\medskip -Of course, you have to add all the styles of \TIKZ\ for the tracings... - -\medskip -\begin{tabular}{lll}% -\toprule -options & arguments & example \\ -\midrule -\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzFillSector(O,A)(B)}} -\TOline{rotate} {\parg{pt,pt}\parg{an}}{\tkzcname{tkzFillSector[rotate,color=red](O,A)(90)}} -\TOline{R}{\parg{pt,$r$}\parg{an,an}}{\tkzcname{tkzFillSector[R,color=blue](O,2 cm)(30,90)}} -\TOline{R with nodes}{\parg{pt,$r$}\parg{pt,pt}}{\tkzcname{tkzFillSector[R with nodes](O,2 cm)(A,B)}} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{\tkzcname{tkzFillSector} and \tkzname{towards}} -It is useless to put \tkzname{towards} and you will notice that the contours are not drawn, only the surface is colored. -\begin{tkzexample}[latex=5.75cm,small] -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzFillSector[fill=red!50](O,A)(tkzPointResult) - \begin{scope}[shift={(-60:1cm)}] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzFillSector[color=blue!50](O,tkzPointResult)(A) - \end{scope} -\end{tikzpicture} -\end{tkzexample} - - -\subsubsection{\tkzcname{tkzFillSector} and \tkzname{rotate}} -\begin{tkzexample}[latex=5.75cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} \tkzDefPoint(2,2){A} - \tkzFillSector[rotate,color=red!20](O,A)(30) - \tkzFillSector[rotate,color=blue!20](O,A)(-30) -\end{tikzpicture} -\end{tkzexample} - -\subsection{\tkzcname{tkzClipSector}} -\tkzHandBomb\ Attention the arguments vary according to the options. -\begin{NewMacroBox}{tkzClipSector}{\oarg{local options}\parg{O,\dots}\parg{\dots}}% -\begin{tabular}{lll}% -options & default & definition \\ -\midrule -\TOline{towards}{towards}{$O$ is the centre and the sector starts from $A$ to $(OB)$} -\TOline{rotate} {towards}{The sector starts from $A$ and the angle determines its amplitude. } -\TOline{R}{towards}{We give the radius and two angles} -\bottomrule -\end{tabular} - -\medskip -You have to add, of course, all the styles of \TIKZ\ for tracings... - -\medskip -\begin{tabular}{lll}% -\toprule -options & arguments & example \\ -\midrule -\TOline{towards}{\parg{pt,pt}\parg{pt}}{\tkzcname{tkzClipSector(O,A)(B)}} -\TOline{rotate} {\parg{pt,pt}\parg{angle}}{\tkzcname{tkzClipSector[rotate](O,A)(90)}} -\TOline{R}{\parg{pt,$r$}\parg{angle 1,angle 2}}{\tkzcname{tkzClipSector[R](O,2 cm)(30,90)}} -\end{tabular} -\end{NewMacroBox} - -\subsubsection{\tkzcname{tkzClipSector}} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(1,1){B} - \tkzDrawSector[color=blue,dashed](O,A)(B) - \tkzDrawSector[color=blue](O,B)(A) - \tkzClipBB - \begin{scope} - \tkzClipSector(O,B)(A) - \draw[fill=gray!20] (-1,0) rectangle (3,3); - \end{scope} - \tkzDrawPoints(A,B,O) -\end{tikzpicture} -\end{tkzexample} - -\endinput - diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-show.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-show.tex index f52a749430..3a35b4ba2b 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-show.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-show.tex @@ -163,49 +163,4 @@ You'll find this figure again, but without the construction features. \end{tikzpicture} \end{tkzexample} -%<----------------------------------------------------------------------> -\section{Different points} -%<----------------------------------------------------------------------> - -\subsection{\tkzcname{tkzDefEquiPoints}} -This macro makes it possible to obtain two points on a straight line equidistant from a given point. - -\begin{NewMacroBox}{tkzDefEquiPoints}{\oarg{local options}\parg{pt1,pt2}}% -\begin{tabular}{lll}% -arguments & default & definition \\ -\midrule -\TAline{(pt1,pt2)}{no default}{unordered list of two items} -\bottomrule -\end{tabular} - -\medskip -\begin{tabular}{lll}% -\toprule \\ -options & default & definition \\ -\midrule -\TOline{dist} {2 cm} {half the distance between the two points} -\TOline{from=pt} {no default} {reference point} -\TOline{show} {false} {if true displays compass traces} -\TOline{/compass/delta} {0} {compass trace size } - -\end{tabular} -\end{NewMacroBox} - -\subsubsection{Using \tkzcname{tkzDefEquiPoints} with options} -\begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture} - \tkzSetUpCompass[color=purple,line width=1pt] - \tkzDefPoint(0,1){A} - \tkzDefPoint(5,2){B} - \tkzDefPoint(3,4){C} - \tkzDefEquiPoints[from=C,dist=1,show, - /tkzcompass/delta=20](A,B) - \tkzGetPoints{E}{H} - \tkzDrawLines[color=blue](C,E C,H A,B) - \tkzDrawPoints[color=blue](A,B,C) - \tkzDrawPoints[color=red](E,H) - \tkzLabelPoints(E,H) - \tkzLabelPoints[color=blue](A,B,C) -\end{tikzpicture} -\end{tkzexample} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-styles.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-styles.tex new file mode 100644 index 0000000000..d28226ee97 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-styles.tex @@ -0,0 +1,333 @@ +\section{Predefined styles}\label{custom} +The way to proceed will depend on your use of the package. A method that seems to me to be correct is to use as much as possible predefined styles in order to separate the content from the form. This method will be the right one if you plan to create a document (like this documentation) with many figures. We will see how to define a global style for a document. We will see how to use a style locally. + +The file \tkzname{tkz-euclide.cfg} contains the predefined styles of the main objects. Among these the most important are points, lines, segments, circles, arcs and compass traces. + If you always use the same styles and if you create many figures then it is interesting to create your own styles . To do this you need to know what features you can modify. It will be necessary to know some notions of \TIKZ. + + The predefined styles are global styles. They exist before the creation of the figures. It is better to avoid changing them between two figures. On the other hand these styles can be modified in a figure temporarily. There the styles are defined locally and do not influence the other figures. + + For the document you are reading here is how I defined the different styles. + +\begin{tkzltxexample}[] + \tkzSetUpColors[background=white,text=black] + \tkzSetUpPoint[size=2,color=teal] + \tkzSetUpLine[line width=.4pt,color=teal] + \tkzSetUpCompass[color=orange, line width=.4pt,delta=10] + \tkzSetUpArc[color=gray,line width=.4pt] + \tkzSetUpStyle[orange]{new} +\end{tkzltxexample} + +The macro \tkzcname{tkzSetUpColors} allows you to set the background color as well as the text color. If you don't use it, the colors of your document will be used as well as the fonts. Let's see how to define the styles of the main objects. + +\section{Points style} +This is how the points are defined : +\begin{tkzltxexample}[] +\tikzset{point style/.style = {% + draw = \tkz@euc@pointcolor, + inner sep = 0pt, + shape = \tkz@euc@pointshape, + minimum size = \tkz@euc@pointsize, + fill = \tkz@euc@pointcolor}} +\end{tkzltxexample} + +It is of course possible to use \tkzcname{tikzset} but you can use a macro provided by the package. You can use the macro \tkzcname{tkzSetUpPoint} globally or locally, \\ Let's look at this possibility. + +\subsubsection{Use of \tkzcname{tkzSetUpPoint}} + +\begin{NewMacroBox}{tkzSetUpPoint}{\oarg{local options}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{color}{black}{point color} +\TOline{size}{3}{point size} +\TOline{fill}{black!50}{inside point color} +\TOline{shape}{circle}{point shape circle, cross or cross out} +\end{tabular} +\end{NewMacroBox} + + + +\subsubsection{Global style or local style} +First of all here is a figure created with the styles of my documentation, then the style of the points is modified within the environment \tkzNameEnv{tikzspicture}. + +You can use the macro \tkzcname{tkzSetUpPoint} globally or locally, If you place this macro in your preamble or before your first figure then the point style will be valid for all figures in your document. Il sera possible d'utiliser un autre style locallement en utilisant cette commande au sein d'un environnement \tkzNameEnv{tikzpicture}.\\ Let's look at this possibility. +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D} + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B) + \tkzLabelPoints[above right](C) +\end{tikzpicture} +\end{tkzexample} + +The style of the points is modified locally in the second figure +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzSetUpPoint[size=4,color=red,fill=red!20] + \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D} + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) + \tkzDrawPoint[shape=cross out,thick](D) + \tkzLabelPoints(A,B) + \tkzLabelPoints[above right](C) +\end{tikzpicture} +\end{tkzexample} + +The points get back the initial style. Point D has a new style limited by the environment \tkzNameEnv{scope}. It is also possible to use |{...}| orThe points get back the initial style. Point $D$ has a new style limited by the environment \tkzNameEnv{scope}. It is also possible to use |{...}| or |\begingoup ... \endgroup|. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D} + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) + \begin{scope} + \tkzSetUpPoint[size=4,color=red,fill=red!20] + \tkzDrawPoint(D) + \end{scope} + \tkzLabelPoints(A,B) + \tkzLabelPoints[above right](C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Simple example with \tkzcname{tkzSetUpPoint}} + +\begin{tkzexample}[latex=5cm,small] +\begin{tikzpicture} + \tkzSetUpPoint[shape = cross out,color=blue] + \tkzDefPoint(2,1){A} + \tkzDefPoint(4,0){B} + \tkzDrawLine(A,B) + \tkzDrawPoints(A,B) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Use of \tkzcname{tkzSetUpPoint} inside a group} +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,2/4/B,4/0/C,3/2/D} + \tkzDrawSegments(A,B A,C A,D) + {\tkzSetUpPoint[shape=cross out, + fill= teal!50, + size=4,color=teal] + \tkzDrawPoints(A,B)} + \tkzSetUpPoint[fill= teal!50,size=4, + color=teal] + \tkzDrawPoints(C,D) + \tkzLabelPoints(A,B,C,D) +\end{tikzpicture} +\end{tkzexample} + +\section{Lines style} + +\subsubsection{Use of \tkzcname{tkzSetUpLine}} \label{tkzsetupline} +It is a macro that allows you to define the style of all the lines. + +\begin{NewMacroBox}{tkzSetUpLine}{\oarg{local options}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{color}{black}{colour of the construction lines} +\TOline{line width}{0.4pt}{thickness of the construction lines} +\TOline{style}{solid}{style of construction lines} +\TOline{add}{.2 and .2}{changing the length of a line segment} +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Change line width} +\begin{tkzexample}[latex=8cm,small] +\begin{tikzpicture}[scale=.75] +\tkzSetUpLine[line width=1pt] +\begin{scope}[rotate=-90] + \tkzDefPoints{0/6/A,10/0/B,10/6/C} + \tkzDefPointBy[projection = onto B--A](C) + \tkzGetPoint{H} + \tkzMarkRightAngle[size=.4, + fill=teal!20](B,C,A) + \tkzMarkRightAngle[size=.4, + fill=orange!20](B,H,C) + \tkzDrawPolygon(A,B,C) + \tkzDrawSegment[new](C,H) +\end{scope} + \tkzLabelSegment[below](C,B){$a$} + \tkzLabelSegment[right](A,C){$b$} + \tkzLabelSegment[left](A,B){$c$} + \tkzLabelSegment[color=red](C,H){$h$} + \tkzDrawPoints(A,B,C) + \tkzLabelPoints[above left](H) + \tkzLabelPoints(B,C) + \tkzLabelPoints[above](A) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Change style of line} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.5] +\tikzset{line style/.style = {color = gray, + style=dashed}} +\tkzDefPoints{1/0/A,4/0/B,1/1/C,5/1/D} +\tkzDefPoints{1/2/E,6/2/F,0/4/A',3/4/B'} +\tkzCalcLength(C,D) +\tkzGetLength{rCD} +\tkzCalcLength(E,F) +\tkzGetLength{rEF} +\tkzInterCC[R](A',\rCD)(B',\rEF) +\tkzGetPoints{I}{J} +\tkzDrawLine(A',B') +\tkzCompass(A',B') +\tkzDrawSegments(A,B C,D E,F) +\tkzDrawCircles[R](A',{\rCD} B',\rEF) +\begin{scope} + \tkzSetUpLine[color=red] + \tkzDrawSegments(A',I B',I) +\end{scope} +\tkzDrawPoints(A,B,C,D,E,F,A',B',I,J) +\tkzLabelPoints(A,B,C,D,E,F,A',B',I,J) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Example 3: extend lines} +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture}[scale=.75] + \tkzSetUpLine[add=.5 and .5] + \tkzDefPoints{0/0/A,4/0/B,1/3/C} + \tkzDrawLines(A,B B,C A,C) + \tkzDrawPolygon[red,thick](A,B,C) + \tkzSetUpPoint[size=4,circle,color=red,fill=red!20] + \tkzDrawPoints(A,B,C) + \end{tikzpicture} +\end{tkzexample} + +\section{Arc style} + +\begin{NewMacroBox}{tkzSetUpArc}{\oarg{local options}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{color}{black}{colour of the lines} +\TOline{line width}{0.4pt}{thickness of the lines} +\TOline{style}{solid}{style of construction lines} +\end{tabular} +\end{NewMacroBox} + +\begin{tkzexample}[latex=7cm,small] + \begin{tikzpicture} + \def\r{3} \def\angle{200} + \tkzSetUpArc[delta=5,color=purple,style=dashed] + \tkzSetUpLabel[font=\scriptsize,red] + \tkzDefPoint(0,0){O} + \tkzDefPoint(\angle:\r){A} + \tkzInterCC(O,A)(A,O) \tkzGetPoints{C'}{C} + \tkzInterCC(O,A)(C,O) \tkzGetPoints{D'}{D} + \tkzInterCC(O,A)(D,O) \tkzGetPoints{X'}{X} + \tkzDrawCircle(O,A) + \tkzDrawArc(A,C')(C) + \tkzDrawArc(C,O)(D) + \tkzDrawArc(D,O)(X) + \tkzDrawLine[add=.1 and .1](A,X) + \tkzDrawPoints(O,A) + \tkzDrawPoints[new](C,C',D,X) + \tkzLabelPoints[below left](O,A) + \tkzLabelPoints[below](C,C') + \tkzLabelPoints[below right](X) + \tkzLabelPoints[above](D) + \end{tikzpicture} +\end{tkzexample} + +\section{Compass style, configuration macro \tkzcname{tkzSetUpCompass}} +The following macro will help to understand the construction of a figure by showing the compass traces necessary to obtain certain points. + +\begin{NewMacroBox}{tkzSetUpCompass}{\oarg{local options}}% +\begin{tabular}{lll}% +options & default & definition \\ +\midrule +\TOline{color}{black}{colour of the construction lines} +\TOline{line width}{0.4pt}{thickness of the construction lines} +\TOline{style}{solid}{style of lines : solid, dashed,dotted,...} +\TOline{delta}{0}{changes the length of the arc } +\end{tabular} +\end{NewMacroBox} + +\subsubsection{Use of \tkzcname{tkzSetUpCompass}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} + \tkzSetUpCompass[color=red,delta=15] + \tkzDefPoint(1,1){A} + \tkzDefPoint(6,1){B} + \tkzInterCC[R](A,4)(B,4) \tkzGetPoints{C}{D} + \tkzCompass(A,C) + \tkzCompass(B,C) + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Use of \tkzcname{tkzSetUpCompass} with \tkzcname{tkzShowLine}} + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] +\tkzSetUpStyle[bisector,size=2,gap=3]{showbi} +\tkzSetUpCompass[color=teal,line width=.3 pt] +\tkzDefPoints{0/1/A, 8/3/B, 3/6/C} +\tkzDrawPolygon(A,B,C) +\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} +\tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} +\tkzShowLine[showbi](B,A,C) +\tkzShowLine[showbi](C,B,A) +\tkzInterLL(A,a)(B,b) \tkzGetPoint{I} +\tkzDefPointBy[projection= onto A--B](I) +\tkzGetPoint{H} +\tkzDrawCircle[radius,new](I,H) +\tkzDrawSegments[new](I,H) +\tkzDrawLines[add=0 and .2,new](A,I B,I) +\end{tikzpicture} +\end{tkzexample} + + + + + +\section{Label style} +The macro \tkzcname{tkzSetUpLabel} is used to define the style of the point labels. +\begin{NewMacroBox}{tkzSetUpStyle}{\oarg{local options}}% + The options are the same as those of \TIKZ +\end{NewMacroBox} + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.75] + \tkzSetUpLabel[font=\scriptsize,red] + \tkzSetUpStyle[line width=1pt,teal,<->]{XY} + \tkzInit[xmin=-3,xmax=3,ymin=-3,ymax=3] + \tkzDrawX[XY] + \tkzDrawY[XY] + \tkzDefPoints{1/0/A,0/1/B,-1/0/C,0/-1/D} + \tkzDrawPoints[teal,fill=teal!30,size=6](A,...,D) + \tkzLabelPoint[above right](A){$(1,0)$} + \tkzLabelPoint[above right](B){$(0,1)$} + \tkzLabelPoint[above left](C){$(-1,0)$} + \tkzLabelPoint[below left](D){$(0,-1)$} +\end{tikzpicture} +\end{tkzexample} + + +\section{Own style} +You can set your own style with \tkzcname{tkzSetUpStyle} + +\begin{NewMacroBox}{tkzSetUpStyle}{\oarg{local options}}% + The options are the same as those of \TIKZ +\end{NewMacroBox} + +\begin{tkzexample}[latex=2cm,small] +\begin{tikzpicture} + \tkzSetUpStyle[color=blue!20!black,fill=blue!20]{mystyle} + \tkzDefPoint(0,0){O} + \tkzDefPoint(0,1){A} + \tkzDrawPoints(O) % general style + \tkzDrawPoints[mystyle,size=4](A) % my style + \tkzLabelPoints(O,A) +\end{tikzpicture} +\end{tkzexample} + +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-tools.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-tools.tex index 819b57dc77..d0d36fea4e 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-tools.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-tools.tex @@ -5,6 +5,7 @@ This involves constructing a segment on a given half-line of the same length as \begin{NewMacroBox}{tkzDuplicateSegment}{\parg{pt1,pt2}\parg{pt3,pt4}\marg{pt5}}% This involves creating a segment on a given half-line of the same length as a given segment . It is in fact the definition of a point. \tkzcname{tkzDuplicateSegment} is the new name of \tkzcname{tkzDuplicateLen}. + \medskip \begin{tabular}{lll}% \toprule @@ -20,24 +21,21 @@ The macro \tkzcname{tkzDuplicateLength} is identical to this one. \end{NewMacroBox} \begin{tkzexample}[latex=6cm,small] - \begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,-3){B} - \tkzDefPoint(2,5){C} - \tkzDrawSegments[red](A,B A,C) - \tkzDuplicateSegment(A,B)(A,C) - \tkzGetPoint{D} - \tkzDrawSegment[green](A,D) - \tkzDrawPoints[color=red](A,B,C,D) - \tkzLabelPoints[above right=3pt](A,B,C,D) - \end{tikzpicture} +\begin{tikzpicture}[scale=.5] + \tkzDefPoints{0/0/A,2/-3/B,2/5/C} + \tkzDuplicateSegment(A,B)(A,C) + \tkzGetPoint{D} + \tkzDrawSegments[new](A,B A,C) + \tkzDrawSegment[teal](A,D) + \tkzDrawPoints[new](A,B,C,D) + \tkzLabelPoints[above right=3pt](A,B,C,D) +\end{tikzpicture} \end{tkzexample} \subsubsection{Proportion of gold with \tkzcname{tkzDuplicateSegment}} \begin{tkzexample}[latex=7cm,small] -\begin{tikzpicture}[rotate=-90,scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(10,0){B} +\begin{tikzpicture}[rotate=-90,scale=.4] + \tkzDefPoints{0/0/A,10/0/B} \tkzDefMidPoint(A,B) \tkzGetPoint{I} \tkzDefPointWith[orthogonal,K=-.75](B,A) @@ -49,8 +47,33 @@ The macro \tkzcname{tkzDuplicateLength} is identical to this one. \tkzDrawArc[orange,delta=10](A,M)(E) \tkzDrawLines(A,B B,C A,D) \tkzDrawArc[orange,delta=10](B,D)(I) - \tkzDrawPoints(A,B,D,C,M,I,N) - \tkzLabelPoints(A,B,D,C,M,I,N) + \tkzDrawPoints(A,B,D,C,M,I) + \tkzLabelPoints(A,B,D,C,M,I) +\end{tikzpicture} +\end{tkzexample} + +\subsubsection{Golden triangle or sublime triangle} +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{0/0/A,5/0/C,0/5/B} + \tkzDefMidPoint(A,C)\tkzGetPoint{H} + \tkzDuplicateSegment(H,B)(H,A)\tkzGetPoint{D} + \tkzDuplicateSegment(A,D)(A,B)\tkzGetPoint{E} + \tkzDuplicateSegment(A,D)(B,A)\tkzGetPoint{G} + \tkzInterCC(A,C)(B,G)\tkzGetSecondPoint{F} + \tkzDrawLine(A,C) + \tkzDrawArc(A,C)(B) + \begin{scope}[arc style/.style={color=gray,% + style=dashed}] + \tkzDrawArc(H,B)(D) + \tkzDrawArc(A,D)(B) + \tkzDrawArc(B,G)(F) + \end{scope} + \tkzDrawSegment[dashed](H,B) + \tkzCompass(B,F) + \tkzDrawPolygon[new](A,B,F) + \tkzDrawPoints(A,...,H) + \tkzLabelPoints(A,...,H) \end{tikzpicture} \end{tkzexample} @@ -60,15 +83,16 @@ There's an option in \TIKZ\ named \tkzname{veclen}. This option The only problem for me is that the version of \TIKZ\ is not accurate enough in some cases. My version uses the \tkzNamePack{xfp} package and is slower, but more accurate. -\begin{NewMacroBox}{tkzCalcLength}{\oarg{local options}\parg{pt1,pt2}\marg{name of macro}}% -The result is stored in a macro. +\begin{NewMacroBox}{tkzCalcLength}{\oarg{local options}\parg{pt1,pt2}}% +You can store the result with the macro \tkzcname{tkzGetLength} for example \tkzcname{tkzGetLength\{dAB\}} \\ +defines the macro \tkzcname{dAB}. \medskip \begin{tabular}{lll}% \toprule arguments & example & explication \\ \midrule -\TAline{(pt1,pt2)\{name of macro\}} {\tkzcname{tkzCalcLength}(A,B)\{dAB\}}{\tkzcname{dAB} gives $AB$ in pt} +\TAline{(pt1,pt2)\{name of macro\}} {\tkzcname{tkzCalcLength}[pt](A,B)}{\tkzcname{dAB} gives $AB$ in pt} \bottomrule \end{tabular} @@ -80,7 +104,7 @@ Only one option \toprule options & default & example \\ \midrule -\TOline{cm} {false}{\tkzcname{tkzCalcLength}[cm](A,B)\{dAB\} \tkzcname{dAB} gives $AB$ in cm} +\TOline{cm} {true}{\tkzcname{tkzCalcLength}(A,B) After \tkzcname{tkzGetLength\{dAB\}} \tkzcname{dAB} gives $AB$ in cm} \end{tabular} \end{NewMacroBox} @@ -89,13 +113,16 @@ Only one option \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=1] \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDrawLine[add= .6 and .2](A,B) - \tkzCalcLength[cm](A,B)\tkzGetLength{dAB} + \tkzCalcLength(A,B)\tkzGetLength{dAB} \tkzDefLine[perpendicular=through A](A,B) - \tkzDrawLine(A,tkzPointResult) \tkzGetPoint{D} + \tkzGetPoint{D} + \tkzDefPointWith[orthogonal,K=-1](B,A) + \tkzGetPoint{F} + \tkzGetPoint{C} + \tkzDrawLine[add= .6 and .2](A,B) + \tkzDrawLine(A,D) \tkzShowLine[orthogonal=through A,gap=2](A,B) \tkzMarkRightAngle(B,A,D) - \tkzVecKOrth[-1](B,A)\tkzGetPoint{C} \tkzCompasss(A,D D,C) \tkzDrawArc[R](B,\dAB)(80,110) \tkzDrawPoints(A,B,C,D) @@ -105,51 +132,60 @@ Only one option \end{tkzexample} -\subsection{Transformation from pt to cm} +\subsubsection{Example} +The macro \tkzcname{tkzDefCircle[radius](A,B)} defines the radius that we retrieve with \tkzcname{tkzGetLength}, this result is in \tkzname{cm}. + +\begin{tkzexample}[latex=6cm,small] +\begin{tikzpicture}[scale=.5] + \tkzDefPoint(0,0){A} + \tkzDefPoint(3,-4){B} + \tkzDefCircle[through](A,B) + \tkzGetLength{rABcm} + \tkzDrawCircle(A,B) + \tkzDrawPoints(A,B) + \tkzLabelPoints(A,B) + \tkzDrawSegment[dashed](A,B) + \tkzLabelSegment(A,B){$\pgfmathprintnumber{\rABcm}$} +\end{tikzpicture} +\end{tkzexample} + + +\subsection{Transformation from pt to cm or cm to pt} Not sure if this is necessary and it is only a division by 28.45274 and a multiplication by the same number. The macros are: \begin{NewMacroBox}{tkzpttocm}{\parg{nombre}\marg{name of macro}}% +The result is stored in a macro. + +\medskip \begin{tabular}{lll}% -arguments & example & explication \\ +\toprule +arguments & example & explication \\ \midrule -\TAline{(number){name of macro}} {\tkzcname{tkzpttocm}(120)\{len\}}{\tkzcname{len} gives a number of \tkzname{cm}} +\TAline{(nombre){name of macro}} {\tkzcname{tkzpttocm}(120)\{len\}}{\tkzcname{len} donne un nombre de tkzname{cm}} \bottomrule \end{tabular} \medskip -You'll have to use \tkzcname{len} along with \tkzname{cm}. The result is stored in a macro. +You'll have to use \tkzcname{len} along with \tkzname{cm}. \end{NewMacroBox} -\subsection{Transformation from cm to pt} +\subsection{Change of unit} \begin{NewMacroBox}{tkzcmtopt}{\parg{nombre}\marg{name of macro}}% -\begin{tabular}{lll}% +The result is stored in a macro. + +\medskip +\begin{tabular}{lll} +\toprule arguments & example & explication \\ \midrule -\TAline{(nombre)\{name of macro\}}{\tkzcname{tkzcmtopt}(5)\{len\}}{\tkzcname{len} length in \tkzname{pt}} +\TAline{(nombre)\{name of macro\}}{\tkzcname{tkzcmtopt}(5)\{len\}}{\tkzcname{len} longueur en \tkzname{pts}} \bottomrule \end{tabular} \medskip -The result is stored in a macro. The result can be used with \tkzcname{len} \tkzname{pt}. +\noindent{The result can be used with \tkzcname{len}\tkzname{pt}} \end{NewMacroBox} -\subsubsection{Example} -The macro \tkzcname{tkzDefCircle[radius](A,B)} defines the radius that we retrieve with \tkzcname{tkzGetLength}, but this result is in \tkzname{pt}. - -\begin{tkzexample}[latex=6cm,small] -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,-4){B} - \tkzDefCircle[through](A,B) - \tkzGetLength{rABpt} - \tkzpttocm(\rABpt){rABcm} - \tkzDrawCircle(A,B) - \tkzDrawPoints(A,B) - \tkzLabelPoints(A,B) - \tkzDrawSegment[dashed](A,B) - \tkzLabelSegment(A,B){$\pgfmathprintnumber{\rABcm}$} -\end{tikzpicture} -\end{tkzexample} \subsection{Get point coordinates} %<--------------------------------------------------------------------------–> @@ -176,7 +212,7 @@ Stores in two macros the coordinates of a point. If the name of the macro is \tk \begin{tikzpicture} \tkzInit[xmax=5,ymax=3] \tkzGrid[sub,orange] - \tkzAxeXY + \tkzDrawX \tkzDrawY \tkzDefPoint(1,0){A} \tkzDefPoint(4,2){B} \tkzGetPointCoord(A){a} @@ -201,5 +237,4 @@ Stores in two macros the coordinates of a point. If the name of the macro is \tk \tkzDrawSegment[->,purple](b,c) \end{tikzpicture} \end{tkzexample} - -\endinput
\ No newline at end of file +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-triangles.tex b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-triangles.tex index 038e93892c..5becdf0e2f 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-triangles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-triangles.tex @@ -7,12 +7,13 @@ The following macros will allow you to define or construct a triangle from \tkzn \begin{itemize} \item \tkzname{two angles} determines a triangle with two angles; \item \tkzname{equilateral} determines an equilateral triangle; +\item \tkzname{isosceles right} determines an isoxsceles right triangle; \item \tkzname{half} determines a right-angled triangle such that the ratio of the measurements of the two adjacent sides to the right angle is equal to $2$; \item \tkzname{pythagore} determines a right-angled triangle whose side measurements are proportional to 3, 4 and 5; \item \tkzname{school} determines a right-angled triangle whose angles are 30, 60 and 90 degrees; \item \tkzname{golden} determines a right-angled triangle such that the ratio of the measurements on the two adjacent sides to the right angle is equal to $\Phi=1.618034$, I chose "golden triangle" as the denomination because it comes from the golden rectangle and I kept the denomination "gold triangle" or "Euclid's triangle" for the isosceles triangle whose angles at the base are 72 degrees; -\item \tkzname{euclide} or \tkzname{gold} for the gold triangle; +\item \tkzname{euclid} or \tkzname{gold} for the gold triangle; in the previous version the option was "euclide" with an "e". \item \tkzname{cheops} determines a third point such that the triangle is isosceles with side measurements proportional to $2$, $\Phi$ and $\Phi$. \end{itemize} @@ -26,13 +27,14 @@ The points are ordered because the triangle is constructed following the direct options & default & definition \\ \midrule \TOline{two angles= \#1 and \#2}{no defaut}{triangle knowing two angles} -\TOline{equilateral} {no defaut}{equilateral triangle } -\TOline{pythagore}{no defaut}{proportional to the pythagorean triangle 3-4-5} -\TOline{school} {no defaut}{angles of 30, 60 and 90 degrees } -\TOline{gold}{no defaut}{angles of 72, 72 and 36 degrees, $A$ is the apex} -\TOline{euclide} {no defaut}{same as above but $[AB]$ is the base} -\TOline{golden} {no defaut}{B rectangle and $AB/AC = \Phi$} -\TOline{cheops} {no defaut}{AC=BC, AC and BC are proportional to $2$ and $\Phi$.} +\TOline{equilateral} {equilateral}{equilateral triangle } +\TOline{isosceles right} {equilateral}{isosceles right triangle } +\TOline{pythagore}{equilateral}{proportional to the pythagorean triangle 3-4-5} +\TOline{school} {equilateral}{angles of 30, 60 and 90 degrees } +\TOline{gold}{equilateral}{angles of 72, 72 and 36 degrees, $A$ is the apex} +\TOline{euclid} {equilateral}{same as above but $[AB]$ is the base} +\TOline{golden} {equilateral}{B rectangle and $AB/AC = \Phi$} +\TOline{cheops} {equilateral}{AC=BC, AC and BC are proportional to $2$ and $\Phi$.} \bottomrule \end{tabular} @@ -40,130 +42,134 @@ options & default & definition \\ \tkzcname{tkzGetPoint} allows you to store the point otherwise \tkzname{tkzPointResult} allows for immediate use. \end{NewMacroBox} -\subsubsection{Option \tkzname{golden}} +\subsubsection{Option \tkzname{two angles}} \begin{tkzexample}[latex=6 cm,small] -\begin{tikzpicture}[scale=.8] -\tkzInit[xmax=5,ymax=3] \tkzClip[space=.5] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefTriangle[golden](A,B)\tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B) \tkzDrawBisector(A,C,B) - \tkzLabelPoints[above](C) -\end{tikzpicture} -\end{tkzexample} - -\subsubsection{Option \tkzname{equilateral}} -\begin{tkzexample}[latex=7 cm,small] \begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,0){B} - \tkzDefTriangle[equilateral](A,B) - \tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzDefTriangle[equilateral](B,A) - \tkzGetPoint{D} - \tkzDrawPolygon(B,A,D) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(A,B,C,D) +\tkzDefPoint(0,0){A} +\tkzDefPoint(5,0){B} +\tkzDefTriangle[two angles = 50 and 70](A,B) +\tkzGetPoint{C} +\tkzDrawSegment(A,B) +\tkzDrawPoints(A,B) +\tkzLabelPoints(A,B) +\tkzDrawSegments[new](A,C B,C) +\tkzDrawPoints[new](C) +\tkzLabelPoints[above,new](C) +\tkzLabelAngle[pos=1.4](B,A,C){$50^\circ$} +\tkzLabelAngle[pos=0.8](C,B,A){$70^\circ$} \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{gold} or \tkzname{euclide} } -\begin{tkzexample}[latex=7 cm,small] +\subsubsection{Option \tkzname{school}} +The angles are 30, 60 and 90 degrees. + +\begin{tkzexample}[latex=6 cm,small] \begin{tikzpicture} - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefTriangle[euclide](A,B)\tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B) - \tkzLabelPoints[above](C) - \tkzDrawBisector(A,C,B) + \tkzDefPoints{0/0/A,4/0/B} + \tkzDefTriangle[school](A,B) + \tkzGetPoint{C} + \tkzMarkRightAngles(C,B,A) + \tkzLabelAngle[pos=0.8](B,A,C){$30^\circ$} + \tkzLabelAngle[pos=0.8](C,B,A){$90^\circ$} + \tkzLabelAngle[pos=0.8](A,C,B){$60^\circ$} + \tkzDrawSegments(A,B) + \tkzDrawSegments[new](A,C B,C) \end{tikzpicture} \end{tkzexample} -\newpage -\subsection{Drawing of triangles} - \begin{NewMacroBox}{tkzDrawTriangle}{\oarg{local options}\parg{A,B}}% -Macro similar to the previous macro but the sides are drawn. - -\medskip -\begin{tabular}{lll}% -\toprule -options & default & definition \\ -\midrule -\TOline{two angles= \#1 and \#2}{equilateral}{triangle knowing two angles} -\TOline{equilateral} {equilateral}{equilateral triangle } -\TOline{pythagore}{equilateral}{proportional to the pythagorean triangle 3-4-5} -\TOline{school} {equilateral}{the angles are 30, 60 and 90 degrees } -\TOline{gold}{equilateral}{the angles are 72, 72 and 36 degrees, $A$ is the vertex } -\TOline{euclide} {equilateral}{identical to the previous one but $[AB]$ is the base} -\TOline{golden} {equilateral}{B rectangle and $AB/AC = \Phi$} -\TOline{cheops} {equilateral}{isosceles in C and $AC/AB = \frac{\Phi}{2}$} -\bottomrule - \end{tabular} - -\medskip -In all its definitions, the dimensions of the triangle depend on the two starting points. -\end{NewMacroBox} - \subsubsection{Option \tkzname{pythagore}} This triangle has sides whose lengths are proportional to 3, 4 and 5. \begin{tkzexample}[latex=6 cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,0){B} - \tkzDrawTriangle[pythagore,fill=blue!30](A,B) - \tkzMarkRightAngles(A,B,tkzPointResult) +\begin{tikzpicture} + \tkzDefPoints{0/0/A,4/0/B} + \tkzDefTriangle[pythagore](A,B) + \tkzGetPoint{C} + \tkzDrawSegments(A,B) + \tkzDrawSegments[new](A,C B,C) + \tkzMarkRightAngles(A,B,C) + \tkzLabelPoint[above,new](C){$C$} + \tkzDrawPoints[new](C) + \tkzDrawPoints(A,B) + \tkzLabelPoints(A,B) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{school}} -The angles are 30, 60 and 90 degrees. - +\subsubsection{Option \tkzname{golden}} \begin{tkzexample}[latex=6 cm,small] -\begin{tikzpicture} - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDrawTriangle[school,fill=red!30](A,B) - \tkzMarkRightAngles(tkzPointResult,B,A) +\begin{tikzpicture}[scale=.8] +\tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} +\tkzDefTriangle[golden](A,B)\tkzGetPoint{C} +\tkzDefSpcTriangle[in,name=M](A,B,C){a,b,c} +\tkzDrawPolygon(A,B,C) +\tkzDrawPoints(A,B) +\tkzDrawSegment(C,Mc) +\tkzDrawPoints[new](C) +\tkzLabelPoints(A,B) +\tkzLabelPoints[above,new](C) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{golden}} -\begin{tkzexample}[latex=6 cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,-10){M} - \tkzDefPoint(3,-10){N} - \tkzDrawTriangle[golden,color=brown](M,N) +\subsubsection{Option \tkzname{equilateral} and \tkzname{isosceles right}} +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture} + \tkzDefPoint(0,0){A} + \tkzDefPoint(4,0){B} + \tkzDefTriangle[equilateral](A,B) + \tkzGetPoint{C} + \tkzDefTriangle[isosceles right](A,B) + \tkzGetPoint{E} + \tkzDrawPolygons(A,B,C A,B,E) + \tkzDefTriangle[equilateral](B,A) + \tkzGetPoint{D} + \tkzDrawPolygon(B,A,D) + \tkzMarkRightAngles(B,E,A) + \tkzDrawPoints(A,B,C,D,E) + \tkzLabelPoints(A,B,C,D,E) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{gold}} -\begin{tkzexample}[latex=6 cm,small] -\begin{tikzpicture}[scale=1] - \tkzDefPoint(5,-5){I} - \tkzDefPoint(8,-5){J} - \tkzDrawTriangle[gold,color=blue!50](I,J) +\subsubsection{Option \tkzname{gold} } +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture} + \tkzDefPoints{0/0/A,4/0/B} + \tkzDefTriangle[gold](A,B) + \tkzGetPoint{C} + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B) + \tkzLabelPoints[above](C) + \tkzLabelAngle[pos=0.8](B,A,C){$36^\circ$} + \tkzLabelAngle[pos=0.8](C,B,A){$72^\circ$} + \tkzLabelAngle[pos=0.8](A,C,B){$72^\circ$} \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{euclide}} -\begin{tkzexample}[latex=6 cm,small] - \begin{tikzpicture}[scale=1] - \tkzDefPoint(10,-5){K} - \tkzDefPoint(13,-5){L} - \tkzDrawTriangle[euclide,color=blue,fill=blue!10](K,L) - \end{tikzpicture} -\end{tkzexample} +\subsubsection{Option \tkzname{euclid}} +\tkzimp{Euclid} and \tkzimp{gold} are identical but the segment AB is a base in one and a side in the other. + +\begin{tkzexample}[latex=7 cm,small] +\begin{tikzpicture}[scale=.75] + \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} + \tkzDefTriangle[euclid](A,B)\tkzGetPoint{C} + \tkzDrawPolygon(A,B,C) + \tkzDrawPoints(A,B,C) + \tkzLabelPoints(A,B) + \tkzLabelPoints[above](C) + \tkzLabelAngle[pos=0.8](B,A,C){$72^\circ$} + \tkzLabelAngle[pos=0.8](C,B,A){$72^\circ$} + \tkzLabelAngle[pos=0.8](A,C,B){$36^\circ$} +\end{tikzpicture} +\end{tkzexample} \section{Specific triangles with \tkzcname{tkzDefSpcTriangle}} The centers of some triangles have been defined in the "points" section, here it is a question of determining the three vertices of specific triangles. -\begin{NewMacroBox}{tkzDefSpcTriangle}{\oarg{local options}\parg{A,B,C}} -The order of the points is important! +\begin{NewMacroBox}{tkzDefSpcTriangle}{\oarg{local options}\parg{p1,p2,p3}\marg{r1,r2,r3}} +The order of the points is important! p1p2p3 defines a triangle then the result is a triangle whose vertices have as reference a combination with \tkzname{name} and r1,r2, r3. If \tkzname{name} is empty then the references are r1,r2 and r3. \medskip @@ -171,25 +177,36 @@ The order of the points is important! \toprule options & default & definition \\ \midrule -\TOline{in or incentral}{centroid}{two-angled triangle} -\TOline{ex or excentral} {centroid}{equilateral triangle } -\TOline{extouch}{centroid}{proportional to the pythagorean triangle 3-4-5} -\TOline{intouch or contact} {centroid}{ 30, 60 and 90 degree angles } -\TOline{centroid or medial}{centroid}{ angles of 72, 72 and 36 degrees, $A$ is the vertex } -\TOline{orthic} {centroid}{same as above but $[AB]$ is the base} -\TOline{feuerbach} {centroid}{B rectangle and $AB/AC = \Phi$} -\TOline{euler} {centroid}{AC=BC, AC and BC are proportional to $2$ and $\Phi$.} -\TOline{tangential} {centroid}{AC=BC, AC and BC are proportional to $2$ and $\Phi$.} -\TOline{name} {no defaut}{AC=BC, AC and BC are proportional to $2$ and $\Phi$.} +\TOline{orthic} {centroid}{determined by endpoints of the altitudes ...} +\TOline{centroid or medial}{centroid}{intersection of the triangle's three triangle medians} +\TOline{in or incentral}{centroid}{determined with the angle bisectors} +\TOline{ex or excentral} {centroid}{determined with the excenters} +\TOline{extouch}{centroid}{formed by the points of tangency with the excircles} +\TOline{intouch or contact} {centroid}{formed by the points of tangency of the incircle} +\TOline{} {}{each of the vertices} +\TOline{euler} {centroid}{formed by Euler points on the nine-point circle} +\TOline{symmedial} {centroid}{intersection points of the symmedians} +\TOline{tangential}{centroid}{formed by the lines tangent to the circumcircle} +\TOline{feuerbach} {centroid}{formed by the points of tangency of the nine-point ...} +\TOline{} {} {circle with the excircles} +\TOline{name} {empty}{used to name the vertices} \midrule \end{tabular} -\medskip -\tkzcname{tkzGetPoint} allows you to store the point otherwise \tkzname{tkzPointResult} allows for immediate use. \end{NewMacroBox} -\subsubsection{Option \tkzname{medial} or \tkzname{centroid} } -The geometric centroid of the polygon vertices of a triangle is the point $G$ (sometimes also denoted $M$) which is also the intersection of the triangle's three triangle medians. The point is therefore sometimes called the median point. The centroid is always in the interior of the triangle.\\ +\subsection{How to name the vertices} + +With \tkzcname{tkzDefSpcTriangle[medial,name=M](A,B,C)\{\_A,\_B,\_C\}} you get three vertices named $M_A$, $M_B$ and $M_C$. + +With \tkzcname{tkzDefSpcTriangle[medial](A,B,C)\{a,b,c\}} you get three vertices named and labeled $a$, $b$ and $c$. + +Possible \tkzcname{tkzDefSpcTriangle[medial,name=M\_](A,B,C)\{A,B,C\}} you get three vertices named $M_A$, $M_B$ and $M_C$. + +\subsection{Option \tkzname{medial} or \tkzname{centroid} } +The geometric centroid of the polygon vertices of a triangle is the point $G$ (sometimes also denoted $M$) which is also the intersection of the triangle's three triangle medians. The point is therefore sometimes called the median point. The centroid is always in the interior of the triangle. +\\ + \href{http://mathworld.wolfram.com/TriangleCentroid.html}{Weisstein, Eric W. "Centroid triangle" From MathWorld--A Wolfram Web Resource.} In the following example, we obtain the Euler circle which passes through the previously defined points. @@ -198,24 +215,25 @@ In the following example, we obtain the Euler circle which passes through the pr \begin{tikzpicture}[rotate=90,scale=.75] \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} \tkzDefTriangleCenter[centroid](A,B,C) - \tkzGetPoint{M} + \tkzGetPoint{M} \tkzDefSpcTriangle[medial,name=M](A,B,C){_A,_B,_C} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawSegments[dashed,red](A,M_A B,M_B C,M_C) - \tkzDrawPolygon[color=red](M_A,M_B,M_C) - \tkzDrawPoints(A,B,C,M) - \tkzDrawPoints[red](M_A,M_B,M_C) -\tkzAutoLabelPoints[center=M,font=\scriptsize]% + \tkzDrawPolygon(A,B,C) + \tkzDrawSegments[dashed,new](A,M_A B,M_B C,M_C) + \tkzDrawPolygon[new](M_A,M_B,M_C) + \tkzDrawPoints(A,B,C) + \tkzDrawPoints[new](M,M_A,M_B,M_C) + \tkzAutoLabelPoints[center=M,font=\scriptsize]% (A,B,C,M_A,M_B,M_C) \tkzLabelPoints[font=\scriptsize](M) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{in} or \tkzname{incentral} } +\subsection{Option \tkzname{in} or \tkzname{incentral} } The incentral triangle is the triangle whose vertices are determined by the intersections of the reference triangle’s angle bisectors with the -respective opposite sides.\\ +respective opposite sides. +\\ \href{http://mathworld.wolfram.com/ContactTriangle.html}{Weisstein, Eric W. "Incentral triangle" From MathWorld--A Wolfram Web Resource.} @@ -224,19 +242,19 @@ respective opposite sides.\\ \tkzDefPoints{ 0/0/A,5/0/B,1/3/C} \tkzDefSpcTriangle[in,name=I](A,B,C){_a,_b,_c} \tkzInCenter(A,B,C)\tkzGetPoint{I} - \tkzDrawPolygon[red](A,B,C) - \tkzDrawPolygon[blue](I_a,I_b,I_c) + \tkzDrawPolygon(A,B,C) + \tkzDrawPolygon[new](I_a,I_b,I_c) \tkzDrawPoints(A,B,C,I,I_a,I_b,I_c) \tkzDrawCircle[in](A,B,C) - \tkzDrawSegments[dashed](A,I_a B,I_b C,I_c) - \tkzAutoLabelPoints[center=I, - blue,font=\scriptsize](I_a,I_b,I_c) - \tkzAutoLabelPoints[center=I,red, - font=\scriptsize](A,B,C,I_a,I_b,I_c) + \tkzDrawSegments[dashed,new](A,I_a B,I_b C,I_c) + \tkzAutoLabelPoints[center=I,% + new,font=\scriptsize](I_a,I_b,I_c) + \tkzAutoLabelPoints[center=I, + font=\scriptsize](A,B,C) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{ex} or \tkzname{excentral} } +\subsection{Option \tkzname{ex} or \tkzname{excentral} } The excentral triangle of a triangle $ABC$ is the triangle $J_aJ_bJ_c$ with vertices corresponding to the excenters of $ABC$. @@ -245,33 +263,33 @@ The excentral triangle of a triangle $ABC$ is the triangle $J_aJ_bJ_c$ with vert \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} \tkzDefSpcTriangle[excentral,name=J](A,B,C){_a,_b,_c} \tkzDefSpcTriangle[extouch,name=T](A,B,C){_a,_b,_c} - \tkzDrawPolygon[blue](A,B,C) - \tkzDrawPolygon[red](J_a,J_b,J_c) + \tkzDrawPolygon(A,B,C) + \tkzDrawPolygon[new](J_a,J_b,J_c) + \tkzClipBB \tkzDrawPoints(A,B,C) - \tkzDrawPoints[red](J_a,J_b,J_c) + \tkzDrawPoints[new](J_a,J_b,J_c) \tkzLabelPoints(A,B,C) - \tkzLabelPoints[red](J_b,J_c) - \tkzLabelPoints[red,above](J_a) - \tkzClipBB \tkzShowBB + \tkzLabelPoints[new](J_b,J_c) + \tkzLabelPoints[new,above](J_a) \tkzDrawCircles[gray](J_a,T_a J_b,T_b J_c,T_c) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{intouch}} +\subsection{Option \tkzname{intouch} or \tkzname{contact}} The contact triangle of a triangle $ABC$, also called the intouch triangle, is the triangle formed by the points of tangency of the incircle of $ABC$ with $ABC$.\\ \href{http://mathworld.wolfram.com/ContactTriangle.html}{Weisstein, Eric W. "Contact triangle" From MathWorld--A Wolfram Web Resource.} We obtain the intersections of the bisectors with the sides. \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} + \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} \tkzDefSpcTriangle[intouch,name=X](A,B,C){_a,_b,_c} \tkzInCenter(A,B,C)\tkzGetPoint{I} - \tkzDrawPolygon[red](A,B,C) - \tkzDrawPolygon[blue](X_a,X_b,X_c) - \tkzDrawPoints[red](A,B,C) - \tkzDrawPoints[blue](X_a,X_b,X_c) + \tkzDrawPolygon(A,B,C) + \tkzDrawPolygon[new](X_a,X_b,X_c) + \tkzDrawPoints(A,B,C) + \tkzDrawPoints[new](X_a,X_b,X_c) \tkzDrawCircle[in](A,B,C) \tkzAutoLabelPoints[center=I,blue,font=\scriptsize]% (X_a,X_b,X_c) @@ -280,7 +298,7 @@ We obtain the intersections of the bisectors with the sides. \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{extouch}} +\subsection{Option \tkzname{extouch}} The extouch triangle $T_aT_bT_c$ is the triangle formed by the points of tangency of a triangle $ABC$ with its excircles $J_a$, $J_b$, and $J_c$. The points $T_a$, $T_b$, and $T_c$ can also be constructed as the points which bisect the perimeter of $A_1A_2A_3$ starting at $A$, $B$, and $C$.\\ \href{http://mathworld.wolfram.com/ExtouchTriangle.html}{Weisstein, Eric W. "Extouch triangle" From MathWorld--A Wolfram Web Resource.} @@ -297,33 +315,62 @@ We obtain the points of contact of the exinscribed circles as well as the triang \tkzGetPoint{N_a} \tkzDefTriangleCenter[centroid](A,B,C) \tkzGetPoint{G} -\tkzDrawPoints[blue](J_a,J_b,J_c) +\tkzDrawPoints[new](J_a,J_b,J_c) \tkzClipBB \tkzShowBB \tkzDrawCircles[gray](J_a,T_a J_b,T_b J_c,T_c) \tkzDrawLines[add=1 and 1](A,B B,C C,A) -\tkzDrawSegments[gray](A,T_a B,T_b C,T_c) -\tkzDrawSegments[gray](J_a,T_a J_b,T_b J_c,T_c) -\tkzDrawPolygon[blue](A,B,C) -\tkzDrawPolygon[red](T_a,T_b,T_c) +\tkzDrawSegments[new](A,T_a B,T_b C,T_c) +\tkzDrawSegments[new](J_a,T_a J_b,T_b J_c,T_c) +\tkzDrawPolygon(A,B,C) +\tkzDrawPolygon[new](T_a,T_b,T_c) \tkzDrawPoints(A,B,C,N_a) \tkzLabelPoints(N_a) -\tkzAutoLabelPoints[center=Na,blue](A,B,C) -\tkzAutoLabelPoints[center=G,red, +\tkzAutoLabelPoints[center=N_a](A,B,C) +\tkzAutoLabelPoints[center=G,new, dist=.4](T_a,T_b,T_c) \tkzMarkRightAngles[fill=gray!15](J_a,T_a,B J_b,T_b,C J_c,T_c,A) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{feuerbach}} +\subsection{Option \tkzname{orthic}} + +Given a triangle $ABC$, the triangle $H_AH_BH_C$ whose vertices are endpoints of the altitudes from each of the vertices of ABC is called the orthic triangle, or sometimes the altitude triangle. The three lines $AH_A$, $BH_B$, and $CH_C$ are concurrent at the orthocenter H of ABC. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture}[scale=.75] +\tkzDefPoints{1/5/A,0/0/B,7/0/C} + \tkzDefSpcTriangle[orthic](A,B,C){H_A,H_B,H_C} + \tkzDefTriangleCenter[ortho](B,C,A) + \tkzGetPoint{H} + \tkzDefPointWith[orthogonal,normed](H_A,B) + \tkzGetPoint{a} + \tkzDrawSegments[new](A,H_A B,H_B C,H_C) + \tkzMarkRightAngles[fill=gray!20, + opacity=.5](A,H_A,C B,H_B,A C,H_C,A) + \tkzDrawPolygon[fill=teal!20,opacity=.3](A,B,C) + \tkzDrawPoints(A,B,C) + \tkzDrawPoints[new](H_A,H_B,H_C) + \tkzDrawPolygon[new,fill=orange!20, + opacity=.3](H_A,H_B,H_C) + \tkzDrawPoint(a) + \tkzLabelPoints(C) + \tkzLabelPoints[left](B) + \tkzLabelPoints[above](A) + \tkzLabelPoints[new](H_A) + \tkzLabelPoints[new,above left](H_C) + \tkzLabelPoints[new,above right](H_B,H) +\end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{feuerbach}} The Feuerbach triangle is the triangle formed by the three points of tangency of the nine-point circle with the excircles.\\ \href{http://mathworld.wolfram.com/FeuerbachTriangle.html}{Weisstein, Eric W. "Feuerbach triangle" From MathWorld--A Wolfram Web Resource.} The points of tangency define the Feuerbach triangle. - \begin{tkzexample}[latex=8cm,small] -\begin{tikzpicture}[scale=1] +\begin{tikzpicture}[scale=1.25] \tkzDefPoint(0,0){A} \tkzDefPoint(3,0){B} \tkzDefPoint(0.5,2.5){C} @@ -334,18 +381,20 @@ The Feuerbach triangle is the triangle formed by the three points of tangency of name=J](A,B,C){_a,_b,_c} \tkzDefSpcTriangle[extouch, name=T](A,B,C){_a,_b,_c} - \tkzDrawPoints[blue](J_a,J_b,J_c,F_a,F_b,F_c,A,B,C) + \tkzDrawPoints[blue](J_a,J_b,J_c,% + F_a,F_b,F_c,A,B,C) \tkzClipBB \tkzShowBB \tkzDrawCircle[purple](N,F_a) \tkzDrawPolygon(A,B,C) - \tkzDrawPolygon[blue](F_a,F_b,F_c) + \tkzDrawPolygon[new](F_a,F_b,F_c) \tkzDrawCircles[gray](J_a,F_a J_b,F_b J_c,F_c) \tkzAutoLabelPoints[center=N,dist=.3, - font=\scriptsize](A,B,C,F_a,F_b,F_c,J_a,J_b,J_c) + font=\scriptsize](A,B,C,F_a,F_b,% + F_c,J_a,J_b,J_c) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{tangential}} +\subsection{Option \tkzname{tangential}} The tangential triangle is the triangle $T_aT_bT_c$ formed by the lines tangent to the circumcircle of a given triangle $ABC$ at its vertices. It is therefore antipedal triangle of $ABC$ with respect to the circumcenter $O$.\\ \href{http://mathworld.wolfram.com/TangentialTriangle.html}{Weisstein, Eric W. "Tangential Triangle." From MathWorld--A Wolfram Web Resource. } @@ -355,20 +404,22 @@ The tangential triangle is the triangle $T_aT_bT_c$ formed by the lines tangent \tkzDefPoints{0/0/A,6/0/B,1.8/4/C} \tkzDefSpcTriangle[tangential, name=T](A,B,C){_a,_b,_c} - \tkzDrawPolygon[red](A,B,C) - \tkzDrawPolygon[blue](T_a,T_b,T_c) - \tkzDrawPoints[red](A,B,C) - \tkzDrawPoints[blue](T_a,T_b,T_c) + \tkzDrawPolygon(A,B,C) + \tkzDrawPolygon[new](T_a,T_b,T_c) + \tkzDrawPoints(A,B,C) + \tkzDrawPoints[new](T_a,T_b,T_c) \tkzDefCircle[circum](A,B,C) \tkzGetPoint{O} \tkzDrawCircle(O,A) - \tkzLabelPoints[red](A,B,C) - \tkzLabelPoints[blue](T_a,T_b,T_c) + \tkzLabelPoints(A,B,C) + \tkzLabelPoints[new](T_a,T_b,T_c) \end{tikzpicture} \end{tkzexample} -\subsubsection{Option \tkzname{euler}} +\subsection{Option \tkzname{euler}} The Euler triangle of a triangle $ABC$ is the triangle $E_AE_BE_C$ whose vertices are the midpoints of the segments joining the orthocenter $H$ with the respective vertices. The vertices of the triangle are known as the Euler points, and lie on the nine-point circle. +\\ +\href{https://mathworld.wolfram.com/EulerTriangle.html}{Weisstein, Eric W. "Euler Triangle." From MathWorld--A Wolfram Web Resource.} \begin{tkzexample}[latex=7cm,small] \begin{tikzpicture}[rotate=90,scale=1.25] @@ -383,9 +434,9 @@ The Euler triangle of a triangle $ABC$ is the triangle $E_AE_BE_C$ whose vertice \tkzDefMidPoint(C,H) \tkzGetPoint{E_C} \tkzDefMidPoint(B,H) \tkzGetPoint{E_B} \tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C} - \tkzDrawPolygon[color=blue](A,B,C) + \tkzDrawPolygon(A,B,C) \tkzDrawCircle(N,E_A) - \tkzDrawSegments[blue](A,H_A B,H_B C,H_C) + \tkzDrawSegments[new](A,H_A B,H_B C,H_C) \tkzDrawPoints(A,B,C,N,H) \tkzDrawPoints[red](M_A,M_B,M_C) \tkzDrawPoints[blue]( H_A,H_B,H_C) @@ -395,9 +446,52 @@ The Euler triangle of a triangle $ABC$ is the triangle $E_AE_BE_C$ whose vertice \tkzLabelPoints[font=\scriptsize](H,N) \tkzMarkSegments[mark=s|,size=3pt, color=blue,line width=1pt](B,E_B E_B,H) - \tkzDrawPolygon[color=red](M_A,M_B,M_C) + \tkzDrawPolygon[color=cyan](M_A,M_B,M_C) \end{tikzpicture} \end{tkzexample} +\subsection{Option \tkzname{euler} and Option \tkzname{orthic}} +\begin{tkzexample}[vbox,small] + \begin{tikzpicture}[scale=1.25] + \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} + \tkzDefSpcTriangle[euler,name=E](A,B,C){a,b,c} + \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c} + \tkzDefExCircle(A,B,C) \tkzGetPoint{I} \tkzGetLength{rI} + \tkzDefExCircle(C,A,B) \tkzGetPoint{J} \tkzGetLength{rJ} + \tkzDefExCircle(B,C,A) \tkzGetPoint{K} \tkzGetLength{rK} + \tkzDrawPoints[orange](I,J,K) + \tkzLabelPoints[font=\scriptsize](A,B,C,I,J,K) + \tkzClipBB + \tkzInterLC[R](I,C)(I,\rI) \tkzGetSecondPoint{Fc} + \tkzInterLC[R](J,B)(J,\rJ) \tkzGetSecondPoint{Fb} + \tkzInterLC[R](K,A)(K,\rK) \tkzGetSecondPoint{Fa} + \tkzDrawLines[add=1.5 and 1.5](A,B A,C B,C) + \tkzDrawCircle[euler,orange](A,B,C) \tkzGetPoint{E} + \tkzDrawSegments[orange](E,I E,J E,K) + \tkzDrawSegments[dashed](A,Ha B,Hb C,Hc) + \tkzDrawCircles[R](J,{\rJ} I,{\rI} K,{\rK}) + \tkzDrawPoints(A,B,C) + \tkzDrawPoints[orange](E,I,J,K,Ha,Hb,Hc,Ea,Eb,Ec,Fa,Fb,Fc) + \tkzLabelPoints[font=\scriptsize](E,Ea,Eb,Ec,Ha,Hb,Hc,Fa,Fb,Fc) + \end{tikzpicture} +\end{tkzexample} + +\subsection{Option \tkzname{symmedial}} +The symmedial triangle$ K_AK_BK_C$ is the triangle whose vertices are the intersection points of the symmedians with the reference triangle $ABC$. + +\begin{tkzexample}[latex=7cm,small] +\begin{tikzpicture} +\tkzDefPoint(0,0){A} +\tkzDefPoint(5,0){B} +\tkzDefPoint(.75,4){C} +\tkzDefTriangleCenter[symmedian](A,B,C)\tkzGetPoint{K} +\tkzDefSpcTriangle[symmedial,name=K_](A,B,C){A,B,C} +\tkzDrawPolygon(A,B,C) +\tkzDrawSegments[new](A,K_A B,K_B C,K_C) +\tkzDrawPoints(A,B,C,K,K_A,K_B,K_C) +\tkzLabelPoints[font=\scriptsize](A,B,C,K,K_A,K_B,K_C) +\end{tikzpicture} +\end{tkzexample} + \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/doc/tkz-euclide.pdf b/macros/latex/contrib/tkz/tkz-euclide/doc/tkz-euclide.pdf Binary files differnew file mode 100644 index 0000000000..91d7ecba05 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/doc/tkz-euclide.pdf diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/preamble-standalone.ltx b/macros/latex/contrib/tkz/tkz-euclide/examples/preamble-standalone.ltx deleted file mode 100644 index fb3587d4f6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/preamble-standalone.ltx +++ /dev/null @@ -1,2 +0,0 @@ -\documentclass{standalone} -\usepackage{tkz-euclide,tkz-fct} diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.0.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.0.0.tex deleted file mode 100644 index d14867b6e6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.0.0.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 1 (Section 1 : Presentation and Overview) - -\begin{tikzpicture}[scale=.25] - \tkzDefPoints{00/0/A,12/0/B,6/12*sind(60)/C} - \foreach \density in {20,30,...,240}{% - \tkzDrawPolygon[fill=teal!\density](A,B,C) - \pgfnodealias{X}{A} - \tkzDefPointWith[linear,K=.15](A,B) \tkzGetPoint{A} - \tkzDefPointWith[linear,K=.15](B,C) \tkzGetPoint{B} - \tkzDefPointWith[linear,K=.15](C,X) \tkzGetPoint{C}} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.1.tex deleted file mode 100644 index b1492bf998..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.1.tex +++ /dev/null @@ -1,34 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 6 (Section 1.3.1 : Example Part I: gold triangle) - -\begin{tikzpicture} - \tkzDefPoint(0,0){C} - \tkzDefPoint(4,0){D} - \tkzDefSquare(C,D) - \tkzGetPoints{e}{f} - \tkzDefMidPoint(C,f) - \tkzGetPoint{m} - \tkzInterLC(C,f)(m,e) - \tkzGetSecondPoint{n} - \tkzInterCC[with nodes](C,C,n)(D,C,n) - \tkzGetFirstPoint{B} - \tkzInterLC(C,D)(D,B) \tkzGetSecondPoint{A} - \tkzInterLC(B,A)(B,D) \tkzGetSecondPoint{E} - \tkzInterLL(B,D)(C,E) \tkzGetPoint{F} - \tkzDrawPoints(C,D,B) - \tkzDrawPolygon(B,...,D) - \tkzDrawPolygon(B,C,D) - \tkzDrawSegments(D,A A,B C,E) - \tkzDrawArc[delta=10](B,C)(E) - \tkzDrawPoints(A,...,F) - \tkzMarkRightAngle[fill=blue!20](B,F,C) - \tkzFillAngles[fill=blue!10](C,B,D E,A,D) - \tkzMarkAngles(C,B,D E,A,D) - \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} - \tkzLabelPoints[below](A,C,D,E) - \tkzLabelPoints[above right](B,F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.2.tex deleted file mode 100644 index 50520d3395..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.2.tex +++ /dev/null @@ -1,32 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 8 (Section 1.3.2 : Example Part II: two others methods gold and euclide triangle) - -\begin{tikzpicture} - \tkzDefPoint(0,0){C} % possible - % \tkzDefPoint[label=below:$C$](0,0){C} - % but don't do this - \tkzDefPoint(2,6){B} - % We get D and E with a rotation - \tkzDefPointBy[rotation= center B angle 36](C) \tkzGetPoint{D} - \tkzDefPointBy[rotation= center B angle 72](C) \tkzGetPoint{E} - % To get A we use an intersection of lines - \tkzInterLL(B,E)(C,D) \tkzGetPoint{A} - \tkzInterLL(C,E)(B,D) \tkzGetPoint{H} - % drawing - \tkzDrawArc[delta=10](B,C)(E) - \tkzDrawPolygon(C,B,D) - \tkzDrawSegments(D,A B,A C,E) - % angles - \tkzMarkAngles(C,B,D E,A,D) %this is to draw the arcs - \tkzLabelAngles[pos=1.5](C,B,D E,A,D){$\alpha$} - \tkzMarkRightAngle(B,H,C) - \tkzDrawPoints(A,...,E) - % Label only now - \tkzLabelPoints[below left](C,A) - \tkzLabelPoints[below right](D) - \tkzLabelPoints[above](B,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.3.tex deleted file mode 100644 index 5bf623549a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.3.3.tex +++ /dev/null @@ -1,29 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 10 (Section 1.3.3 : Complete but minimal example) - -\begin{tikzpicture}[scale=1,ra/.style={fill=gray!20}] - % fixed points - \tkzDefPoint(0,0){A} - \tkzDefPoint(1,0){I} - % calculation - \tkzDefPointBy[homothety=center A ratio 10 ](I) \tkzGetPoint{B} - \tkzDefMidPoint(A,B) \tkzGetPoint{M} - \tkzDefPointWith[orthogonal](I,M) \tkzGetPoint{H} - \tkzInterLC(I,H)(M,B) \tkzGetSecondPoint{C} - \tkzDrawSegment[style=orange](I,C) - \tkzDrawArc(M,B)(A) - \tkzDrawSegment[dim={$1$,-16pt,}](A,I) - \tkzDrawSegment[dim={$a/2$,-10pt,}](I,M) - \tkzDrawSegment[dim={$a/2$,-16pt,}](M,B) - \tkzMarkRightAngle[ra](A,I,C) - \tkzDrawPoints(I,A,B,C,M) - \tkzLabelPoint[left](A){$A(0,0)$} - \tkzLabelPoints[above right](I,M) - \tkzLabelPoints[above left](C) - \tkzLabelPoint[right](B){$B(10,0)$} - \tkzLabelSegment[right=4pt](I,C){$\sqrt{a^2}=a \ (a>0)$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.4.0.tex deleted file mode 100644 index 22349017df..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.4.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 12 (Section 1.4 : The Elements of tkz code) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,8/0/B} - \foreach \tr in {equilateral,half,pythagore,% - school,golden,euclide, gold,cheops} - {\tkzDefTriangle[\tr](A,B) \tkzGetPoint{C} - \tkzDrawPoint(C) - \tkzLabelPoint[right](C){\tr} - \tkzDrawSegments(A,C C,B)} - \tkzDrawPoints(A,B) - \tkzDrawSegments(A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.5.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.5.0.tex deleted file mode 100644 index fb55d7b37c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.5.0.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 15 (Section 1.5 : Notations and conventions) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A} - \tkzDrawPoints(A) - \tkzLabelPoint(A){$P$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.6.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.6.1.tex deleted file mode 100644 index 4dbf112bf2..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-1.6.1.tex +++ /dev/null @@ -1,25 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 17 (Section 1.6.1 : Let's look at a classic example) - -\begin{tikzpicture}[scale=.5] - % fixed points - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,2){B} - % calculus - \tkzInterCC(A,B)(B,A) - \tkzGetPoints{C}{D} - % drawings - \tkzDrawCircles[gray,dashed](A,B B,A) - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,...,D) - % marking - \tkzMarkSegments[mark=s||](A,B B,C C,A) - % labelling - \tkzLabelSegments[swap](A,B){$c$} - \tkzLabelPoints(A,B,D) - \tkzLabelPoints[above](C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.1.tex deleted file mode 100644 index 18afc7ff0b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.1.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 60 (Section 10.1.1 : Option \tkzname{colinear at}) - -\begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} - \tkzDefPoint(0,1){C} - \tkzDefPointWith[colinear=at C](A,B) - \tkzGetPoint{D} - \tkzDrawPoints[color=red](A,B,C,D) - \tkzLabelPoints[above right=3pt](A,B,C,D) - \tkzDrawSegments[vect](A,B C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.10.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.10.tex deleted file mode 100644 index d4facfed58..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.10.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 69 (Section 10.1.10 : Option \tkzname{linear}) - -\begin{tikzpicture}[scale=1.2] - \tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B} - \tkzDefPointWith[linear,K=0.5](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzDrawSegment(A,B) - \tkzLabelPoints[above right=3pt](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.11.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.11.tex deleted file mode 100644 index b3aa5fb1e1..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.11.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 70 (Section 10.1.11 : Option \tkzname{linear normed}) - -\begin{tikzpicture}[scale=1.2] - \tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B} - \tkzDefPointWith[linear normed](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzDrawSegment(A,B) - \tkzLabelSegment(A,C){$1$} - \tkzLabelPoints[above right=3pt](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.2.tex deleted file mode 100644 index 4ce4d6822c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.2.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 61 (Section 10.1.2 : Option \tkzname{colinear at} with $K$) - -\begin{tikzpicture}[vect/.style={->, - shorten >=3pt,>=latex'}] - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPoint(1,2){C} - \tkzDefPointWith[colinear=at C](A,B) - \tkzGetPoint{G} - \tkzDefPointWith[colinear=at C,K=0.5](A,B) - \tkzGetPoint{H} - \tkzLabelPoints(A,B,C,G,H) - \tkzDrawPoints(A,B,C,G,H) - \tkzDrawSegments[vect](A,B C,H) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.3.tex deleted file mode 100644 index 244c6e59a6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.3.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 62 (Section 10.1.3 : Option \tkzname{colinear at} with $K=\frac{\sqrt{2}}{2}$) - -\begin{tikzpicture}[vect/.style={->, - shorten >=3pt,>=latex'}] - \tkzDefPoint(1,1){A} - \tkzDefPoint(4,2){B} - \tkzDefPoint(2,2){CU} - \tkzDefPointWith[colinear=at C,K=sqrt(2)/2](A,B) - \tkzGetPoint{D} - \tkzDrawPoints[color=red](A,B,C,D) - \tkzDrawSegments[vect](A,B C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.4.tex deleted file mode 100644 index c736adac8e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.4.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 63 (Section 10.1.4 : Option \tkzname{orthogonal}) - -\begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} - \tkzDefPoint(4,2){B} - \tkzDefPointWith[orthogonal,K=1](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzLabelPoints[right=3pt](B,C) - \tkzLabelPoints[below=3pt](A) - \tkzDrawSegments[vect](A,B A,C) - \tkzMarkRightAngle(B,A,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.5.tex deleted file mode 100644 index ad47b93669..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.5.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 64 (Section 10.1.5 : Option \tkzname{orthogonal} with $K=-1$) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(1,2){O} - \tkzDefPoint(2,5){I} - \tkzDefPointWith[orthogonal](O,I) - \tkzGetPoint{J} - \tkzDefPointWith[orthogonal,K=-1](O,I) - \tkzGetPoint{K} - \tkzDrawSegment(O,I) - \tkzDrawSegments[->](O,J O,K) - \tkzMarkRightAngles(I,O,J I,O,K) - \tkzDrawPoints(O,I,J,K) - \tkzLabelPoints(O,I,J,K) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.6.tex deleted file mode 100644 index adb9a6caeb..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.6.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 65 (Section 10.1.6 : Option \tkzname{orthogonal} more complicated example) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,6/0/B} - \tkzDefMidPoint(A,B) - \tkzGetPoint{I} - \tkzDefPointWith[orthogonal,K=-.75](B,A) - \tkzGetPoint{C} - \tkzInterLC(B,C)(B,I) - \tkzGetPoints{D}{F} - \tkzDuplicateSegment(B,F)(A,F) - \tkzGetPoint{E} - \tkzDrawArc[delta=10](F,E)(B) - \tkzInterLC(A,B)(A,E) - \tkzGetPoints{N}{M} - \tkzDrawArc[delta=10](A,M)(E) - \tkzDrawLines(A,B B,C A,F) - \tkzCompass(B,F) - \tkzDrawPoints(A,B,C,F,M,E) - \tkzLabelPoints(A,B,C,F,M,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.7.tex deleted file mode 100644 index 30be510ab9..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.7.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 66 (Section 10.1.7 : Options \tkzname{colinear} and \tkzname{orthogonal}) - -\begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,2){B} - \tkzDefPointWith[orthogonal,K=.5](A,B) - \tkzGetPoint{C} - \tkzDefPointWith[colinear=at C,K=.5](A,B) - \tkzGetPoint{D} - \tkzMarkRightAngle[fill=gray!20](B,A,C) - \tkzDrawSegments[vect](A,B A,C C,D) - \tkzDrawPoints(A,...,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.8.tex deleted file mode 100644 index a157dfdc05..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.8.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 67 (Section 10.1.8 : Option \tkzname{orthogonal normed}, $K=1$) - -\begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} - \tkzDefPointWith[orthogonal normed](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzDrawSegments[vect](A,B A,C) - \tkzMarkRightAngle[fill=gray!20](B,A,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.9.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.9.tex deleted file mode 100644 index 50d5a2d651..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.1.9.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 68 (Section 10.1.9 : Option \tkzname{orthogonal normed} and $K=2$) - -\begin{tikzpicture}[scale=1.2, - vect/.style={->,shorten >=3pt,>=latex'}] - \tkzDefPoint(2,3){A} \tkzDefPoint(5,1){B} - \tkzDefPointWith[orthogonal normed,K=2](A,B) - \tkzGetPoint{C} - \tkzDrawPoints[color=red](A,B,C) - \tkzDrawCircle[R](A,2cm) - \tkzDrawSegments[vect](A,B A,C) - \tkzMarkRightAngle[fill=gray!20](B,A,C) - \tkzLabelPoints[above=3pt](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.2.1.tex deleted file mode 100644 index 181ace6c64..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-10.2.1.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 71 (Section 10.2.1 : Coordinate transfer with \tkzcname{tkzGetVectxy}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,1){A} - \tkzDefPoint(4,2){B} - \tkzGetVectxy(A,B){v} - \tkzDefPoint(\vx,\vy){V} - \tkzDrawSegment[->,color=red](O,V) - \tkzDrawSegment[->,color=blue](A,B) - \tkzDrawPoints(A,B,O) - \tkzLabelPoints(A,B,O,V) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.2.0.tex deleted file mode 100644 index 2d256cb366..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.2.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 72 (Section 11.2 : Random point in a rectangle) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5]\tkzGrid - \tkzDefPoints{0/0/A,2/2/B,5/5/C} - \tkzDefRandPointOn[rectangle = A and B] - \tkzGetPoint{a} - \tkzDefRandPointOn[rectangle = B and C] - \tkzGetPoint{d} - \tkzDrawLine(a,d) - \tkzDrawPoints(A,B,C,a,d) - \tkzLabelPoints(A,B,C,a,d) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.3.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.3.0.tex deleted file mode 100644 index 7be5ae33fd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.3.0.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 73 (Section 11.3 : Random point on a segment) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] \tkzGrid - \tkzDefPoints{0/0/A,2/2/B,3/3/C,5/5/D} - \tkzDefRandPointOn[segment = A--B]\tkzGetPoint{a} - \tkzDefRandPointOn[segment = C--D]\tkzGetPoint{d} - \tkzDrawPoints(A,B,C,D,a,d) - \tkzLabelPoints(A,B,C,D,a,d) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.4.0.tex deleted file mode 100644 index 75d04187db..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.4.0.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 74 (Section 11.4 : Random point on a straight line) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] \tkzGrid - \tkzDefPoints{0/0/A,2/2/B,3/3/C,5/5/D} - \tkzDefRandPointOn[line = A--B]\tkzGetPoint{E} - \tkzDefRandPointOn[line = C--D]\tkzGetPoint{F} - \tkzDrawPoints(A,...,F) - \tkzLabelPoints(A,...,F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.4.1.tex deleted file mode 100644 index 5b3c78e4c5..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.4.1.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 75 (Section 11.4.1 : Example of random points) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,2/2/B,-1/-1/C} - \tkzDefCircle[through=](A,C) - \tkzGetLength{rAC} - \tkzDrawCircle(A,C) - \tkzDrawCircle(A,B) - \tkzDefRandPointOn[rectangle=A and B] - \tkzGetPoint{a} - \tkzDefRandPointOn[segment=A--B] - \tkzGetPoint{b} - \tkzDefRandPointOn[circle=center A radius \rAC pt] - \tkzGetPoint{d} - \tkzDefRandPointOn[circle through= center A through B] - \tkzGetPoint{c} - \tkzDefRandPointOn[disk through=center A through B] - \tkzGetPoint{e} - \tkzLabelPoints[above right=3pt](A,B,C,a,b,...,e) - \tkzDrawPoints[](A,B,C,a,b,...,e) - \tkzDrawRectangle(A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.5.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.5.0.tex deleted file mode 100644 index 572d8a6897..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.5.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 76 (Section 11.5 : Random point on a circle) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] \tkzGrid - \tkzDefPoints{3/2/A,1/1/B} - \tkzCalcLength[cm](A,B) \tkzGetLength{rAB} - \tkzDrawCircle[R](A,\rAB cm) - \tkzDefRandPointOn[circle = center A radius - \rAB cm]\tkzGetPoint{a} - \tkzDrawSegment(A,a) - \tkzDrawPoints(A,B,a) - \tkzLabelPoints(A,B,a) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.5.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.5.1.tex deleted file mode 100644 index 0f71ebdfef..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.5.1.tex +++ /dev/null @@ -1,30 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 77 (Section 11.5.1 : Random example and circle of Apollonius) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,3/0/B} - \def\coeffK{2} - \tkzApolloniusCenter[K=\coeffK](A,B) - \tkzGetPoint{P} - \tkzDefApolloniusPoint[K=\coeffK](A,B) - \tkzGetPoint{M} - \tkzDefApolloniusRadius[K=\coeffK](A,B) - \tkzDrawCircle[R,color = blue!50!black, - fill=blue!20, - opacity=.4](tkzPointResult,\tkzLengthResult pt) - \tkzDefRandPointOn[circle through= center P through M] - \tkzGetPoint{N} - \tkzDrawPoints(A,B,P,M,N) - \tkzLabelPoints(A,B,P,M,N) - \tkzDrawSegments[red](N,A N,B) - \tkzDrawPoints(A,B) - \tkzDrawSegments[red](A,B) - \tkzLabelCircle[R,draw,fill=green!10,% - text width=3cm,% - text centered](P,\tkzLengthResult pt-20pt)(-120)% - { $MA/MB=\coeffK$\\$NA/NB=\coeffK$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.6.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.6.0.tex deleted file mode 100644 index 600c61b9fe..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-11.6.0.tex +++ /dev/null @@ -1,32 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 78 (Section 11.6 : Middle of a compass segment) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefRandPointOn[circle= center A radius 4cm] - \tkzGetPoint{B} - \tkzDrawPoints(A,B) - \tkzDefPointBy[rotation= center A angle 180](B) - \tkzGetPoint{C} - \tkzInterCC[R](A,4 cm)(B,4 cm) - \tkzGetPoints{I}{I'} - \tkzInterCC[R](A,4 cm)(I,4 cm) - \tkzGetPoints{J}{B} - \tkzInterCC(B,A)(C,B) - \tkzGetPoints{D}{E} - \tkzInterCC(D,B)(E,B) - \tkzGetPoints{M}{M'} - \tikzset{arc/.style={color=brown,style=dashed,delta=10}} - \tkzDrawArc[arc](C,D)(E) - \tkzDrawArc[arc](B,E)(D) - \tkzDrawCircle[color=brown,line width=.2pt](A,B) - \tkzDrawArc[arc](D,B)(M) - \tkzDrawArc[arc](E,M)(B) - \tkzCompasss[color=red,style=solid](B,I I,J J,C) - \tkzDrawPoints(B,C,D,E,M) - \tkzLabelPoints(A,B,M) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.1.tex deleted file mode 100644 index 826cd564b5..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.1.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 79 (Section 12.1.1 : Example with \tkzname{mediator}) - -\begin{tikzpicture}[rotate=25] - \tkzDefPoints{-2/0/A,1/2/B} - \tkzDefLine[mediator](A,B) \tkzGetPoints{C}{D} - \tkzDefPointWith[linear,K=.75](C,D) \tkzGetPoint{D} - \tkzDefMidPoint(A,B) \tkzGetPoint{I} - \tkzFillPolygon[color=orange!30](A,C,B,D) - \tkzDrawSegments(A,B C,D) - \tkzMarkRightAngle(B,I,C) - \tkzDrawSegments(D,B D,A) - \tkzDrawSegments(C,B C,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.2.tex deleted file mode 100644 index 39f38e0866..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.2.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 80 (Section 12.1.2 : Example with \tkzname{bisector} and \tkzname{normed}) - -\begin{tikzpicture}[rotate=25,scale=.75] - \tkzDefPoints{0/0/C, 2/-3/A, 4/0/B} - \tkzDefLine[bisector,normed](B,A,C) \tkzGetPoint{a} - \tkzDrawLines[add= 0 and .5](A,B A,C) - \tkzShowLine[bisector,gap=4,size=2,color=red](B,A,C) - \tkzDrawLines[blue!50,dashed,add= 0 and 3](A,a) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.3.tex deleted file mode 100644 index 1c77634e53..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.3.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 81 (Section 12.1.3 : Example with \tkzname{orthogonal} and \tkzname{parallel}) - -\begin{tikzpicture} - \tkzDefPoints{-1.5/-0.25/A,1/-0.75/B,-0.7/1/C} - \tkzDrawLine(A,B) - \tkzLabelLine[pos=1.25,below left](A,B){$(d_1)$} - \tkzDrawPoints(A,B,C) - \tkzDefLine[orthogonal=through C](B,A) \tkzGetPoint{c} - \tkzDrawLine(C,c) - \tkzLabelLine[pos=1.25,left](C,c){$(\delta)$} - \tkzInterLL(A,B)(C,c) \tkzGetPoint{I} - \tkzMarkRightAngle(C,I,B) - \tkzDefLine[parallel=through C](A,B) \tkzGetPoint{c'} - \tkzDrawLine(C,c') - \tkzLabelLine[pos=1.25,below left](C,c'){$(d_2)$} - \tkzMarkRightAngle(I,C,c') -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.4.tex deleted file mode 100644 index de3be4b2be..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.4.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 82 (Section 12.1.4 : An envelope) - -\begin{tikzpicture}[scale=.75] - \tkzInit[xmin=-6,ymin=-4,xmax=6,ymax=6] % necessary - \tkzClip - \tkzDefPoint(0,0){O} - \tkzDefPoint(132:4){A} - \tkzDefPoint(5,0){B} - \foreach \ang in {5,10,...,360}{% - \tkzDefPoint(\ang:5){M} - \tkzDefLine[mediator](A,M) - \tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.5.tex deleted file mode 100644 index afa76e3561..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.1.5.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 83 (Section 12.1.5 : A parabola) - -\begin{tikzpicture}[scale=.75] - \tkzInit[xmin=-6,ymin=-4,xmax=6,ymax=6] - \tkzClip - \tkzDefPoint(0,0){O} - \tkzDefPoint(132:5){A} - \tkzDefPoint(4,0){B} - \foreach \ang in {5,10,...,360}{% - \tkzDefPoint(\ang:4){M} - \tkzDefLine[mediator](A,M) - \tkzDrawLine[color=magenta,add= 3 and 3](tkzFirstPointResult,tkzSecondPointResult)} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.1.tex deleted file mode 100644 index 818896e6e1..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 84 (Section 12.2.1 : Example of a tangent passing through a point on the circle ) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){O} - \tkzDefPoint(6,6){E} - \tkzDefRandPointOn[circle=center O radius 3cm] - \tkzGetPoint{A} - \tkzDrawSegment(O,A) - \tkzDrawCircle(O,A) - \tkzDefTangent[at=A](O) - \tkzGetPoint{h} - \tkzDrawLine[add = 4 and 3](A,h) - \tkzMarkRightAngle[fill=red!30](O,A,h) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.2.tex deleted file mode 100644 index 27db66fd33..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.2.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 85 (Section 12.2.2 : Example of tangents passing through an external point ) - -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(3,3){c} - \tkzDefPoint(6,3){a0} - \tkzRadius=1 cm - \tkzDrawCircle[R](c,\tkzRadius) - \foreach \an in {0,10,...,350}{ - \tkzDefPointBy[rotation=center c angle \an](a0) - \tkzGetPoint{a} - \tkzDefTangent[from with R = a](c,\tkzRadius) - \tkzGetPoints{e}{f} - \tkzDrawLines[color=magenta](a,f a,e) - \tkzDrawSegments(c,e c,f) - }% -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.3.tex deleted file mode 100644 index 592f7d2347..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.3.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 86 (Section 12.2.3 : Example of Andrew Mertz) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(100:8){A}\tkzDefPoint(50:8){B} - \tkzDefPoint(0,0){C} \tkzDefPoint(0,4){R} - \tkzDrawCircle(C,R) - \tkzDefTangent[from = A](C,R) \tkzGetPoints{D}{E} - \tkzDefTangent[from = B](C,R) \tkzGetPoints{F}{G} - \tkzDrawSector[fill=blue!80!black,opacity=0.5](A,D)(E) - \tkzFillSector[color=red!80!black,opacity=0.5](B,F)(G) - \tkzInterCC(A,D)(B,F) \tkzGetSecondPoint{I} - \tkzDrawPoint[color=black](I) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.4.tex deleted file mode 100644 index 0b7bb6747a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.4.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 87 (Section 12.2.4 : Drawing a tangent option \tkzimp{from with R} and \tkzimp{at}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){O} - \tkzDefRandPointOn[circle=center O radius 4cm] - \tkzGetPoint{A} - \tkzDefTangent[at=A](O) - \tkzGetPoint{h} - \tkzDrawSegments(O,A) - \tkzDrawCircle(O,A) - \tkzDrawLine[add = 1 and 1](A,h) - \tkzMarkRightAngle[fill=red!30](O,A,h) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.5.tex deleted file mode 100644 index 57c4ce4c91..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-12.2.5.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 88 (Section 12.2.5 : Drawing a tangent option \tkzimp{from}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){B} - \tkzDefPoint(0,8){A} - \tkzDefSquare(A,B) - \tkzGetPoints{C}{D} - \tkzDrawSquare(A,B) - \tkzClipPolygon(A,B,C,D) - \tkzDefPoint(4,8){F} - \tkzDefPoint(4,0){E} - \tkzDefPoint(4,4){Q} - \tkzFillPolygon[color = green](A,B,C,D) - \tkzDrawCircle[fill = orange](B,A) - \tkzDrawCircle[fill = purple](E,B) - \tkzDefTangent[from=B](F,A) - \tkzInterLL(F,tkzFirstPointResult)(C,D) - \tkzInterLL(A,tkzPointResult)(F,E) - \tkzDrawCircle[fill = yellow](tkzPointResult,Q) - \tkzDefPointBy[projection= onto B--A](tkzPointResult) - \tkzDrawCircle[fill = blue!50!black](tkzPointResult,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.1.tex deleted file mode 100644 index ccbc1bffe8..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.1.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 89 (Section 13.1.1 : Examples with \tkzname{add}) - -\begin{tikzpicture} - \tkzInit[xmin=-2,xmax=3,ymin=-2.25,ymax=2.25] - \tkzClip[space=.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(2,0.5){B} - \tkzDefPoint(0,-1){C}\tkzDefPoint(2,-0.5){D} - \tkzDefPoint(0,1){E} \tkzDefPoint(2,1.5){F} - \tkzDefPoint(0,-2){G} \tkzDefPoint(2,-1.5){H} - \tkzDrawLine(A,B) \tkzDrawLine[add = 0 and .5](C,D) - \tkzDrawLine[add = 1 and 0](E,F) - \tkzDrawLine[add = 0 and 0](G,H) - \tkzDrawPoints(A,B,C,D,E,F,G,H) - \tkzLabelPoints(A,B,C,D,E,F,G,H) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.2.tex deleted file mode 100644 index 6e437bc6b1..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.2.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 90 (Section 13.1.2 : Example with \tkzcname{tkzDrawLines}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,0){B} - \tkzDefPoint(1,2){C} - \tkzDefPoint(3,2){D} - \tkzDrawLines(A,B C,D A,C B,D) - \tkzLabelPoints(A,B,C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.3.tex deleted file mode 100644 index 09398cb87f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.3.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 91 (Section 13.1.3 : Example with the option \tkzname{add}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(3,1){I} - \tkzDefPoint(1,4){J} - \tkzDefLine[bisector](I,O,J) - \tkzGetPoint{i} - \tkzDefLine[bisector out](I,O,J) - \tkzGetPoint{j} - \tkzDrawLines[add = 1 and .5,color=red](O,I O,J) - \tkzDrawLines[add = 1 and .5,color=blue](O,i O,j) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.4.tex deleted file mode 100644 index 01a767172b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.4.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 92 (Section 13.1.4 : Medians in a triangle) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzSetUpLine[color=blue] - \tkzDrawLine[median](B,C,A) - \tkzDrawLine[median](C,A,B) - \tkzDrawLine[median](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.5.tex deleted file mode 100644 index 8b830cd5ea..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.5.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 93 (Section 13.1.5 : Altitudes in a triangle) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzSetUpLine[color=magenta] - \tkzDrawLine[altitude](B,C,A) - \tkzDrawLine[altitude](C,A,B) - \tkzDrawLine[altitude](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.6.tex deleted file mode 100644 index 90fc2476e7..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.1.6.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 94 (Section 13.1.6 : Bisectors in a triangle) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzSetUpLine[color=purple] - \tkzDrawLine[bisector](B,C,A) - \tkzDrawLine[bisector](C,A,B) - \tkzDrawLine[bisector](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.2.1.tex deleted file mode 100644 index 5a94a09b74..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-13.2.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 95 (Section 13.2.1 : Example with \tkzcname{tkzLabelLine}) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,3/0/B,1/1/C} - \tkzDefLine[perpendicular=through C,K=-1](A,B) - \tkzGetPoint{c} - \tkzDrawLines(A,B C,c) - \tkzLabelLine[pos=1.25,blue,right](C,c){$(\delta)$} - \tkzLabelLine[pos=-0.25,red,left](C,c){again $(\delta)$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.1.tex deleted file mode 100644 index c66be7b0a6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 96 (Section 14.1.1 : Example with point references) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,1){B} - \tkzDrawSegment[color=red,thin](A,B) - \tkzDrawPoints(A,B) - \tkzLabelPoints(A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.2.tex deleted file mode 100644 index a4f91a1f11..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.2.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 97 (Section 14.1.2 : Example of extending an segment with option \tkzname{add}) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefTriangleCenter[euler](A,B,C) - \tkzGetPoint{E} - \tkzDrawCircle[euler,red](A,B,C) - \tkzDrawLines[add=.5 and .5](A,B A,C B,C) - \tkzDrawPoints(A,B,C,E) - \tkzLabelPoints(A,B,C,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.3.tex deleted file mode 100644 index 50e0c04d63..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.1.3.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 98 (Section 14.1.3 : Example of adding dimensions with option \tkzname{dim}) - -\begin{tikzpicture}[scale=4] - \pgfkeys{/pgf/number format/.cd,fixed,precision=2} - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefPoint(1,1){C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - \tkzCalcLength[cm](A,B)\tkzGetLength{ABl} - \tkzCalcLength[cm](B,C)\tkzGetLength{BCl} - \tkzCalcLength[cm](A,C)\tkzGetLength{ACl} - \tkzDrawSegment[dim={\pgfmathprintnumber\BCl,6pt,transform shape}](C,B) - \tkzDrawSegment[dim={\pgfmathprintnumber\ACl,6pt,transform shape}](A,C) - \tkzDrawSegment[dim={\pgfmathprintnumber\ABl,-6pt,transform shape}](A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.2.0.tex deleted file mode 100644 index 074b835878..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.2.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 99 (Section 14.2 : Drawing segments \tkzcname{tkzDrawSegments}) - -\begin{tikzpicture} - \tkzInit[xmin=-1,xmax=3,ymin=-1,ymax=2] - \tkzClip[space=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,1){B} - \tkzDefPoint(3,0){C} - \tkzDrawSegments(A,B B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,C) - \tkzLabelPoints[above](B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.2.1.tex deleted file mode 100644 index dcb8fe001d..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.2.1.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 100 (Section 14.2.1 : Place an arrow on segment) - -\begin{tikzpicture} - \tikzset{ - arr/.style={postaction=decorate, - decoration={markings, - mark=at position .5 with {\arrow[thick]{#1}} - }}} - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,-4){B} - \tkzDrawSegments[arr=stealth](A,B) - \tkzDrawPoints(A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.3.1.tex deleted file mode 100644 index a093ff5385..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.3.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 101 (Section 14.3.1 : Several marks ) - -\begin{tikzpicture} - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,4){B} - \tkzDrawSegment(A,B) - \tkzMarkSegment[color=brown,size=2pt,pos=0.4, mark=z](A,B) - \tkzMarkSegment[color=blue,pos=0.2, mark=oo](A,B) - \tkzMarkSegment[pos=0.8,mark=s,color=red](A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.3.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.3.2.tex deleted file mode 100644 index 820cca00f5..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.3.2.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 102 (Section 14.3.2 : Use of \tkzname{mark}) - -\begin{tikzpicture} - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,4){B} - \tkzDrawSegment(A,B) - \tkzMarkSegment[color=gray,pos=0.2,mark=s|](A,B) - \tkzMarkSegment[color=gray,pos=0.4,mark=s||](A,B) - \tkzMarkSegment[color=brown,pos=0.6,mark=||](A,B) - \tkzMarkSegment[color=red,pos=0.8,mark=|||](A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.4.1.tex deleted file mode 100644 index 03890e041b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.4.1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 103 (Section 14.4.1 : Marks for an isosceles triangle) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C} - \tkzDrawSegments(O,A A,B) - \tkzDrawPoints(O,A,B) - \tkzDrawLine(O,B) - \tkzMarkSegments[mark=||,size=6pt](O,A A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.0.tex deleted file mode 100644 index eb1d6e2147..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.0.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 104 (Section 14.5 : Another marking) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B} - \tkzDefPoint(4,0){C}\tkzDefPoint(2.5,1){P} - \tkzDrawPolygon(A,B,C) - \tkzDefEquilateral(A,P) \tkzGetPoint{P'} - \tkzDefPointsBy[rotation=center A angle 60](P,B){P',C'} - \tkzDrawPolygon(A,P,P') - \tkzDrawPolySeg(P',C',A,P,B) - \tkzDrawSegment(C,P) - \tkzDrawPoints(A,B,C,C',P,P') - \tkzMarkSegments[mark=s|,size=6pt, - color=blue](A,P P,P' P',A) - \tkzMarkSegments[mark=||,color=orange](B,P P',C') - \tkzLabelPoints(A,C) \tkzLabelPoints[below](P) - \tkzLabelPoints[above right](P',C',B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.1.tex deleted file mode 100644 index 8b3ca2a7b0..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 105 (Section 14.5.1 : Multiple labels) - -\begin{tikzpicture} -\tkzInit -\tkzDefPoint(0,0){A} -\tkzDefPoint(6,0){B} -\tkzDrawSegment(A,B) -\tkzLabelSegment[above,pos=.8](A,B){$a$} -\tkzLabelSegment[below,pos=.2](A,B){$4$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.2.tex deleted file mode 100644 index 4ef89e699e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.2.tex +++ /dev/null @@ -1,33 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 106 (Section 14.5.2 : Labels and right-angled triangle) - -\begin{tikzpicture}[rotate=-60] -\tikzset{label seg style/.append style = {% - color = red, - }} -\tkzDefPoint(0,1){A} -\tkzDefPoint(2,4){C} -\tkzDefPointWith[orthogonal normed,K=7](C,A) -\tkzGetPoint{B} -\tkzDrawPolygon[green!60!black](A,B,C) -\tkzDrawLine[altitude,dashed,color=magenta](B,C,A) -\tkzGetPoint{P} -\tkzLabelPoint[left](A){$A$} -\tkzLabelPoint[right](B){$B$} -\tkzLabelPoint[above](C){$C$} -\tkzLabelPoint[below](P){$P$} -\tkzLabelSegment[](B,A){$c$} -\tkzLabelSegment[swap](B,C){$a$} -\tkzLabelSegment[swap](C,A){$b$} -\tkzMarkAngles[size=1cm, - color=cyan,mark=|](C,B,A A,C,P) -\tkzMarkAngle[size=0.75cm, - color=orange,mark=||](P,C,B) -\tkzMarkAngle[size=0.75cm, - color=orange,mark=||](B,A,C) -\tkzMarkRightAngles[german](A,C,B B,P,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.3.tex deleted file mode 100644 index 4369da6d46..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-14.5.3.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 107 (Section 14.5.3 : Labels for an isosceles triangle) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C} - \tkzDrawSegments(O,A A,B) - \tkzDrawPoints(O,A,B) - \tkzDrawLine(O,B) - \tkzLabelSegments[color=red,above=4pt](O,A A,B){$a$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.1.tex deleted file mode 100644 index 13d0c40f51..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 108 (Section 15.1.1 : Option \tkzname{golden}) - -\begin{tikzpicture}[scale=.8] -\tkzInit[xmax=5,ymax=3] \tkzClip[space=.5] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefTriangle[golden](A,B)\tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B) \tkzDrawBisector(A,C,B) - \tkzLabelPoints[above](C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.2.tex deleted file mode 100644 index ef87491f28..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.2.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 109 (Section 15.1.2 : Option \tkzname{equilateral}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,0){B} - \tkzDefTriangle[equilateral](A,B) - \tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzDefTriangle[equilateral](B,A) - \tkzGetPoint{D} - \tkzDrawPolygon(B,A,D) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(A,B,C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.3.tex deleted file mode 100644 index c1179987a3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.1.3.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 110 (Section 15.1.3 : Option \tkzname{gold} or \tkzname{euclide} ) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefTriangle[euclide](A,B)\tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B) - \tkzLabelPoints[above](C) - \tkzDrawBisector(A,C,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.1.tex deleted file mode 100644 index 95d14deac7..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.1.tex +++ /dev/null @@ -1,13 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 111 (Section 15.2.1 : Option \tkzname{pythagore}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,0){B} - \tkzDrawTriangle[pythagore,fill=blue!30](A,B) - \tkzMarkRightAngles(A,B,tkzPointResult) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.2.tex deleted file mode 100644 index d67b7da0d6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.2.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 112 (Section 15.2.2 : Option \tkzname{school}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDrawTriangle[school,fill=red!30](A,B) - \tkzMarkRightAngles(tkzPointResult,B,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.3.tex deleted file mode 100644 index 915e82b101..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.3.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 113 (Section 15.2.3 : Option \tkzname{golden}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,-10){M} - \tkzDefPoint(3,-10){N} - \tkzDrawTriangle[golden,color=brown](M,N) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.4.tex deleted file mode 100644 index 50b34ce1f4..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.4.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 114 (Section 15.2.4 : Option \tkzname{gold}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(5,-5){I} - \tkzDefPoint(8,-5){J} - \tkzDrawTriangle[gold,color=blue!50](I,J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.5.tex deleted file mode 100644 index 79ae689b25..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-15.2.5.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 115 (Section 15.2.5 : Option \tkzname{euclide}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(10,-5){K} - \tkzDefPoint(13,-5){L} - \tkzDrawTriangle[euclide,color=blue,fill=blue!10](K,L) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.1.tex deleted file mode 100644 index 7caa380a62..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.1.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 116 (Section 16.0.1 : Option \tkzname{medial} or \tkzname{centroid} ) - -\begin{tikzpicture}[rotate=90,scale=.75] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefTriangleCenter[centroid](A,B,C) - \tkzGetPoint{M} - \tkzDefSpcTriangle[medial,name=M](A,B,C){_A,_B,_C} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawSegments[dashed,red](A,M_A B,M_B C,M_C) - \tkzDrawPolygon[color=red](M_A,M_B,M_C) - \tkzDrawPoints(A,B,C,M) - \tkzDrawPoints[red](M_A,M_B,M_C) -\tkzAutoLabelPoints[center=M,font=\scriptsize]% -(A,B,C,M_A,M_B,M_C) - \tkzLabelPoints[font=\scriptsize](M) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.2.tex deleted file mode 100644 index 5ab3d72d27..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.2.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 117 (Section 16.0.2 : Option \tkzname{in} or \tkzname{incentral} ) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{ 0/0/A,5/0/B,1/3/C} - \tkzDefSpcTriangle[in,name=I](A,B,C){_a,_b,_c} - \tkzInCenter(A,B,C)\tkzGetPoint{I} - \tkzDrawPolygon[red](A,B,C) - \tkzDrawPolygon[blue](I_a,I_b,I_c) - \tkzDrawPoints(A,B,C,I,I_a,I_b,I_c) - \tkzDrawCircle[in](A,B,C) - \tkzDrawSegments[dashed](A,I_a B,I_b C,I_c) - \tkzAutoLabelPoints[center=I, - blue,font=\scriptsize](I_a,I_b,I_c) - \tkzAutoLabelPoints[center=I,red, - font=\scriptsize](A,B,C,I_a,I_b,I_c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.3.tex deleted file mode 100644 index b6e1117422..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.3.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 118 (Section 16.0.3 : Option \tkzname{ex} or \tkzname{excentral} ) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefSpcTriangle[excentral,name=J](A,B,C){_a,_b,_c} - \tkzDefSpcTriangle[extouch,name=T](A,B,C){_a,_b,_c} - \tkzDrawPolygon[blue](A,B,C) - \tkzDrawPolygon[red](J_a,J_b,J_c) - \tkzDrawPoints(A,B,C) - \tkzDrawPoints[red](J_a,J_b,J_c) - \tkzLabelPoints(A,B,C) - \tkzLabelPoints[red](J_b,J_c) - \tkzLabelPoints[red,above](J_a) - \tkzClipBB \tkzShowBB - \tkzDrawCircles[gray](J_a,T_a J_b,T_b J_c,T_c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.4.tex deleted file mode 100644 index 3a6ffedf9a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.4.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 119 (Section 16.0.4 : Option \tkzname{intouch}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefSpcTriangle[intouch,name=X](A,B,C){_a,_b,_c} - \tkzInCenter(A,B,C)\tkzGetPoint{I} - \tkzDrawPolygon[red](A,B,C) - \tkzDrawPolygon[blue](X_a,X_b,X_c) - \tkzDrawPoints[red](A,B,C) - \tkzDrawPoints[blue](X_a,X_b,X_c) - \tkzDrawCircle[in](A,B,C) - \tkzAutoLabelPoints[center=I,blue,font=\scriptsize]% -(X_a,X_b,X_c) - \tkzAutoLabelPoints[center=I,red,font=\scriptsize]% -(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.5.tex deleted file mode 100644 index 64101af4cd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.5.tex +++ /dev/null @@ -1,33 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 120 (Section 16.0.5 : Option \tkzname{extouch}) - -\begin{tikzpicture}[scale=.7] -\tkzDefPoints{0/0/A,6/0/B,0.8/4/C} -\tkzDefSpcTriangle[excentral, - name=J](A,B,C){_a,_b,_c} -\tkzDefSpcTriangle[extouch, - name=T](A,B,C){_a,_b,_c} -\tkzDefTriangleCenter[nagel](A,B,C) -\tkzGetPoint{N_a} -\tkzDefTriangleCenter[centroid](A,B,C) -\tkzGetPoint{G} -\tkzDrawPoints[blue](J_a,J_b,J_c) -\tkzClipBB \tkzShowBB -\tkzDrawCircles[gray](J_a,T_a J_b,T_b J_c,T_c) -\tkzDrawLines[add=1 and 1](A,B B,C C,A) -\tkzDrawSegments[gray](A,T_a B,T_b C,T_c) -\tkzDrawSegments[gray](J_a,T_a J_b,T_b J_c,T_c) -\tkzDrawPolygon[blue](A,B,C) -\tkzDrawPolygon[red](T_a,T_b,T_c) -\tkzDrawPoints(A,B,C,N_a) -\tkzLabelPoints(N_a) -\tkzAutoLabelPoints[center=Na,blue](A,B,C) -\tkzAutoLabelPoints[center=G,red, - dist=.4](T_a,T_b,T_c) -\tkzMarkRightAngles[fill=gray!15](J_a,T_a,B - J_b,T_b,C J_c,T_c,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.6.tex deleted file mode 100644 index 544dfe303c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.6.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 121 (Section 16.0.6 : Option \tkzname{feuerbach}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefPoint(0.5,2.5){C} - \tkzDefCircle[euler](A,B,C) \tkzGetPoint{N} - \tkzDefSpcTriangle[feuerbach, - name=F](A,B,C){_a,_b,_c} - \tkzDefSpcTriangle[excentral, - name=J](A,B,C){_a,_b,_c} - \tkzDefSpcTriangle[extouch, - name=T](A,B,C){_a,_b,_c} - \tkzDrawPoints[blue](J_a,J_b,J_c,F_a,F_b,F_c,A,B,C) - \tkzClipBB \tkzShowBB - \tkzDrawCircle[purple](N,F_a) - \tkzDrawPolygon(A,B,C) - \tkzDrawPolygon[blue](F_a,F_b,F_c) - \tkzDrawCircles[gray](J_a,F_a J_b,F_b J_c,F_c) - \tkzAutoLabelPoints[center=N,dist=.3, - font=\scriptsize](A,B,C,F_a,F_b,F_c,J_a,J_b,J_c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.7.tex deleted file mode 100644 index 0a75442e52..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.7.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 122 (Section 16.0.7 : Option \tkzname{tangential}) - -\begin{tikzpicture}[scale=.5,rotate=80] - \tkzDefPoints{0/0/A,6/0/B,1.8/4/C} - \tkzDefSpcTriangle[tangential, - name=T](A,B,C){_a,_b,_c} - \tkzDrawPolygon[red](A,B,C) - \tkzDrawPolygon[blue](T_a,T_b,T_c) - \tkzDrawPoints[red](A,B,C) - \tkzDrawPoints[blue](T_a,T_b,T_c) - \tkzDefCircle[circum](A,B,C) - \tkzGetPoint{O} - \tkzDrawCircle(O,A) - \tkzLabelPoints[red](A,B,C) - \tkzLabelPoints[blue](T_a,T_b,T_c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.8.tex deleted file mode 100644 index 617b36b119..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-16.0.8.tex +++ /dev/null @@ -1,33 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 123 (Section 16.0.8 : Option \tkzname{euler}) - -\begin{tikzpicture}[rotate=90,scale=1.25] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefSpcTriangle[medial, - name=M](A,B,C){_A,_B,_C} - \tkzDefTriangleCenter[euler](A,B,C) - \tkzGetPoint{N} % I= N nine points - \tkzDefTriangleCenter[ortho](A,B,C) - \tkzGetPoint{H} - \tkzDefMidPoint(A,H) \tkzGetPoint{E_A} - \tkzDefMidPoint(C,H) \tkzGetPoint{E_C} - \tkzDefMidPoint(B,H) \tkzGetPoint{E_B} - \tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawCircle(N,E_A) - \tkzDrawSegments[blue](A,H_A B,H_B C,H_C) - \tkzDrawPoints(A,B,C,N,H) - \tkzDrawPoints[red](M_A,M_B,M_C) - \tkzDrawPoints[blue]( H_A,H_B,H_C) - \tkzDrawPoints[green](E_A,E_B,E_C) - \tkzAutoLabelPoints[center=N,font=\scriptsize]% -(A,B,C,M_A,M_B,M_C,H_A,H_B,H_C,E_A,E_B,E_C) -\tkzLabelPoints[font=\scriptsize](H,N) -\tkzMarkSegments[mark=s|,size=3pt, - color=blue,line width=1pt](B,E_B E_B,H) - \tkzDrawPolygon[color=red](M_A,M_B,M_C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.1.tex deleted file mode 100644 index 13b0caf97b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 124 (Section 17.1.1 : Using \tkzcname{tkzDefSquare} with two points) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){A} \tkzDefPoint(3,0){B} - \tkzDefSquare(A,B) - \tkzDrawPolygon[color=red](A,B,tkzFirstPointResult,% - tkzSecondPointResult) - \tkzDefSquare(B,A) - \tkzDrawPolygon[color=blue](B,A,tkzFirstPointResult,% - tkzSecondPointResult) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.2.tex deleted file mode 100644 index d37a9f3526..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.2.tex +++ /dev/null @@ -1,13 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 125 (Section 17.1.2 : Use of \tkzcname{tkzDefSquare} to obtain an isosceles right-angled triangle) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefSquare(A,B) \tkzGetFirstPoint{C} - \tkzDrawPolygon[color=blue,fill=blue!30](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.3.tex deleted file mode 100644 index a767a6b163..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.1.3.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 126 (Section 17.1.3 : Pythagorean Theorem and \tkzcname{tkzDefSquare} ) - -\begin{tikzpicture}[scale=.5] -\tkzInit -\tkzDefPoint(0,0){C} -\tkzDefPoint(4,0){A} -\tkzDefPoint(0,3){B} -\tkzDefSquare(B,A)\tkzGetPoints{E}{F} -\tkzDefSquare(A,C)\tkzGetPoints{G}{H} -\tkzDefSquare(C,B)\tkzGetPoints{I}{J} -\tkzFillPolygon[fill = red!50 ](A,C,G,H) -\tkzFillPolygon[fill = blue!50 ](C,B,I,J) -\tkzFillPolygon[fill = purple!50](B,A,E,F) -\tkzFillPolygon[fill = orange,opacity=.5](A,B,C) -\tkzDrawPolygon[line width = 1pt](A,B,C) -\tkzDrawPolygon[line width = 1pt](A,C,G,H) -\tkzDrawPolygon[line width = 1pt](C,B,I,J) -\tkzDrawPolygon[line width = 1pt](B,A,E,F) -\tkzLabelSegment[](A,C){$a$} -\tkzLabelSegment[](C,B){$b$} -\tkzLabelSegment[swap](A,B){$c$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.10.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.10.1.tex deleted file mode 100644 index 90e118091e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.10.1.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 138 (Section 17.10.1 : Option \tkzname{center}) - -\begin{tikzpicture} - \tkzDefPoints{0/0/P0,0/0/Q0,2/0/P1} - \tkzDefMidPoint(P0,P1) \tkzGetPoint{Q1} - \tkzDefRegPolygon[center,sides=7](P0,P1) - \tkzDefMidPoint(P1,P2) \tkzGetPoint{Q1} - \tkzDefRegPolygon[center,sides=7,name=Q](P0,Q1) - \tkzDrawPolygon(P1,P...,P7) - \tkzFillPolygon[gray!20](Q0,Q1,P2,Q2) - \foreach \j in {1,...,7} {\tkzDrawSegment[black](P0,Q\j)} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.10.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.10.2.tex deleted file mode 100644 index d5b28de5c8..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.10.2.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 139 (Section 17.10.2 : Option \tkzname{side}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{-4/0/A, -1/0/B} - \tkzDefRegPolygon[side,sides=5,name=P](A,B) - \tkzDrawPolygon[thick](P1,P...,P5) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.1.tex deleted file mode 100644 index ac26e93d44..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 127 (Section 17.3.1 : Example of a parallelogram definition) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,3/0/B,4/2/C} - \tkzDefParallelogram(A,B,C) - \tkzGetPoint{D} - \tkzDrawPolygon(A,B,C,D) - \tkzLabelPoints(A,B) - \tkzLabelPoints[above right](C,D) - \tkzDrawPoints(A,...,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.2.tex deleted file mode 100644 index 4810df86fe..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.2.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 128 (Section 17.3.2 : Simple example) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,3/0/B,4/2/C} - \tkzDefPointWith[colinear= at C](B,A) - \tkzGetPoint{D} - \tkzDrawPolygon(A,B,C,D) - \tkzLabelPoints(A,B) - \tkzLabelPoints[above right](C,D) - \tkzDrawPoints(A,...,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.3.tex deleted file mode 100644 index f1562f4e6b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.3.3.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 129 (Section 17.3.3 : Construction of the golden rectangle ) - -\begin{tikzpicture}[scale=.5] - \tkzInit[xmax=14,ymax=10] - \tkzClip[space=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} - \tkzDefMidPoint(A,B)\tkzGetPoint{I} - \tkzDefSquare(A,B)\tkzGetPoints{C}{D} - \tkzDrawSquare(A,B) - \tkzInterLC(A,B)(I,C)\tkzGetPoints{G}{E} - \tkzDrawArc[style=dashed,color=gray](I,E)(D) - \tkzDefPointWith[colinear= at C](E,B) - \tkzGetPoint{F} - \tkzDrawPoints(C,D,E,F) - \tkzLabelPoints(A,B,C,D,E,F) - \tkzDrawSegments[style=dashed,color=gray]% -(E,F C,F B,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.4.1.tex deleted file mode 100644 index 2a743b99cb..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.4.1.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 130 (Section 17.4.1 : The idea is to inscribe two squares in a semi-circle.) - -\begin{tikzpicture}[scale=.75] - \tkzInit[ymax=8,xmax=8] - \tkzClip[space=.25] \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} \tkzDefPoint(4,0){I} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzInterLC(I,C)(I,B) \tkzGetPoints{E'}{E} - \tkzInterLC(I,D)(I,B) \tkzGetPoints{F'}{F} - \tkzDefPointsBy[projection=onto A--B](E,F){H,G} - \tkzDefPointsBy[symmetry = center H](I){J} - \tkzDefSquare(H,J) \tkzGetPoints{K}{L} - \tkzDrawSector[fill=yellow](I,B)(A) - \tkzFillPolygon[color=red!40](H,E,F,G) - \tkzFillPolygon[color=blue!40](H,J,K,L) - \tkzDrawPolySeg[color=red](H,E,F,G) - \tkzDrawPolySeg[color=red](J,K,L) - \tkzDrawPoints(E,G,H,F,J,K,L) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.5.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.5.1.tex deleted file mode 100644 index 0116bad5b2..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.5.1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 131 (Section 17.5.1 : Golden Rectangles) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B} - \tkzDefGoldRectangle(A,B) \tkzGetPoints{C}{D} - \tkzDefGoldRectangle(B,C) \tkzGetPoints{E}{F} - \tkzDrawPolygon[color=red,fill=red!20](A,B,C,D) - \tkzDrawPolygon[color=blue,fill=blue!20](B,C,E,F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.6.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.6.1.tex deleted file mode 100644 index b1cb949fdc..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.6.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 132 (Section 17.6.1 : \tkzcname{tkzDrawPolygon}) - -\begin{tikzpicture} [rotate=18,scale=1.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2.25,0.2){B} - \tkzDefPoint(2.5,2.75){C} - \tkzDefPoint(-0.75,2){D} - \tkzDrawPolygon[fill=black!50!blue!20!](A,B,C,D) - \tkzDrawSegments[style=dashed](A,C B,D) - -\end{tikzpicture}\end{tkzexample} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.7.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.7.1.tex deleted file mode 100644 index 489e47e509..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.7.1.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 133 (Section 17.7.1 : Polygonal chain) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,6/0/B,3/4/C,2/2/D} - \tkzDrawPolySeg(A,...,D) - \tkzDrawPoints(A,...,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.7.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.7.2.tex deleted file mode 100644 index b06fc7e181..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.7.2.tex +++ /dev/null @@ -1,13 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 134 (Section 17.7.2 : Polygonal chain: index notation) - -\begin{tikzpicture} -\foreach \pt in {1,2,...,8} {% -\tkzDefPoint(\pt*20:3){P_\pt}} -\tkzDrawPolySeg(P_1,P_...,P_8) -\tkzDrawPoints(P_1,P_...,P_8) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.8.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.8.1.tex deleted file mode 100644 index 3a4d146696..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.8.1.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 135 (Section 17.8.1 : \tkzcname{tkzClipPolygon}) - -\begin{tikzpicture}[scale=1.25] - \tkzInit[xmin=0,xmax=4,ymin=0,ymax=3] - \tkzClip[space=.5] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,3){C} \tkzDrawPolygon(A,B,C) - \tkzDefPoint(0,2){D} \tkzDefPoint(2,0){E} - \tkzDrawPoints(D,E) \tkzLabelPoints(D,E) - \tkzClipPolygon(A,B,C) - \tkzDrawLine[color=red](D,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.8.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.8.2.tex deleted file mode 100644 index e16ea98e90..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.8.2.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 136 (Section 17.8.2 : Example: use of "Clip" for Sangaku in a square) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzDrawPolygon(B,C,D,A) - \tkzClipPolygon(B,C,D,A) - \tkzDefPoint(4,8){F} - \tkzDefTriangle[equilateral](C,D) - \tkzGetPoint{I} - \tkzDrawPoint(I) - \tkzDefPointBy[projection=onto B--C](I) - \tkzGetPoint{J} - \tkzInterLL(D,B)(I,J) \tkzGetPoint{K} - \tkzDefPointBy[symmetry=center K](B) - \tkzGetPoint{M} - \tkzDrawCircle(M,I) - \tkzCalcLength(M,I) \tkzGetLength{dMI} - \tkzFillPolygon[color = orange](A,B,C,D) - \tkzFillCircle[R,color = yellow](M,\dMI pt) - \tkzFillCircle[R,color = blue!50!black](F,4 cm)% -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.9.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.9.1.tex deleted file mode 100644 index 97a1e650f1..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-17.9.1.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 137 (Section 17.9.1 : \tkzcname{tkzFillPolygon}) - -\begin{tikzpicture}[scale=0.7] -\tkzInit[xmin=-3,xmax=6,ymin=-1,ymax=6] -\tkzDrawX[noticks] -\tkzDrawY[noticks] -\tkzDefPoint(0,0){O} \tkzDefPoint(4,2){A} -\tkzDefPoint(-2,6){B} -\tkzPointShowCoord[xlabel=$x$,ylabel=$y$](A) -\tkzPointShowCoord[xlabel=$x'$,ylabel=$y'$,% - ystyle={right=2pt}](B) -\tkzDrawSegments[->](O,A O,B) -\tkzLabelSegment[above=3pt](O,A){$\vec{u}$} -\tkzLabelSegment[above=3pt](O,B){$\vec{v}$} -\tkzMarkAngle[fill= yellow,size=1.8cm,% - opacity=.5](A,O,B) -\tkzFillPolygon[red!30,opacity=0.25](A,B,O) -\tkzLabelAngle[pos = 1.5](A,O,B){$\alpha$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.1.tex deleted file mode 100644 index 942deb276d..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.1.tex +++ /dev/null @@ -1,25 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 140 (Section 18.1.1 : Example with a random point and option \tkzname{through}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,4){A} - \tkzDefPoint(2,2){B} - \tkzDefMidPoint(A,B) \tkzGetPoint{I} - \tkzDefRandPointOn[segment = I--B] - \tkzGetPoint{C} - \tkzDefCircle[through](A,C) - \tkzGetLength{rACpt} - \tkzpttocm(\rACpt){rACcm} - \tkzDrawCircle(A,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B,C) - \tkzLabelCircle[draw,fill=orange, - text width=3cm,text centered, - font=\scriptsize](A,C)(-90)% - {The radius measurement is: - \rACpt pt i.e. \rACcm cm} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.10.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.10.tex deleted file mode 100644 index a28c539346..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.10.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 149 (Section 18.1.10 : Orthogonal circle of given center) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,1/0/A} - \tkzDefPoints{1.5/1.25/B,-2/-3/C} - \tkzDefCircle[orthogonal from=B](O,A) - \tkzGetPoints{z1}{z2} - \tkzDefCircle[orthogonal from=C](O,A) - \tkzGetPoints{t1}{t2} - \tkzDrawCircle(O,A) - \tkzDrawCircle[thick,color=red](B,z1) - \tkzDrawCircle[thick,color=red](C,t1) - \tkzDrawPoints(t1,t2,C) - \tkzDrawPoints(z1,z2,O,A,B) - \tkzLabelPoints(O,A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.2.tex deleted file mode 100644 index 902c9febe2..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.2.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 141 (Section 18.1.2 : Example with option \tkzname{diameter}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,2){B} - \tkzDefCircle[diameter](A,B) - \tkzGetPoint{O} - \tkzDrawCircle[blue,fill=blue!20](O,B) - \tkzDrawSegment(A,B) - \tkzDrawPoints(A,B,O) - \tkzLabelPoints(A,B,O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.3.tex deleted file mode 100644 index ca0f59c3a7..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.3.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 142 (Section 18.1.3 : Circles inscribed and circumscribed for a given triangle) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(2,2){A} - \tkzDefPoint(5,-2){B} - \tkzDefPoint(1,-2){C} - \tkzDefCircle[in](A,B,C) - \tkzGetPoint{I} \tkzGetLength{rIN} - \tkzDefCircle[circum](A,B,C) - \tkzGetPoint{K} \tkzGetLength{rCI} - \tkzDrawPoints(A,B,C,I,K) - \tkzDrawCircle[R,blue](I,\rIN pt) - \tkzDrawCircle[R,red](K,\rCI pt) - \tkzLabelPoints[below](B,C) - \tkzLabelPoints[above left](A,I,K) - \tkzDrawPolygon(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.4.tex deleted file mode 100644 index 866f0be0cd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.4.tex +++ /dev/null @@ -1,32 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 143 (Section 18.1.4 : Example with option \tkzname{ex}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C} - \tkzDefCircle[ex](B,C,A) - \tkzGetPoint{J_c} \tkzGetLength{rc} - \tkzDefPointBy[projection=onto A--C ](J_c) - \tkzGetPoint{X_c} - \tkzDefPointBy[projection=onto A--B ](J_c) - \tkzGetPoint{Y_c} - \tkzGetPoint{I} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawCircle[R,color=lightgray](J_c,\rc pt) - % possible \tkzDrawCircle[ex](A,B,C) - \tkzDrawCircle[in,color=red](A,B,C) \tkzGetPoint{I} - \tkzDefPointBy[projection=onto A--C ](I) - \tkzGetPoint{F} - \tkzDefPointBy[projection=onto A--B ](I) - \tkzGetPoint{D} - \tkzDrawLines[add=0 and 2.2,dashed](C,A C,B) - \tkzDrawSegments[dashed](J_c,X_c I,D I,F J_c,Y_c) - \tkzMarkRightAngles(A,F,I B,D,I J_c,X_c,A J_c,Y_c,B) - \tkzDrawPoints(B,C,A,I,D,F,X_c,J_c,Y_c) - \tkzLabelPoints(B,A,J_c,I,D,X_c,Y_c) - \tkzLabelPoints[above left](C) - \tkzLabelPoints[left](F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.5.tex deleted file mode 100644 index d88b2286dd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.5.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 144 (Section 18.1.5 : Euler's circle for a given triangle with option \tkzname{euler}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(5,3.5){A} - \tkzDefPoint(0,0){B} \tkzDefPoint(7,0){C} - \tkzDefCircle[euler](A,B,C) - \tkzGetPoint{E} \tkzGetLength{rEuler} - \tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c} - \tkzDrawPoints(A,B,C,E,M_a,M_b,M_c) - \tkzDrawCircle[R,blue](E,\rEuler pt) - \tkzDrawPolygon(A,B,C) - \tkzLabelPoints[below](B,C) - \tkzLabelPoints[left](A,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.6.tex deleted file mode 100644 index 52fea9194b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.6.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 145 (Section 18.1.6 : Apollonius circles for a given segment option \tkzname{apollonius}) - -\begin{tikzpicture}[scale=0.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,0){B} - \tkzDefCircle[apollonius,K=2](A,B) - \tkzGetPoint{K1} - \tkzGetLength{rAp} - \tkzDrawCircle[R,color = blue!50!black, - fill=blue!20,opacity=.4](K1,\rAp pt) - \tkzDefCircle[apollonius,K=3](A,B) - \tkzGetPoint{K2} \tkzGetLength{rAp} - \tkzDrawCircle[R,color=red!50!black, - fill=red!20,opacity=.4](K2,\rAp pt) - \tkzLabelPoints[below](A,B,K1,K2) - \tkzDrawPoints(A,B,K1,K2) - \tkzDrawLine[add=.2 and 1](A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.7.tex deleted file mode 100644 index 6569fd7e1f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.7.tex +++ /dev/null @@ -1,29 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 146 (Section 18.1.7 : Circles exinscribed to a given triangle option \tkzname{ex}) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefPoint(1,2.5){C} - \tkzDefCircle[ex](A,B,C) \tkzGetPoint{I} - \tkzGetLength{rI} - \tkzDefCircle[ex](C,A,B) \tkzGetPoint{J} - \tkzGetLength{rJ} - \tkzDefCircle[ex](B,C,A) \tkzGetPoint{K} - \tkzGetLength{rK} - \tkzDefCircle[in](B,C,A) \tkzGetPoint{O} - \tkzGetLength{rO} - \tkzDrawLines[add=1.5 and 1.5](A,B A,C B,C) - \tkzDrawPoints(I,J,K) - \tkzDrawPolygon(A,B,C) - \tkzDrawPolygon[dashed](I,J,K) - \tkzDrawCircle[R,blue!50!black](O,\rO) - \tkzDrawSegments[dashed](A,K B,J C,I) - \tkzDrawPoints(A,B,C) - \tkzDrawCircles[R](J,{\rJ} I,{\rI} K,{\rK}) - \tkzLabelPoints(A,B,C,I,J,K) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.8.tex deleted file mode 100644 index f228a2c82b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.8.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 147 (Section 18.1.8 : Spieker circle with option \tkzname{spieker}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C} - \tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c} - \tkzDefTriangleCenter[spieker](A,B,C) - \tkzGetPoint{S_p} - \tkzDrawPolygon[blue](A,B,C) - \tkzDrawPolygon[red](M_a,M_b,M_c) - \tkzDrawPoints[blue](B,C,A) - \tkzDrawPoints[red](M_a,M_b,M_c,S_p) - \tkzDrawCircle[in,red](M_a,M_b,M_c) - \tkzAutoLabelPoints[center=S_p,dist=.3](M_a,M_b,M_c) - \tkzLabelPoints[blue,right](S_p) - \tkzAutoLabelPoints[center=S_p](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.9.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.9.tex deleted file mode 100644 index ae4560dbd4..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-18.1.9.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 148 (Section 18.1.9 : Orthogonal circle passing through two given points, option \tkzname{orthogonal through}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){A} - \tkzDrawCircle(O,A) - \tkzDefPoint(-1.5,-1.5){z1} - \tkzDefPoint(1.5,-1.25){z2} - \tkzDefCircle[orthogonal through=z1 and z2](O,A) - \tkzGetPoint{c} - \tkzDrawCircle[thick,color=red](tkzPointResult,z1) - \tkzDrawPoints[fill=red,color=black, - size=4](O,A,z1,z2,c) - \tkzLabelPoints(O,A,z1,z2,c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.1.1.tex deleted file mode 100644 index 2c15cf0d30..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.1.1.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 150 (Section 19.1.1 : Circles and styles, draw a circle and color the disc) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(3,0){A} - \tkzDrawCircle[color=blue](O,A) - \tkzDrawCircle[diameter,color=red,% - line width=2pt,fill=red!40,% - opacity=.5](O,A) - \edef\rayon{\fpeval{0.25*exp(1)}} - \tkzDrawCircle[R,color=orange](O,\rayon cm) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.1.tex deleted file mode 100644 index 118dc56778..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 151 (Section 19.2.1 : Circles defined by a triangle.) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,0){B} - \tkzDefPoint(3,2){C} - \tkzDrawPolygon(A,B,C) - \tkzDrawCircles(A,B B,C C,A) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.2.tex deleted file mode 100644 index 58e454bedb..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.2.tex +++ /dev/null @@ -1,13 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 152 (Section 19.2.2 : Concentric circles.) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDrawCircles[R](A,1cm A,2cm A,3cm) - \tkzDrawPoint(A) - \tkzLabelPoints(A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.3.tex deleted file mode 100644 index 6524868899..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.3.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 153 (Section 19.2.3 : Exinscribed circles.) - -\begin{tikzpicture}[scale=1] -\tkzDefPoints{0/0/A,4/0/B,1/2.5/C} -\tkzDrawPolygon(A,B,C) -\tkzDefCircle[ex](B,C,A) -\tkzGetPoint{J_c} \tkzGetSecondPoint{T_c} -\tkzGetLength{rJc} -\tkzDrawCircle[R](J_c,{\rJc pt}) -\tkzDrawLines[add=0 and 1](C,A C,B) -\tkzDrawSegment(J_c,T_c) -\tkzMarkRightAngle(J_c,T_c,B) -\tkzDrawPoints(A,B,C,J_c,T_c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.4.tex deleted file mode 100644 index 3f9892ed96..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.2.4.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 154 (Section 19.2.4 : Cardioid) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,0){A} - \foreach \ang in {5,10,...,360}{% - \tkzDefPoint(\ang:2){M} - \tkzDrawCircle(M,A) - } -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.3.1.tex deleted file mode 100644 index c0c88b0874..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.3.1.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 155 (Section 19.3.1 : Use of \tkzcname{tkzDrawSemiCircle}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} \tkzDefPoint(6,0){B} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzDrawPolygon(B,C,D,A) - \tkzDefPoint(3,6){F} - \tkzDefTriangle[equilateral](C,D) \tkzGetPoint{I} - \tkzDefPointBy[projection=onto B--C](I) \tkzGetPoint{J} - \tkzInterLL(D,B)(I,J) \tkzGetPoint{K} - \tkzDefPointBy[symmetry=center K](B) \tkzGetPoint{M} - \tkzDrawCircle(M,I) - \tkzCalcLength(M,I) \tkzGetLength{dMI} - \tkzFillPolygon[color = red!50](A,B,C,D) - \tkzFillCircle[R,color = yellow](M,\dMI pt) - \tkzDrawSemiCircle[fill = blue!50!black](F,D)% -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.4.1.tex deleted file mode 100644 index 4f7b6999c5..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.4.1.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 156 (Section 19.4.1 : Example from a sangaku) - -\begin{tikzpicture} - \tkzInit[xmin=0,xmax = 6,ymin=0,ymax=6] - \tkzDefPoint(0,0){B} \tkzDefPoint(6,0){C}% - \tkzDefSquare(B,C) \tkzGetPoints{D}{A} - \tkzClipPolygon(B,C,D,A) - \tkzDefMidPoint(A,D) \tkzGetPoint{F} - \tkzDefMidPoint(B,C) \tkzGetPoint{E} - \tkzDefMidPoint(B,D) \tkzGetPoint{Q} - \tkzDefTangent[from = B](F,A) \tkzGetPoints{G}{H} - \tkzInterLL(F,G)(C,D) \tkzGetPoint{J} - \tkzInterLL(A,J)(F,E) \tkzGetPoint{K} - \tkzDefPointBy[projection=onto B--A](K) - \tkzGetPoint{M} - \tkzFillPolygon[color = green](A,B,C,D) - \tkzFillCircle[color = orange](B,A) - \tkzFillCircle[color = blue!50!black](M,A) - \tkzFillCircle[color = purple](E,B) - \tkzFillCircle[color = yellow](K,Q) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.5.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.5.1.tex deleted file mode 100644 index 14a93fc7b7..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.5.1.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 157 (Section 19.5.1 : Example) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] - \tkzGrid \tkzClip - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,2){O} - \tkzDefPoint(4,4){B} - \tkzDefPoint(6,6){C} - \tkzDrawPoints(O,A,B,C) - \tkzLabelPoints(O,A,B,C) - \tkzDrawCircle(O,A) - \tkzClipCircle(O,A) - \tkzDrawLine(A,C) - \tkzDrawCircle[fill=red!20,opacity=.5](C,O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.6.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.6.1.tex deleted file mode 100644 index 7ff97754d8..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-19.6.1.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 158 (Section 19.6.1 : Example) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} \tkzDefPoint(2,0){N} - \tkzDefPointBy[rotation=center O angle 50](N) - \tkzGetPoint{M} - \tkzDefPointBy[rotation=center O angle -20](N) - \tkzGetPoint{P} - \tkzDefPointBy[rotation=center O angle 125](N) - \tkzGetPoint{P'} - \tkzLabelCircle[above=4pt](O,N)(120){$\mathcal{C}$} - \tkzDrawCircle(O,M) - \tkzFillCircle[color=blue!20,opacity=.4](O,M) - \tkzLabelCircle[R,draw,fill=orange,% - text width=2cm,text centered](O,3 cm)(-60)% - {The circle\\ $\mathcal{C}$} - \tkzDrawPoints(M,P)\tkzLabelPoints[right](M,P) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.1.1.tex deleted file mode 100644 index c691e75cb7..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.1.1.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 159 (Section 20.1.1 : Example of intersection between two straight lines) - -\begin{tikzpicture}[rotate=-45,scale=.75] - \tkzDefPoint(2,1){A} - \tkzDefPoint(6,5){B} - \tkzDefPoint(3,6){C} - \tkzDefPoint(5,2){D} - \tkzDrawLines(A,B C,D) - \tkzInterLL(A,B)(C,D) - \tkzGetPoint{I} - \tkzDrawPoints[color=blue](A,B,C,D) - \tkzDrawPoint[color=red](I) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.1.tex deleted file mode 100644 index 73da7dcf98..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.1.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 160 (Section 20.2.1 : Simple example of a line-circle intersection) - -\begin{tikzpicture}[scale=.75] - \tkzInit[xmax=5,ymax=4] - \tkzDefPoint(1,1){O} - \tkzDefPoint(0,4){A} - \tkzDefPoint(5,0){B} - \tkzDefPoint(3,3){C} - \tkzInterLC(A,B)(O,C) \tkzGetPoints{D}{E} - \tkzDrawCircle(O,C) - \tkzDrawPoints[color=blue](O,A,B,C) - \tkzDrawPoints[color=red](D,E) - \tkzDrawLine(A,B) - \tkzLabelPoints[above right](O,A,B,C,D,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.2.tex deleted file mode 100644 index d54ae9432b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.2.tex +++ /dev/null @@ -1,29 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 161 (Section 20.2.2 : More complex example of a line-circle intersection) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} - \tkzDefMidPoint(A,B) - \tkzGetPoint{O} - \tkzDrawCircle(O,B) - \tkzDefMidPoint(O,B) - \tkzGetPoint{O'} - \tkzDrawCircle(O',B) - \tkzDefTangent[from=A](O',B) - \tkzGetSecondPoint{E} - \tkzInterLC(A,E)(O,B) - \tkzGetSecondPoint{D} - \tkzDefPointBy[projection=onto A--B](D) - \tkzGetPoint{F} - \tkzMarkRightAngle(D,F,B) - \tkzDrawSegments(A,D A,B D,F) - \tkzDrawSegments[color=red,line width=1pt, - opacity=.4](A,O F,B) - \tkzDrawPoints(A,B,O,O',E,D) - \tkzLabelPoints(A,B,O,O',E,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.3.tex deleted file mode 100644 index 6743c5fe38..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.3.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 162 (Section 20.2.3 : Circle defined by a center and a measure, and special cases) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,8){A} \tkzDefPoint(8,0){B} - \tkzDefPoint(8,8){C} \tkzDefPoint(4,4){I} - \tkzDefPoint(2,7){E} \tkzDefPoint(6,4){F} - \tkzDrawCircle[R](I,4 cm) - \tkzInterLC[R](A,C)(I,4 cm) \tkzGetPoints{I1}{I2} - \tkzInterLC[R](B,C)(I,4 cm) \tkzGetPoints{J1}{J2} - \tkzInterLC[R](A,B)(I,4 cm) \tkzGetPoints{K1}{K2} - \tkzDrawPoints[color=red](I1,J1,K1,K2) - \tkzDrawLines(A,B B,C A,C) - \tkzInterLC[R](E,F)(I,4 cm) \tkzGetPoints{I2}{J2} - \tkzDrawPoints[color=blue](E,F) - \tkzDrawPoints[color=red](I2,J2) - \tkzDrawLine(I2,J2) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.4.tex deleted file mode 100644 index b6227cd8c2..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.4.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 163 (Section 20.2.4 : More complex example) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,1){J} - \tkzDefPoint(0,0){O} - \tkzDrawArc[R,line width=1pt,color=red](J,2.5 cm)(180,0) - \foreach \i in {0,-5,-10,...,-85,-90}{ - \tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P} - \tkzDrawSegment[color=orange](J,P) - \tkzInterLC[R](P,J)(O,1 cm) - \tkzGetPoints{M}{N} - \tkzDrawPoints[red](N) - } - \foreach \i in {-90,-95,...,-175,-180}{ - \tkzDefPoint({2.5*cosd(\i)},{1+2.5*sind(\i)}){P} - \tkzDrawSegment[color=orange](J,P) - \tkzInterLC[R](P,J)(O,1 cm) - \tkzGetPoints{M}{N} - \tkzDrawPoints[red](M) - } -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.6.tex deleted file mode 100644 index e8516e5c2e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.6.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 164 (Section 20.2.6 : Calculation of radius example 2) - -\begin{tikzpicture} - \tkzDefPoint(2,2){A} - \tkzDefPoint(5,4){B} - \tkzDefPoint(4,4){O} - \edef\tkzLen{\fpeval{0.0002/0.0001}} - \tkzDrawCircle[R](O,\tkzLen cm) - \tkzInterLC[R](A,B)(O, \tkzLen cm) - \tkzGetPoints{I}{J} - \tkzDrawPoints[color=blue](A,B) - \tkzDrawPoints[color=red](I,J) - \tkzDrawLine(I,J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.7.tex deleted file mode 100644 index c1c56e0d37..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.7.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 165 (Section 20.2.7 : Calculation of radius example 3) - -\begin{tikzpicture} - \tkzDefPoints{2/2/A,5/4/B,4/4/0} - \tkzLength=2cm - \tkzDrawCircle[R](O,\tkzLength) - \tkzInterLC[R](A,B)(O,\tkzLength) - \tkzGetPoints{I}{J} - \tkzDrawPoints[color=blue](A,B) - \tkzDrawPoints[color=red](I,J) - \tkzDrawLine(I,J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.8.tex deleted file mode 100644 index 43eda622ef..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.8.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 166 (Section 20.2.8 : Squares in half a disc) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/A,8/0/B,4/0/I} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzInterLC(I,C)(I,B)\tkzGetPoints{E'}{E} - \tkzInterLC(I,D)(I,B)\tkzGetPoints{F'}{F} - \tkzDefPointsBy[projection = onto A--B](E,F){H,G} - \tkzDefPointsBy[symmetry = center H](I){J} - \tkzDefSquare(H,J)\tkzGetPoints{K}{L} - \tkzDrawSector[fill=brown!30](I,B)(A) - \tkzFillPolygon[color=red!40](H,E,F,G) - \tkzFillPolygon[color=blue!40](H,J,K,L) - \tkzDrawPolySeg[color=red](H,E,F,G) - \tkzDrawPolySeg[color=red](J,K,L) - \tkzDrawPoints(E,G,H,F,J,K,L) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.9.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.9.tex deleted file mode 100644 index 036c15abbc..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.2.9.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 167 (Section 20.2.9 : Option "with nodes") - -\begin{tikzpicture}[scale=.75] -\tkzDefPoints{0/0/A,4/0/B,1/1/D,2/0/E} -\tkzDefTriangle[equilateral](A,B) -\tkzGetPoint{C} -\tkzDrawCircle(C,A) -\tkzInterLC[with nodes](D,E)(C,A,B) -\tkzGetPoints{F}{G} -\tkzDrawPolygon(A,B,C) -\tkzDrawPoints(A,...,G) -\tkzDrawLine(F,G) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.1.tex deleted file mode 100644 index aa438fa1ad..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.1.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 168 (Section 20.3.1 : Construction of an equilateral triangle) - -\begin{tikzpicture}[trim left=-1cm,scale=.5] - \tkzDefPoint(1,1){A} - \tkzDefPoint(5,1){B} - \tkzInterCC(A,B)(B,A)\tkzGetPoints{C}{D} - \tkzDrawPoint[color=black](C) - \tkzDrawCircle[dashed](A,B) - \tkzDrawCircle[dashed](B,A) - \tkzCompass[color=red](A,C) - \tkzCompass[color=red](B,C) - \tkzDrawPolygon(A,B,C) - \tkzMarkSegments[mark=s|](A,C B,C) - \tkzLabelPoints[](A,B) - \tkzLabelPoint[above](C){$C$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.2.tex deleted file mode 100644 index 15b25c6def..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.2.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 169 (Section 20.3.2 : Example a mediator) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,2){B} - \tkzDrawCircle[color=blue](B,A) - \tkzDrawCircle[color=blue](A,B) - \tkzInterCC(B,A)(A,B)\tkzGetPoints{M}{N} - \tkzDrawLine(A,B) - \tkzDrawPoints(M,N) - \tkzDrawLine[color=red](M,N) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.3.tex deleted file mode 100644 index 867efb1726..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.3.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 170 (Section 20.3.3 : An isosceles triangle.) - -\begin{tikzpicture}[rotate=120,scale=.75] - \tkzDefPoint(1,2){A} - \tkzDefPoint(4,0){B} - \tkzInterCC[R](A,4cm)(B,4cm) - \tkzGetPoints{C}{D} - \tkzDrawCircle[R,dashed](A,4 cm) - \tkzDrawCircle[R,dashed](B,4 cm) - \tkzCompass[color=red](A,C) - \tkzCompass[color=red](B,C) - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints[color=blue](A,B,C) - \tkzMarkSegments[mark=s|](A,C B,C) - \tkzLabelPoints[](A,B) - \tkzLabelPoint[above](C){$C$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.4.tex deleted file mode 100644 index eb95cc825c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.4.tex +++ /dev/null @@ -1,36 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 171 (Section 20.3.4 : Segment trisection) - -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,2){B} - \tkzInterCC(A,B)(B,A) - \tkzGetPoints{C}{D} - \tkzInterCC(D,B)(B,A) - \tkzGetPoints{A}{E} - \tkzInterCC(D,B)(A,B) - \tkzGetPoints{F}{B} - \tkzInterLC(E,F)(F,A) - \tkzGetPoints{D}{G} - \tkzInterLL(A,G)(B,E) - \tkzGetPoint{O} - \tkzInterLL(O,D)(A,B) - \tkzGetPoint{J} - \tkzInterLL(O,F)(A,B) - \tkzGetPoint{I} - \tkzDrawCircle(D,A) - \tkzDrawCircle(A,B) - \tkzDrawCircle(B,A) - \tkzDrawCircle(F,A) - \tkzDrawSegments[color=red](O,G - O,B O,D O,F) - \tkzDrawPoints(A,B,D,E,F,G,I,J) - \tkzLabelPoints(A,B,D,E,F,G,I,J) - \tkzDrawSegments[blue](A,B B,D A,D% - A,F F,G E,G B,E) - \tkzMarkSegments[mark=s|](A,I I,J J,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.5.tex deleted file mode 100644 index c0aa5b0ec3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-20.3.5.tex +++ /dev/null @@ -1,25 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 172 (Section 20.3.5 : With the option \tkzimp{with nodes}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/0/a,0/5/B,5/0/C} - \tkzDefPoint(54:5){F} - \tkzDrawCircle[color=gray](A,C) - \tkzInterCC[with nodes](A,A,C)(C,B,F) - \tkzGetPoints{a}{e} - \tkzInterCC(A,C)(a,e) \tkzGetFirstPoint{b} - \tkzInterCC(A,C)(b,a) \tkzGetFirstPoint{c} - \tkzInterCC(A,C)(c,b) \tkzGetFirstPoint{d} - \tkzDrawPoints(a,b,c,d,e) - \tkzDrawPolygon[color=red](a,b,c,d,e) - \foreach \vertex/\num in {a/36,b/108,c/180, - d/252,e/324}{% - \tkzDrawPoint(\vertex) - \tkzLabelPoint[label=\num:$\vertex$](\vertex){} - \tkzDrawSegment[color=gray,style=dashed](A,\vertex) - } -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.1.tex deleted file mode 100644 index 9d9b3fd65e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 173 (Section 21.1.1 : Example with \tkzname{size}) - -\begin{tikzpicture} - \tkzInit - \tkzDefPoints{0/0/O,2.5/0/A,1.5/2/B} - \tkzFillAngle[size=2cm, fill=gray!10](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.2.tex deleted file mode 100644 index 83c04f5a55..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.2.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 175 (Section 21.1.2 : Changing the order of items) - -\begin{tikzpicture} - \tkzInit - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - % Don't forget {} to get, () to use - \tkzFillAngle[size=4cm,left color=white, - right color=red!50](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.3.tex deleted file mode 100644 index ffe82354cd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.1.3.tex +++ /dev/null @@ -1,30 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 176 (Section 21.1.3 : Multiples angles) - -\begin{tikzpicture}[scale=0.75] - \tkzDefPoint(0,0){B} - \tkzDefPoint(8,0){C} - \tkzDefPoint(0,8){A} - \tkzDefPoint(8,8){D} - \tkzDrawPolygon(B,C,D,A) - \tkzDefTriangle[equilateral](B,C) - \tkzGetPoint{M} - \tkzInterLL(D,M)(A,B) \tkzGetPoint{N} - \tkzDefPointBy[rotation=center N angle -60](D) - \tkzGetPoint{L} - \tkzInterLL(N,L)(M,B) \tkzGetPoint{P} - \tkzInterLL(M,C)(D,L) \tkzGetPoint{Q} - \tkzDrawSegments(D,N N,L L,D B,M M,C) - \tkzDrawPoints(L,N,P,Q,M,A,D) - \tkzLabelPoints[left](N,P,Q) - \tkzLabelPoints[above](M,A,D) - \tkzLabelPoints(L,B,C) - \tkzMarkAngles(C,B,M B,M,C M,C,B% - D,L,N L,N,D N,D,L) - \tkzFillAngles[fill=red!20,opacity=.2](C,B,M% - B,M,C M,C,B D,L,N L,N,D N,D,L) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.2.1.tex deleted file mode 100644 index c184076450..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.2.1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 177 (Section 21.2.1 : Example with \tkzname{mark = x}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - \tkzMarkAngle[size = 4cm,mark = x, - arc=ll,mkcolor = red](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.2.2.tex deleted file mode 100644 index 1c0b86ecb4..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.2.2.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 178 (Section 21.2.2 : Example with \tkzname{mark =||}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{0/0/O,5/0/A,3/4/B} - \tkzMarkAngle[size = 4cm,mark = ||, - arc=ll,mkcolor = red](A,O,B) - \tkzDrawLines(O,A O,B) - \tkzDrawPoints(O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.3.1.tex deleted file mode 100644 index 31e94ac28f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.3.1.tex +++ /dev/null @@ -1,28 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 180 (Section 21.3.1 : Example with \tkzname{pos}) - -\begin{tikzpicture}[rotate=30] - \tkzDefPoint(2,1){S} - \tkzDefPoint(7,3){T} - \tkzDefPointBy[rotation=center S angle 60](T) - \tkzGetPoint{P} - \tkzDefLine[bisector,normed](T,S,P) - \tkzGetPoint{s} - \tkzDrawPoints(S,T,P) - \tkzDrawPolygon[color=blue](S,T,P) - \tkzDrawLine[dashed,color=blue,add=0 and 3](S,s) - \tkzLabelPoint[above right](P){$P$} - \tkzLabelPoints(S,T) - \tkzMarkAngle[size = 1.8cm,mark = |,arc=ll, - color = blue](T,S,P) - \tkzMarkAngle[size = 2.1cm,mark = |,arc=l, - color = blue](T,S,s) - \tkzMarkAngle[size = 2.3cm,mark = |,arc=l, - color = blue](s,S,P) - \tkzLabelAngle[pos = 1.5](T,S,P){$60^{\circ}$}% - \tkzLabelAngles[pos = 2.7](T,S,s s,S,P){$30^{\circ}$}% -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.1.tex deleted file mode 100644 index 487190ae1b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 181 (Section 21.4.1 : Example of marking a right angle) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P} - \tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H} - \tkzDrawLines[add=.5 and .5](P,H) - \tkzMarkRightAngle[fill=blue!20,size=.5,draw](A,H,P) - \tkzDrawLines[add=.5 and .5](A,B) - \tkzMarkRightAngle[fill=red!20,size=.8](B,H,P) - \tkzDrawPoints[](A,B,P,H) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.2.tex deleted file mode 100644 index 5e4a94e15a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.2.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 182 (Section 21.4.2 : Example of marking a right angle, german style) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P} - \tkzDefPointBy[projection = onto B--A](P) \tkzGetPoint{H} - \tkzDrawLines[add=.5 and .5](P,H) - \tkzMarkRightAngle[german,size=.5,draw](A,H,P) - \tkzDrawPoints[](A,B,P,H) - \tkzDrawLines[add=.5 and .5,fill=blue!20](A,B) - \tkzMarkRightAngle[german,size=.8](P,H,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.3.tex deleted file mode 100644 index 68bb020c33..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.3.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 183 (Section 21.4.3 : Mix of styles) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(2,5){C} - \tkzDefPointBy[projection=onto B--A](C) - \tkzGetPoint{H} - \tkzDrawLine(A,B) - \tkzDrawLine[add = .5 and .2,color=red](C,H) - \tkzMarkRightAngle[,size=1,color=red](C,H,A) - \tkzMarkRightAngle[german,size=.8,color=blue](B,H,C) - \tkzFillAngle[opacity=.2,fill=blue!20,size=.8](B,H,C) - \tkzLabelPoints(A,B,C,H) - \tkzDrawPoints(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.4.tex deleted file mode 100644 index 41980c3fe0..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-21.4.4.tex +++ /dev/null @@ -1,31 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 184 (Section 21.4.4 : Full example) - -\begin{tikzpicture}[rotate=-90] -\tkzDefPoint(0,1){A} -\tkzDefPoint(2,4){C} -\tkzDefPointWith[orthogonal normed,K=7](C,A) -\tkzGetPoint{B} -\tkzDrawSegment[green!60!black](A,C) -\tkzDrawSegment[green!60!black](C,B) -\tkzDrawSegment[green!60!black](B,A) -\tkzDrawLine[altitude,dashed,color=magenta](B,C,A) -\tkzGetPoint{P} -\tkzLabelPoint[left](A){$A$} -\tkzLabelPoint[right](B){$B$} -\tkzLabelPoint[above](C){$C$} -\tkzLabelPoint[left](P){$P$} -\tkzLabelSegment[auto](B,A){$c$} -\tkzLabelSegment[auto,swap](B,C){$a$} -\tkzLabelSegment[auto,swap](C,A){$b$} -\tkzMarkAngle[size=1cm,color=cyan,mark=|](C,B,A) -\tkzMarkAngle[size=1cm,color=cyan,mark=|](A,C,P) -\tkzMarkAngle[size=0.75cm,color=orange,mark=||](P,C,B) -\tkzMarkAngle[size=0.75cm,color=orange,mark=||](B,A,C) -\tkzMarkRightAngle[german](A,C,B) -\tkzMarkRightAngle[german](B,P,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.2.0.tex deleted file mode 100644 index 1a72d1ac85..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.2.0.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 185 (Section 22.2 : Example of the use of \tkzcname{tkzGetAngle}) - -\begin{tikzpicture} - \tkzInit - \tkzDefPoint(1,5){A} \tkzDefPoint(5,2){B} - \tkzDrawSegment(A,B) - \tkzFindSlopeAngle(A,B)\tkzGetAngle{tkzang} - \tkzDefPointBy[rotation= center A angle \tkzang ](B) - \tkzGetPoint{C} - \tkzDefPointBy[rotation= center A angle -\tkzang ](B) - \tkzGetPoint{D} - \tkzCompass[length=1,dashed,color=red](A,C) - \tkzCompass[delta=10,brown](B,C) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(B,C,D) - \tkzLabelPoints[above left](A) - \tkzDrawSegments[style=dashed,color=orange!30](A,C A,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.3.1.tex deleted file mode 100644 index 1e3dfaf92c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.3.1.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 186 (Section 22.3.1 : Verification of angle measurement) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(-1,1){A} - \tkzDefPoint(5,2){B} - \tkzDefEquilateral(A,B) - \tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzFindAngle(B,A,C) - \tkzGetAngle{angleBAC} - \edef\angleBAC{\fpeval{round(\angleBAC)}} - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(A,B) - \tkzLabelPoint[right](C){$C$} - \tkzLabelAngle(B,A,C){\angleBAC$^\circ$} - \tkzMarkAngle[size=1.5cm](B,A,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.4.0.tex deleted file mode 100644 index ad152a3e8c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.4.0.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 187 (Section 22.4 : Example of the use of \tkzcname{tkzFindAngle} ) - -\begin{tikzpicture} - \tkzInit[xmin=-1,ymin=-1,xmax=7,ymax=7] - \tkzClip - \tkzDefPoint (0,0){O} \tkzDefPoint (6,0){A} - \tkzDefPoint (5,5){B} \tkzDefPoint (3,4){M} - \tkzFindAngle (A,O,M) \tkzGetAngle{an} - \tkzDefPointBy[rotation=center O angle \an](A) - \tkzGetPoint{C} - \tkzDrawSector[fill = blue!50,opacity=.5](O,A)(C) - \tkzFindAngle(M,B,A) \tkzGetAngle{am} - \tkzDefPointBy[rotation = center O angle \am](A) - \tkzGetPoint{D} - \tkzDrawSector[fill = red!50,opacity = .5](O,A)(D) - \tkzDrawPoints(O,A,B,M,C,D) - \tkzLabelPoints(O,A,B,M,C,D) - \edef\an{\fpeval{round(\an,2)}}\edef\am{\fpeval{round(\am,2)}} - \tkzDrawSegments(M,B B,A) - \tkzText(4,2){$\widehat{AOC}=\widehat{AOM}=\an^{\circ}$} - \tkzText(1,4){$\widehat{AOD}=\widehat{MBA}=\am^{\circ}$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.4.1.tex deleted file mode 100644 index 31a340396f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.4.1.tex +++ /dev/null @@ -1,30 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 188 (Section 22.4.1 : Determination of the three angles of a triangle) - -\begin{tikzpicture}[scale=1.25,rotate=30] - \tkzDefPoints{0.5/1.5/A, 3.5/4/B, 6/2.5/C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints[below](A,C) - \tkzLabelPoints[above](B) - \tkzMarkAngle[size=1cm](B,C,A) - \tkzFindAngle(B,C,A) - \tkzGetAngle{angleBCA} - \edef\angleBCA{\fpeval{round(\angleBCA,2)}} - \tkzLabelAngle[pos = 1](B,C,A){$\angleBCA^{\circ}$} - \tkzMarkAngle[size=1cm](C,A,B) - \tkzFindAngle(C,A,B) - \tkzGetAngle{angleBAC} - \edef\angleBAC{\fpeval{round(\angleBAC,2)}} - \tkzLabelAngle[pos = 1.8](C,A,B){% - $\angleBAC^{\circ}$} - \tkzMarkAngle[size=1cm](A,B,C) - \tkzFindAngle(A,B,C) - \tkzGetAngle{angleABC} - \edef\angleABC{\fpeval{round(\angleABC,2)}} - \tkzLabelAngle[pos = 1](A,B,C){$\angleABC^{\circ}$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.5.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.5.0.tex deleted file mode 100644 index 6eeffa8a31..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.5.0.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 189 (Section 22.5 : Determining a slope) - -\begin{tikzpicture}[scale=1.5] - \tkzInit[xmax=4,ymax=5]\tkzGrid[sub] - \tkzDefPoint(1,2){A} \tkzDefPoint(3,4){B} - \tkzDefPoint(3,2){C} \tkzDefPoint(3,1){D} - \tkzDrawSegments(A,B A,C A,D) - \tkzDrawPoints[color=red](A,B,C,D) - \tkzLabelPoints(A,B,C,D) - \tkzFindSlope(A,B){SAB} \tkzFindSlope(A,C){SAC} - \tkzFindSlope(A,D){SAD} - \pgfkeys{/pgf/number format/.cd,fixed,precision=2} - \tkzText[fill=Gold!50,draw=brown](1,4)% - {The slope of (AB) is : $\pgfmathprintnumber{\SAB}$} - \tkzText[fill=Gold!50,draw=brown](1,3.5)% - {The slope of (AC) is : $\pgfmathprintnumber{\SAC}$} - \tkzText[fill=Gold!50,draw=brown](1,3)% - {The slope of (AD) is : $\pgfmathprintnumber{\SAD}$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.6.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.6.1.tex deleted file mode 100644 index a29cfe07ec..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.6.1.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 190 (Section 22.6.1 : Folding) - -\begin{tikzpicture} - \tkzDefPoint(1,5){A} - \tkzDefPoint(5,2){B} - \tkzDrawSegment(A,B) - \tkzFindSlopeAngle(A,B) - \tkzGetAngle{tkzang} - \tkzDefPointBy[rotation= center A angle \tkzang ](B) - \tkzGetPoint{C} - \tkzDefPointBy[rotation= center A angle -\tkzang ](B) - \tkzGetPoint{D} - \tkzCompass[orange,length=1](A,C) - \tkzCompass[orange,delta=10](B,C) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(B,C,D) - \tkzLabelPoints[above left](A) - \tkzDrawSegments[style=dashed,color=orange](A,C A,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.6.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.6.2.tex deleted file mode 100644 index aff651e888..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-22.6.2.tex +++ /dev/null @@ -1,28 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 191 (Section 22.6.2 : Example of the use of \tkzcname{tkzFindSlopeAngle}) - -\begin{tikzpicture} - \tkzInit - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,2){B} - \tkzDefLine[mediator](A,B) - \tkzGetPoints{I}{J} - \tkzCalcLength[cm](A,B) - \tkzGetLength{dAB} - \tkzFindSlopeAngle(A,B) - \tkzGetAngle{tkzangle} - \begin{scope}[rotate=\tkzangle] - \tikzset{arc/.style={color=gray,delta=10}} - \tkzDrawArc[orange,R,arc](B,3/4*\dAB)(120,240) - \tkzDrawArc[orange,R,arc](A,3/4*\dAB)(-45,60) - \tkzDrawLine(I,J) - \tkzDrawSegment(A,B) - \end{scope} - \tkzDrawPoints(A,B,I,J) - \tkzLabelPoints(A,B) - \tkzLabelPoints[right](I,J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.1.tex deleted file mode 100644 index 0839f78e35..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 192 (Section 23.1.1 : \tkzcname{tkzDrawSector} and \tkzname{towards}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzDrawSector[fill=red!50](O,A)(tkzPointResult) - \begin{scope}[shift={(-60:1cm)}] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzDrawSector[fill=blue!50](O,tkzPointResult)(A) - \end{scope} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.2.tex deleted file mode 100644 index 4e09ef65fd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.2.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 193 (Section 23.1.2 : \tkzcname{tkzDrawSector} and \tkzname{rotate}) - -\begin{tikzpicture}[scale=2] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,2){A} - \tkzDrawSector[rotate,draw=red!50!black,% - fill=red!20](O,A)(30) - \tkzDrawSector[rotate,draw=blue!50!black,% - fill=blue!20](O,A)(-30) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.3.tex deleted file mode 100644 index a6d6f744e4..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.3.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 194 (Section 23.1.3 : \tkzcname{tkzDrawSector} and \tkzname{R}) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDrawSector[R,draw=white,% - fill=red!50](O,2cm)(30,90) - \tkzDrawSector[R,draw=white,% - fill=red!60](O,2cm)(90,180) - \tkzDrawSector[R,draw=white,% - fill=red!70](O,2cm)(180,270) - \tkzDrawSector[R,draw=white,% - fill=red!90](O,2cm)(270,360) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.4.tex deleted file mode 100644 index 5ee3aa7053..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.4.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 195 (Section 23.1.4 : \tkzcname{tkzDrawSector} and \tkzname{R}) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){O} - \tkzDefPoint(4,-2){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(3,3){C} - \tkzDrawSector[R with nodes,% - fill=blue!20](O,1 cm)(B,C) - \tkzDrawSector[R with nodes,% - fill=red!20](O,1.25 cm)(A,B) -\tkzDrawSegments(O,A O,B O,C) -\tkzDrawPoints(O,A,B,C) -\tkzLabelPoints(A,B,C) -\tkzLabelPoints[left](O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.5.tex deleted file mode 100644 index 06517ed645..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.1.5.tex +++ /dev/null @@ -1,31 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 196 (Section 23.1.5 : \tkzcname{tkzDrawSector} and \tkzname{R with nodes}) - -\begin{tikzpicture} [scale=.5] - \tkzDefPoint(-1,-2){A} - \tkzDefPoint(1,3){B} - \tkzDefRegPolygon[side,sides=6](A,B) - \tkzGetPoint{O} - \tkzDrawPolygon[fill=black!10, - draw=blue](P1,P...,P6) - \tkzLabelRegPolygon[sep=1.05](O){A,...,F} - \tkzDrawCircle[dashed](O,A) - \tkzLabelSegment[above,sloped, - midway](A,B){\(A B = 16m\)} - \foreach \i [count=\xi from 1] in {2,...,6,1} - {% - \tkzDefMidPoint(P\xi,P\i) - \path (O) to [pos=1.1] node {\xi} (tkzPointResult) ; - } - \tkzDefRandPointOn[segment = P3--P5] - \tkzGetPoint{S} - \tkzDrawSegments[thick,dashed,red](A,S S,B) - \tkzDrawPoints(P1,P...,P6,S) - \tkzLabelPoint[left,above](S){$S$} - \tkzDrawSector[R with nodes,fill=red!20](S,2 cm)(A,B) - \tkzLabelAngle[pos=1.5](A,S,B){$\alpha$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.2.1.tex deleted file mode 100644 index af2e378076..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.2.1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 197 (Section 23.2.1 : \tkzcname{tkzFillSector} and \tkzname{towards}) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzFillSector[fill=red!50](O,A)(tkzPointResult) - \begin{scope}[shift={(-60:1cm)}] - \tkzDefPoint(0,0){O} - \tkzDefPoint(-30:3){A} - \tkzDefPointBy[rotation = center O angle -60](A) - \tkzFillSector[color=blue!50](O,tkzPointResult)(A) - \end{scope} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.2.2.tex deleted file mode 100644 index 55adc0d7b8..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.2.2.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 198 (Section 23.2.2 : \tkzcname{tkzFillSector} and \tkzname{rotate}) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} \tkzDefPoint(2,2){A} - \tkzFillSector[rotate,color=red!20](O,A)(30) - \tkzFillSector[rotate,color=blue!20](O,A)(-30) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.3.1.tex deleted file mode 100644 index 8053d152a0..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-23.3.1.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 199 (Section 23.3.1 : \tkzcname{tkzClipSector}) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(1,1){B} - \tkzDrawSector[color=blue,dashed](O,A)(B) - \tkzDrawSector[color=blue](O,B)(A) - \tkzClipBB - \begin{scope} - \tkzClipSector(O,B)(A) - \draw[fill=gray!20] (-1,0) rectangle (3,3); - \end{scope} - \tkzDrawPoints(A,B,O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.1.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.1.0.tex deleted file mode 100644 index 251fdfe91e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.1.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 200 (Section 24.1 : Option \tkzname{towards}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPointBy[rotation= center O angle 90](A) - \tkzGetPoint{B} - \tkzDrawArc[color=blue,<->](O,A)(B) - \tkzDrawArc(O,B)(A) - \tkzDrawLines[add = 0 and .5](O,A O,B) - \tkzDrawPoints(O,A,B) - \tkzLabelPoints[below](O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.2.0.tex deleted file mode 100644 index 143f59aeea..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.2.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 201 (Section 24.2 : Option \tkzname{towards}) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(1,1){B} - \tkzDrawArc[color=blue,->](O,A)(B) - \tkzDrawArc[color=gray](O,B)(A) - \tkzDrawArc(O,B)(A) - \tkzDrawLines[add = 0 and .5](O,A O,B) - \tkzDrawPoints(O,A,B) - \tkzLabelPoints[below](O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.3.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.3.0.tex deleted file mode 100644 index c1b2b4d8e9..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.3.0.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 202 (Section 24.3 : Option \tkzname{rotate}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-2){A} - \tkzDefPoint(60:2){B} - \tkzDrawLines[add = 0 and .5](O,A O,B) - \tkzDrawArc[rotate,color=red](O,A)(180) - \tkzDrawPoints(O,A,B) - \tkzLabelPoints[below](O,A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.4.0.tex deleted file mode 100644 index c55b79cd56..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.4.0.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 203 (Section 24.4 : Option \tkzname{R}) - -\begin{tikzpicture} - \tkzDefPoints{0/0/O} - \tikzset{compass style/.append style={<->}} - \tkzDrawArc[R,color=orange,double](O,3cm)(270,360) - \tkzDrawArc[R,color=blue,double](O,2cm)(0,270) - \tkzDrawPoint(O) - \tkzLabelPoint[below](O){$O$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.5.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.5.0.tex deleted file mode 100644 index 3d7b5106b3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.5.0.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 204 (Section 24.5 : Option \tkzname{R with nodes}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(1,1){B} - \tkzCalcLength(B,A)\tkzGetLength{radius} - \tkzDrawArc[R with nodes](B,\radius pt)(A,O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.6.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.6.0.tex deleted file mode 100644 index d4cd3ba9d0..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.6.0.tex +++ /dev/null @@ -1,25 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 205 (Section 24.6 : Option \tkzname{delta}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPointBy[rotation= center A angle 60](B) - \tkzGetPoint{C} - \tkzSetUpLine[color=gray] - \tkzDefPointBy[symmetry= center C](A) - \tkzGetPoint{D} - \tkzDrawSegments(A,B A,D) - \tkzDrawLine(B,D) - \tkzSetUpCompass[color=orange] - \tkzDrawArc[orange,delta=10](A,B)(C) - \tkzDrawArc[orange,delta=10](B,C)(A) - \tkzDrawArc[orange,delta=10](C,D)(D) - \tkzDrawPoints(A,B,C,D) - \tkzLabelPoints(A,B,C,D) - \tkzMarkRightAngle(D,B,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.7.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.7.0.tex deleted file mode 100644 index 2342487cac..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.7.0.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 206 (Section 24.7 : Option \tkzname{angles}: example 1) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPoint(2.5,0){O} - \tkzDefPointBy[rotation=center O angle 60](B) - \tkzGetPoint{D} - \tkzDefPointBy[symmetry=center D](O) - \tkzGetPoint{E} - \tkzSetUpLine[color=Maroon] - \tkzDrawArc[angles](O,B)(0,180) - \tkzDrawArc[angles,](B,O)(100,180) - \tkzCompass[delta=20](D,E) - \tkzDrawLines(A,B O,E B,E) - \tkzDrawPoints(A,B,O,D,E) - \tkzLabelPoints(A,B,O,D,E) - \tkzMarkRightAngle(O,B,E) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.8.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.8.0.tex deleted file mode 100644 index 44acdc3c22..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-24.8.0.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 207 (Section 24.8 : Option \tkzname{angles}: example 2) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(5,0){I} - \tkzDefPoint(0,5){J} - \tkzInterCC(O,I)(I,O)\tkzGetPoints{B}{C} - \tkzInterCC(O,I)(J,O)\tkzGetPoints{D}{A} - \tkzInterCC(I,O)(J,O)\tkzGetPoints{L}{K} - \tkzDrawArc[angles](O,I)(0,90) - \tkzDrawArc[angles,color=gray,style=dashed](I,O)(90,180) - \tkzDrawArc[angles,color=gray,style=dashed](J,O)(-90,0) - \tkzDrawPoints(A,B,K) - \foreach \point in {I,A,B,J,K}{\tkzDrawSegment(O,\point)} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.1.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.1.0.tex deleted file mode 100644 index e451aef646..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.1.0.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 208 (Section 25.1 : Duplicate a segment) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(2,-3){B} - \tkzDefPoint(2,5){C} - \tkzDrawSegments[red](A,B A,C) - \tkzDuplicateSegment(A,B)(A,C) - \tkzGetPoint{D} - \tkzDrawSegment[green](A,D) - \tkzDrawPoints[color=red](A,B,C,D) - \tkzLabelPoints[above right=3pt](A,B,C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.1.1.tex deleted file mode 100644 index 25f1c12349..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.1.1.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 209 (Section 25.1.1 : Proportion of gold with \tkzcname{tkzDuplicateSegment}) - -\begin{tikzpicture}[rotate=-90,scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(10,0){B} - \tkzDefMidPoint(A,B) - \tkzGetPoint{I} - \tkzDefPointWith[orthogonal,K=-.75](B,A) - \tkzGetPoint{C} - \tkzInterLC(B,C)(B,I) \tkzGetSecondPoint{D} - \tkzDuplicateSegment(B,D)(D,A) \tkzGetPoint{E} - \tkzInterLC(A,B)(A,E) \tkzGetPoints{N}{M} - \tkzDrawArc[orange,delta=10](D,E)(B) - \tkzDrawArc[orange,delta=10](A,M)(E) - \tkzDrawLines(A,B B,C A,D) - \tkzDrawArc[orange,delta=10](B,D)(I) - \tkzDrawPoints(A,B,D,C,M,I,N) - \tkzLabelPoints(A,B,D,C,M,I,N) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.2.1.tex deleted file mode 100644 index 95f9d4128d..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.2.1.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 210 (Section 25.2.1 : Compass square construction) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} - \tkzDrawLine[add= .6 and .2](A,B) - \tkzCalcLength[cm](A,B)\tkzGetLength{dAB} - \tkzDefLine[perpendicular=through A](A,B) - \tkzDrawLine(A,tkzPointResult) \tkzGetPoint{D} - \tkzShowLine[orthogonal=through A,gap=2](A,B) - \tkzMarkRightAngle(B,A,D) - \tkzVecKOrth[-1](B,A)\tkzGetPoint{C} - \tkzCompasss(A,D D,C) - \tkzDrawArc[R](B,\dAB)(80,110) - \tkzDrawPoints(A,B,C,D) - \tkzDrawSegments[color=gray,style=dashed](B,C C,D) - \tkzLabelPoints(A,B,C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.4.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.4.1.tex deleted file mode 100644 index 6a894f4f6e..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.4.1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 211 (Section 25.4.1 : Example) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,-4){B} - \tkzDefCircle[through](A,B) - \tkzGetLength{rABpt} - \tkzpttocm(\rABpt){rABcm} - \tkzDrawCircle(A,B) - \tkzDrawPoints(A,B) - \tkzLabelPoints(A,B) - \tkzDrawSegment[dashed](A,B) - \tkzLabelSegment(A,B){$\pgfmathprintnumber{\rABcm}$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.5.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.5.1.tex deleted file mode 100644 index 9097cd3263..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.5.1.tex +++ /dev/null @@ -1,19 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 212 (Section 25.5.1 : Coordinate transfer with \tkzcname{tkzGetPointCoord}) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=3] - \tkzGrid[sub,orange] - \tkzAxeXY - \tkzDefPoint(1,0){A} - \tkzDefPoint(4,2){B} - \tkzGetPointCoord(A){a} - \tkzGetPointCoord(B){b} - \tkzDefPoint(\ax,\ay){C} - \tkzDefPoint(\bx,\by){D} - \tkzDrawPoints[color=red](C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.5.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.5.2.tex deleted file mode 100644 index 96fdfbdef3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-25.5.2.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 213 (Section 25.5.2 : Sum of vectors with \tkzcname{tkzGetPointCoord}) - -\begin{tikzpicture}[>=latex] - \tkzDefPoint(1,4){a} - \tkzDefPoint(3,2){b} - \tkzDefPoint(1,1){c} - \tkzDrawSegment[->,red](a,b) - \tkzGetPointCoord(c){c} - \draw[color=blue,->](a) -- ([shift=(b)]\cx,\cy) ; - \draw[color=purple,->](b) -- ([shift=(b)]\cx,\cy) ; - \tkzDrawSegment[->,blue](a,c) - \tkzDrawSegment[->,purple](b,c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.1.1.tex deleted file mode 100644 index 0403f58fc4..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.1.1.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 214 (Section 26.1.1 : Option \tkzname{length}) - -\begin{tikzpicture} - \tkzDefPoint(1,1){A} - \tkzDefPoint(6,1){B} - \tkzInterCC[R](A,4cm)(B,3cm) - \tkzGetPoints{C}{D} - \tkzDrawPoint(C) - \tkzCompass[color=red,length=1.5](A,C) - \tkzCompass[color=red](B,C) - \tkzDrawSegments(A,B A,C B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.1.2.tex deleted file mode 100644 index 54f3c917c6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.1.2.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 215 (Section 26.1.2 : Option \tkzname{delta}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzInterCC[R](A,4cm)(B,3cm) - \tkzGetPoints{C}{D} - \tkzDrawPoints(A,B,C) - \tkzCompass[color=red,delta=20](A,C) - \tkzCompass[color=red,delta=20](B,C) - \tkzDrawPolygon(A,B,C) - \tkzMarkAngle(A,C,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.2.0.tex deleted file mode 100644 index 1083b097b3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.2.0.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 216 (Section 26.2 : Multiple constructions \tkzcname{tkzCompasss}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(2,2){A} \tkzDefPoint(5,-2){B} - \tkzDefPoint(3,4){C} \tkzDrawPoints(A,B) - \tkzDrawPoint[color=red,shape=cross out](C) - \tkzCompasss[color=orange](A,B A,C B,C C,B) - \tkzShowLine[mediator,color=red, - dashed,length = 2](A,B) - \tkzShowLine[parallel = through C, - color=blue,length=2](A,B) - \tkzDefLine[mediator](A,B) \tkzGetPoints{i}{j} - \tkzDefLine[parallel=through C](A,B) \tkzGetPoint{D} - \tkzDrawLines[add=.6 and .6](C,D A,C B,D) - \tkzDrawLines(i,j) \tkzDrawPoints(A,B,C,i,j,D) - \tkzLabelPoints(A,B,C,i,j,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.3.1.tex deleted file mode 100644 index c9e0c91aae..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-26.3.1.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 217 (Section 26.3.1 : Use of \tkzcname{tkzSetUpCompass}) - -\begin{tikzpicture}[scale=.75, - showbi/.style={bisector,size=2,gap=3}] - \tkzSetUpCompass[color=blue,line width=.3 pt] - \tkzDefPoints{0/1/A, 8/3/B, 3/6/C} - \tkzDrawPolygon(A,B,C) - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzShowLine[showbi](B,A,C) - \tkzShowLine[showbi](C,B,A) - \tkzInterLL(A,a)(B,b) \tkzGetPoint{I} - \tkzDefPointBy[projection= onto A--B](I) - \tkzGetPoint{H} - \tkzDrawCircle[radius,color=gray](I,H) - \tkzDrawSegments[color=gray!50](I,H) - \tkzDrawLines[add=0 and -.2,color=blue!50 ](A,a B,b) - \tkzShowBB -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.1.tex deleted file mode 100644 index cd5016ccb3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.1.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 218 (Section 27.1.1 : Example of \tkzcname{tkzShowLine} and \tkzname{parallel}) - -\begin{tikzpicture} - \tkzDefPoints{-1.5/-0.25/A,1/-0.75/B,-1.5/2/C} - \tkzDrawLine(A,B) - \tkzDefLine[parallel=through C](A,B) \tkzGetPoint{c} - \tkzShowLine[parallel=through C](A,B) - \tkzDrawLine(C,c) \tkzDrawPoints(A,B,C,c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.2.tex deleted file mode 100644 index 60d65e5c59..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.2.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 219 (Section 27.1.2 : Example of \tkzcname{tkzShowLine} and \tkzname{perpendicular}) - -\begin{tikzpicture} -\tkzDefPoints{0/0/A, 3/2/B, 2/2/C} -\tkzDefLine[perpendicular=through C,K=-.5](A,B) \tkzGetPoint{c} -\tkzShowLine[perpendicular=through C,K=-.5,gap=3](A,B) -\tkzDefPointBy[projection=onto A--B](c)\tkzGetPoint{h} -\tkzMarkRightAngle[fill=lightgray](A,h,C) -\tkzDrawLines[add=.5 and .5](A,B C,c) -\tkzDrawPoints(A,B,C,h,c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.3.tex deleted file mode 100644 index bf15e64e8f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.3.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 220 (Section 27.1.3 : Example of \tkzcname{tkzShowLine} and \tkzname{bisector}) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoints{0/0/A, 4/2/B, 1/4/C} - \tkzDrawPolygon(A,B,C) - \tkzSetUpCompass[color=brown,line width=.1 pt] - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzInterLL(A,a)(B,b) \tkzGetPoint{I} - \tkzDefPointBy[projection = onto A--B](I) - \tkzGetPoint{H} - \tkzShowLine[bisector,size=2,gap=3,blue](B,A,C) - \tkzShowLine[bisector,size=2,gap=3,blue](C,B,A) - \tkzDrawCircle[radius,color=blue,% - line width=.2pt](I,H) - \tkzDrawSegments[color=red!50](I,tkzPointResult) - \tkzDrawLines[add=0 and -0.3,color=red!50](A,a B,b) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.4.tex deleted file mode 100644 index 96dd4c211a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.1.4.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 221 (Section 27.1.4 : Example of \tkzcname{tkzShowLine} and \tkzname{mediator}) - -\begin{tikzpicture} -\tkzDefPoint(2,2){A} -\tkzDefPoint(5,4){B} -\tkzDrawPoints(A,B) -\tkzShowLine[mediator,color=orange,length=1](A,B) -\tkzGetPoints{i}{j} -\tkzDrawLines[add=-0.1 and -0.1](i,j) -\tkzDrawLines(A,B) -\tkzLabelPoints[below =3pt](A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.2.1.tex deleted file mode 100644 index e1160c2c2b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.2.1.tex +++ /dev/null @@ -1,34 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 222 (Section 27.2.1 : Example of the use of \tkzcname{tkzShowTransformation}) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(0,0){O} \tkzDefPoint(2,-2){A} - \tkzDefPoint(70:4){B} \tkzDrawPoints(A,O,B) - \tkzLabelPoints(A,O,B) - \tkzDrawLine[add= 2 and 2](O,A) - \tkzDefPointBy[translation=from O to A](B) - \tkzGetPoint{C} - \tkzDrawPoint[color=orange](C) \tkzLabelPoints(C) - \tkzShowTransformation[translation=from O to A,% - length=2](B) - \tkzDrawSegments[->,color=orange](O,A B,C) - \tkzDefPointBy[reflection=over O--A](B) \tkzGetPoint{E} - \tkzDrawSegment[blue](B,E) - \tkzDrawPoint[color=blue](E)\tkzLabelPoints(E) - \tkzShowTransformation[reflection=over O--A,size=2](B) - \tkzDefPointBy[symmetry=center O](B) \tkzGetPoint{F} - \tkzDrawSegment[color=green](B,F) - \tkzDrawPoint[color=green](F)\tkzLabelPoints(F) - \tkzShowTransformation[symmetry=center O,% - length=2](B) - \tkzDefPointBy[projection=onto O--A](C) - \tkzGetPoint{H} - \tkzDrawSegments[color=magenta](C,H) - \tkzDrawPoint[color=magenta](H)\tkzLabelPoints(H) - \tkzShowTransformation[projection=onto O--A,% - color=red,size=3,gap=-2](C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.2.2.tex deleted file mode 100644 index 27dedda2cf..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-27.2.2.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 223 (Section 27.2.2 : Another example of the use of \tkzcname{tkzShowTransformation}) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoints{0/0/A,8/0/B,3.5/10/I} - \tkzDefMidPoint(A,B) \tkzGetPoint{O} - \tkzDefPointBy[projection=onto A--B](I) - \tkzGetPoint{J} - \tkzInterLC(I,A)(O,A) \tkzGetPoints{M'}{M} - \tkzInterLC(I,B)(O,A) \tkzGetPoints{N}{N'} - \tkzDrawSemiCircle[diameter](A,B) - \tkzDrawSegments(I,A I,B A,B B,M A,N) - \tkzMarkRightAngles(A,M,B A,N,B) - \tkzDrawSegment[style=dashed,color=blue](I,J) - \tkzShowTransformation[projection=onto A--B, - color=red,size=3,gap=-3](I) - \tkzDrawPoints[color=red](M,N) - \tkzDrawPoints[color=blue](O,A,B,I) - \tkzLabelPoints(O) - \tkzLabelPoints[above right](N,I) - \tkzLabelPoints[below left](M,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-28.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-28.1.1.tex deleted file mode 100644 index 8a7b00c1cd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-28.1.1.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 224 (Section 28.1.1 : Using \tkzcname{tkzDefEquiPoints} with options) - -\begin{tikzpicture} - \tkzSetUpCompass[color=purple,line width=1pt] - \tkzDefPoint(0,1){A} - \tkzDefPoint(5,2){B} - \tkzDefPoint(3,4){C} - \tkzDefEquiPoints[from=C,dist=1,show, - /tkzcompass/delta=20](A,B) - \tkzGetPoints{E}{H} - \tkzDrawLines[color=blue](C,E C,H A,B) - \tkzDrawPoints[color=blue](A,B,C) - \tkzDrawPoints[color=red](E,H) - \tkzLabelPoints(E,H) - \tkzLabelPoints[color=blue](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-29.1.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-29.1.0.tex deleted file mode 100644 index 6e0803cb62..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-29.1.0.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 225 (Section 29.1 : The circular protractor) - -\begin{tikzpicture}[scale=.5] -\tkzDefPoint(2,0){A}\tkzDefPoint(0,0){O} -\tkzDefShiftPoint[A](31:5){B} -\tkzDefShiftPoint[A](158:5){C} -\tkzDrawPoints(A,B,C) -\tkzDrawSegments[color = red, - line width = 1pt](A,B A,C) - \tkzProtractor[scale = 1](A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-29.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-29.2.0.tex deleted file mode 100644 index d39457cf57..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-29.2.0.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 226 (Section 29.2 : The circular protractor, transparent and returned) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(2,3){A} - \tkzDefShiftPoint[A](31:5){B} - \tkzDefShiftPoint[A](158:5){C} - \tkzDrawSegments[color=red,line width=1pt](A,B A,C) - \tkzProtractor[return](A,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.2.tex deleted file mode 100644 index 1b7d2216ba..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.2.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 227 (Section 30.1.2 : Revised version of "Tangente") - -\begin{tikzpicture}[scale=.8,rotate=60] - \tkzDefPoint(6,0){X} \tkzDefPoint(3,3){Y} - \tkzDefShiftPoint[X](-110:6){A} \tkzDefShiftPoint[X](-70:6){B} - \tkzDefShiftPoint[Y](-110:4.2){A'} \tkzDefShiftPoint[Y](-70:4.2){B'} - \tkzDefPointBy[translation= from A' to B ](Y) \tkzGetPoint{Y} - \tkzDefPointBy[translation= from A' to B ](B') \tkzGetPoint{C} - \tkzInterLL(A,B)(X,Y) \tkzGetPoint{O} - \tkzDefMidPoint(X,Y) \tkzGetPoint{I} - \tkzDefPointWith[orthogonal](I,Y) - \tkzInterLL(I,tkzPointResult)(A,B) \tkzGetPoint{Z} - \tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O} - \tkzDrawCircle(O,X) - \tkzDrawLines[add = 0 and 1.5](A,C) \tkzDrawLines[add = 0 and 3](X,Y) - \tkzDrawSegments(A,X B,X B,Y C,Y) \tkzDrawSegments[color=red](X,Z Y,Z) - \tkzDrawPoints(A,B,C,X,Y,O,Z) - \tkzLabelPoints(A,B,C,Z) \tkzLabelPoints[above right](X,Y,O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.3.tex deleted file mode 100644 index 9d4e24c0ba..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.3.tex +++ /dev/null @@ -1,28 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 228 (Section 30.1.3 : "Le Monde" version) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A} - \tkzDefPoint(3,0){B} - \tkzDefPoint(9,0){C} - \tkzDefPoint(1.5,2){X} - \tkzDefPoint(6,4){Y} - \tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O} - \tkzDefMidPoint(X,Y) \tkzGetPoint{I} - \tkzDefPointWith[orthogonal](I,Y) \tkzGetPoint{i} - \tkzDrawLines[add = 2 and 1,color=orange](I,i) - \tkzInterLL(I,i)(A,B) \tkzGetPoint{Z} - \tkzInterLC(I,i)(O,B) \tkzGetSecondPoint{M} - \tkzDefPointWith[orthogonal](B,Z) \tkzGetPoint{b} - \tkzDrawCircle(O,B) - \tkzDrawLines[add = 0 and 2,color=orange](B,b) - \tkzDrawSegments(A,X B,X B,Y C,Y A,C X,Y) - \tkzDrawSegments[color=red](X,Z Y,Z) - \tkzDrawPoints(A,B,C,X,Y,Z,M,I) - \tkzLabelPoints(A,B,C,Z) - \tkzLabelPoints[above right](X,Y,M,I) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.4.tex deleted file mode 100644 index e2c28fa15d..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.4.tex +++ /dev/null @@ -1,31 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 229 (Section 30.1.4 : Triangle altitudes) - -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(0,0){C} - \tkzDefPoint(7,0){B} - \tkzDefPoint(5,6){A} - \tkzDrawPolygon(A,B,C) - \tkzDefMidPoint(C,B) - \tkzGetPoint{I} - \tkzDrawArc(I,B)(C) - \tkzInterLC(A,C)(I,B) - \tkzGetSecondPoint{B'} - \tkzInterLC(A,B)(I,B) - \tkzGetFirstPoint{C'} - \tkzInterLL(B,B')(C,C') - \tkzGetPoint{H} - \tkzInterLL(A,H)(C,B) - \tkzGetPoint{A'} - \tkzDefCircle[circum](A,B',C') - \tkzGetPoint{O} - \tkzDrawCircle[color=red](O,A) - \tkzDrawSegments[color=orange](B,B' C,C' A,A') - \tkzMarkRightAngles(C,B',B B,C',C C,A',A) - \tkzDrawPoints(A,B,C,A',B',C',H) - \tkzLabelPoints(A,B,C,A',B',C',H) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.5.tex deleted file mode 100644 index 68bedb7537..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.1.5.tex +++ /dev/null @@ -1,33 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 230 (Section 30.1.5 : Altitudes - other construction) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoint(0,0){A} - \tkzDefPoint(8,0){B} - \tkzDefPoint(3.5,10){C} - \tkzDefMidPoint(A,B) - \tkzGetPoint{O} - \tkzDefPointBy[projection=onto A--B](C) - \tkzGetPoint{P} - \tkzInterLC(C,A)(O,A) - \tkzGetSecondPoint{M} - \tkzInterLC(C,B)(O,A) - \tkzGetFirstPoint{N} - \tkzInterLL(B,M)(A,N) - \tkzGetPoint{I} - \tkzDrawCircle[diameter](A,B) - \tkzDrawSegments(C,A C,B A,B B,M A,N) - \tkzMarkRightAngles[fill=brown!20](A,M,B A,N,B A,P,C) - \tkzDrawSegment[style=dashed,color=orange](C,P) - \tkzLabelPoints(O,A,B,P) - \tkzLabelPoint[left](M){$M$} - \tkzLabelPoint[right](N){$N$} - \tkzLabelPoint[above](C){$C$} - \tkzLabelPoint[above right](I){$I$} - \tkzDrawPoints[color=red](M,N,P,I) - \tkzDrawPoints[color=brown](O,A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.1.tex deleted file mode 100644 index e701c79437..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 231 (Section 30.2.1 : Square root of the integers) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){a0} - \tkzDrawSegment[blue](O,a0) - \foreach \i [count=\j] in {0,...,10}{% - \tkzDefPointWith[orthogonal normed](a\i,O) - \tkzGetPoint{a\j} - \tkzDrawPolySeg[color=blue](a\i,a\j,O)} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.10.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.10.tex deleted file mode 100644 index 7ae1ec1a7f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.10.tex +++ /dev/null @@ -1,58 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 240 (Section 30.2.10 : Example 2: from Indonesia) - -\begin{tikzpicture}[pol/.style={fill=brown!40,opacity=.5}, - seg/.style={tkzdotted,color=gray}, - hidden pt/.style={fill=gray!40}, - mra/.style={color=gray!70,tkzdotted,/tkzrightangle/size=.2}, - scale=3] - \tkzSetUpPoint[size=2] - \tkzDefPoints{0/0/A,2.5/0/B,1.33/0.75/D,0/2.5/E,2.5/2.5/F} - \tkzDefLine[parallel=through D](A,B) \tkzGetPoint{I1} - \tkzDefLine[parallel=through B](A,D) \tkzGetPoint{I2} - \tkzInterLL(D,I1)(B,I2) \tkzGetPoint{C} - \tkzDefLine[parallel=through E](A,D) \tkzGetPoint{I3} - \tkzDefLine[parallel=through D](A,E) \tkzGetPoint{I4} - \tkzInterLL(E,I3)(D,I4) \tkzGetPoint{H} - \tkzDefLine[parallel=through F](E,H) \tkzGetPoint{I5} - \tkzDefLine[parallel=through H](E,F) \tkzGetPoint{I6} - \tkzInterLL(F,I5)(H,I6) \tkzGetPoint{G} - \tkzDefMidPoint(G,H) \tkzGetPoint{P} - \tkzDefMidPoint(G,C) \tkzGetPoint{Q} - \tkzDefMidPoint(B,C) \tkzGetPoint{R} - \tkzDefMidPoint(A,B) \tkzGetPoint{S} - \tkzDefMidPoint(A,E) \tkzGetPoint{T} - \tkzDefMidPoint(E,H) \tkzGetPoint{U} - \tkzDefMidPoint(A,D) \tkzGetPoint{M} - \tkzDefMidPoint(D,C) \tkzGetPoint{N} - \tkzInterLL(B,D)(S,R) \tkzGetPoint{L} - \tkzInterLL(H,F)(U,P) \tkzGetPoint{K} - \tkzDefLine[parallel=through K](D,H) \tkzGetPoint{I7} - \tkzInterLL(K,I7)(B,D) \tkzGetPoint{O} - - \tkzFillPolygon[pol](P,Q,R,S,T,U) - \tkzDrawSegments[seg](K,O K,L P,Q R,S T,U - C,D H,D A,D M,N B,D) - \tkzDrawSegments(E,H B,C G,F G,H G,C Q,R S,T U,P H,F) - \tkzDrawPolygon(A,B,F,E) - \tkzDrawPoints(A,B,C,E,F,G,H,P,Q,R,S,T,U,K) - \tkzDrawPoints[hidden pt](M,N,O,D) - \tkzMarkRightAngle[mra](L,O,K) - \tkzMarkSegments[mark=|,size=1pt,thick,color=gray](A,S B,S B,R C,R - Q,C Q,G G,P H,P - E,U H,U E,T A,T) - - \tkzLabelAngle[pos=.3](K,L,O){$\alpha$} - \tkzLabelPoints[below](O,A,S,B) - \tkzLabelPoints[above](H,P,G) - \tkzLabelPoints[left](T,E) - \tkzLabelPoints[right](C,Q) - \tkzLabelPoints[above left](U,D,M) - \tkzLabelPoints[above right](L,N) - \tkzLabelPoints[below right](F,R) - \tkzLabelPoints[below left](K) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.11.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.11.tex deleted file mode 100644 index 936ce71654..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.11.tex +++ /dev/null @@ -1,39 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 241 (Section 30.2.11 : Three circles) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoints{0/0/A,8/0/B,0/4/a,8/4/b,8/8/c} - \tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C} - \tkzDrawPolygon(A,B,C) - \tkzDefSquare(A,B) \tkzGetPoints{D}{E} - \tkzClipBB - \tkzDefMidPoint(A,B) \tkzGetPoint{M} - \tkzDefMidPoint(B,C) \tkzGetPoint{N} - \tkzDefMidPoint(A,C) \tkzGetPoint{P} - \tkzDrawSemiCircle[gray,dashed](M,B) - \tkzDrawSemiCircle[gray,dashed](A,M) - \tkzDrawSemiCircle[gray,dashed](A,B) - \tkzDrawCircle[gray,dashed](B,A) - \tkzInterLL(A,N)(M,a) \tkzGetPoint{Ia} - \tkzDefPointBy[projection = onto A--B](Ia) - \tkzGetPoint{ha} - \tkzDrawCircle[gray](Ia,ha) - \tkzInterLL(B,P)(M,b) \tkzGetPoint{Ib} - \tkzDefPointBy[projection = onto A--B](Ib) - \tkzGetPoint{hb} - \tkzDrawCircle[gray](Ib,hb) - \tkzInterLL(A,c)(M,C) \tkzGetPoint{Ic} - \tkzDefPointBy[projection = onto A--C](Ic) - \tkzGetPoint{hc} - \tkzDrawCircle[gray](Ic,hc) - \tkzInterLL(A,Ia)(B,Ib) \tkzGetPoint{G} - \tkzDrawCircle[gray,dashed](G,Ia) - \tkzDrawPolySeg(A,E,D,B) - \tkzDrawPoints(A,B,C) - \tkzDrawPoints(G,Ia,Ib,Ic) - \tkzDrawSegments[gray,dashed](C,M A,N B,P M,a M,b A,a a,b b,B A,D Ia,ha) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.12.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.12.tex deleted file mode 100644 index 8be2c168cd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.12.tex +++ /dev/null @@ -1,50 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 242 (Section 30.2.12 : "The" Circle of APOLLONIUS) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefTriangleCenter[euler](A,B,C) \tkzGetPoint{N} - \tkzDefTriangleCenter[circum](A,B,C) \tkzGetPoint{O} - \tkzDefTriangleCenter[lemoine](A,B,C) \tkzGetPoint{K} - \tkzDefTriangleCenter[spieker](A,B,C) \tkzGetPoint{Sp} - \tkzDefExCircle(A,B,C) \tkzGetPoint{Jb} - \tkzDefExCircle(C,A,B) \tkzGetPoint{Ja} - \tkzDefExCircle(B,C,A) \tkzGetPoint{Jc} - \tkzDefPointBy[projection=onto B--C ](Jc) \tkzGetPoint{Xc} - \tkzDefPointBy[projection=onto B--C ](Jb) \tkzGetPoint{Xb} - \tkzDefPointBy[projection=onto A--B ](Ja) \tkzGetPoint{Za} - \tkzDefPointBy[projection=onto A--B ](Jb) \tkzGetPoint{Zb} - \tkzDefLine[parallel=through Xc](A,C) \tkzGetPoint{X'c} - \tkzDefLine[parallel=through Xb](A,B) \tkzGetPoint{X'b} - \tkzDefLine[parallel=through Za](C,A) \tkzGetPoint{Z'a} - \tkzDefLine[parallel=through Zb](C,B) \tkzGetPoint{Z'b} - \tkzInterLL(Xc,X'c)(A,B) \tkzGetPoint{B'} - \tkzInterLL(Xb,X'b)(A,C) \tkzGetPoint{C'} - \tkzInterLL(Za,Z'a)(C,B) \tkzGetPoint{A''} - \tkzInterLL(Zb,Z'b)(C,A) \tkzGetPoint{B''} - \tkzDefPointBy[reflection= over Jc--Jb](B') \tkzGetPoint{Ca} - \tkzDefPointBy[reflection= over Jc--Jb](C') \tkzGetPoint{Ba} - \tkzDefPointBy[reflection= over Ja--Jb](A'')\tkzGetPoint{Bc} - \tkzDefPointBy[reflection= over Ja--Jb](B'')\tkzGetPoint{Ac} - \tkzDefCircle[circum](Ac,Ca,Ba) \tkzGetPoint{Q} - \tkzDrawCircle[circum](Ac,Ca,Ba) - \tkzDefPointWith[linear,K=1.1](Q,Ac) \tkzGetPoint{nAc} - \tkzClipCircle[through](Q,nAc) - \tkzDrawLines[add=1.5 and 1.5,dashed](A,B B,C A,C) - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPolygon[dashed,color=blue](Ja,Jb,Jc) - \tkzDrawCircles[ex](A,B,C B,C,A C,A,B) - \tkzDrawLines[add=0 and 0,dashed](Ca,Bc B,Za A,Ba B',C') - \tkzDrawLine[add=1 and 1,dashed](Xb,Xc) - \tkzDrawLine[add=7 and 3,blue](O,K) - \tkzDrawLine[add=8 and 15,red](N,Sp) - \tkzDrawLines[add=10 and 10](K,O N,Sp) - \tkzDrawSegments(Ba,Ca Bc,Ac) - \tkzDrawPoints(A,B,C,N,Ja,Jb,Jc,Xb,Xc,B',C',Za,Zb,Ba,Ca,Bc,Ac,Q,Sp,K,O) - \tkzLabelPoints(A,B,C,N,Ja,Jb,Jc,Xb,Xc,B',C',Za,Zb,Ba,Ca,Bc,Ac,Q,Sp) - \tkzLabelPoints[above](K,O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.2.tex deleted file mode 100644 index f70246491f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.2.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 232 (Section 30.2.2 : About right triangle) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint["$A$" left](2,1){A} - \tkzDefPoint(6,4){B} - \tkzDrawSegment(A,B) - \tkzDrawPoint[color=red](A) - \tkzDrawPoint[color=red](B) - \tkzDefPointWith[orthogonal,K=-1](B,A) - \tkzDrawLine[add = .5 and .5](B,tkzPointResult) - \tkzInterLC[R](B,tkzPointResult)(A,8 cm) - \tkzGetPoints{C}{J} - \tkzDrawPoint[color=red](C) - \tkzCompass(A,C) - \tkzMarkRightAngle(A,B,C) - \tkzDrawLine[color=gray,style=dashed](A,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.3.tex deleted file mode 100644 index 3d67985882..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.3.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 233 (Section 30.2.3 : Archimedes) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){A}\tkzDefPoint(6,0){D} - \tkzDefPoint(8,0){B}\tkzDefPoint(4,0){I} - \tkzDefLine[orthogonal=through D](A,D) - \tkzInterLC[R](D,tkzPointResult)(I,4 cm) \tkzGetFirstPoint{C} - \tkzDefLine[orthogonal=through C](I,C) \tkzGetPoint{c} - \tkzDefLine[orthogonal=through B](A,B) \tkzGetPoint{b} - \tkzInterLL(C,c)(B,b) \tkzGetPoint{T} - \tkzInterLL(A,T)(C,D) \tkzGetPoint{P} - \tkzDrawArc(I,B)(A) - \tkzDrawSegments(A,B A,T C,D I,C) \tkzDrawSegment[color=orange](I,C) - \tkzDrawLine[add = 1 and 0](C,T) \tkzDrawLine[add = 0 and 1](B,T) - \tkzMarkRightAngle(I,C,T) - \tkzDrawPoints(A,B,I,D,C,T) - \tkzLabelPoints(A,B,I,D) \tkzLabelPoints[above right](C,T) - \tkzMarkSegment[pos=.25,mark=s|](C,D) \tkzMarkSegment[pos=.75,mark=s|](C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.4.tex deleted file mode 100644 index ce6746584f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.4.tex +++ /dev/null @@ -1,28 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 234 (Section 30.2.4 : Example: Dimitris Kapeta) - -\begin{tikzpicture}[scale=1.25] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2.5,0){N} - \tkzDefPoint(-4.2,0.5){M} - \tkzDefPointBy[rotation=center O angle 30](N) - \tkzGetPoint{B} - \tkzDefPointBy[rotation=center O angle -50](N) - \tkzGetPoint{A} - \tkzInterLC(M,B)(O,N) \tkzGetFirstPoint{C} - \tkzInterLC(M,A)(O,N) \tkzGetSecondPoint{A'} - \tkzMarkAngle[mkpos=.2, size=0.5](A,C,B) - \tkzMarkAngle[mkpos=.2, size=0.5](A,M,C) - \tkzDrawSegments(A,C M,A M,B) - \tkzDrawCircle(O,N) - \tkzLabelCircle[above left](O,N)(120){$\mathcal{C}$} - \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M) - \tkzDrawPoints(O, A, B, M, B, C) - \tkzLabelPoints[right](O,A,B) - \tkzLabelPoints[above left](M,C) - \tkzLabelPoint[below left](A'){$A'$} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.5.tex deleted file mode 100644 index c2ba7d9aa6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.5.tex +++ /dev/null @@ -1,36 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 235 (Section 30.2.5 : Example 1: John Kitzmiller ) - -\begin{tikzpicture}[scale=2] - \tkzDefPoint[label=below left:A](0,0){A} - \tkzDefPoint[label=below right:B](6,0){B} - \tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C} - \tkzMarkSegments[mark=|](A,B A,C B,C) - \tkzDefBarycentricPoint(A=1,B=2) \tkzGetPoint{C'} - \tkzDefBarycentricPoint(A=2,C=1) \tkzGetPoint{B'} - \tkzDefBarycentricPoint(C=2,B=1) \tkzGetPoint{A'} - \tkzInterLL(A,A')(C,C') \tkzGetPoint{J} - \tkzInterLL(C,C')(B,B') \tkzGetPoint{K} - \tkzInterLL(B,B')(A,A') \tkzGetPoint{L} - \tkzLabelPoint[above](C){C} - \tkzDrawPolygon(A,B,C) \tkzDrawSegments(A,J B,L C,K) - \tkzMarkAngles[size=1 cm](J,A,C K,C,B L,B,A) - \tkzMarkAngles[thick,size=1 cm](A,C,J C,B,K B,A,L) - \tkzMarkAngles[opacity=.5](A,C,J C,B,K B,A,L) - \tkzFillAngles[fill= orange,size=1 cm,opacity=.3](J,A,C K,C,B L,B,A) - \tkzFillAngles[fill=orange, opacity=.3,thick,size=1,](A,C,J C,B,K B,A,L) - \tkzFillAngles[fill=green, size=1, opacity=.5](A,C,J C,B,K B,A,L) - \tkzFillPolygon[color=yellow, opacity=.2](J,A,C) - \tkzFillPolygon[color=yellow, opacity=.2](K,B,C) - \tkzFillPolygon[color=yellow, opacity=.2](L,A,B) - \tkzDrawSegments[line width=3pt,color=cyan,opacity=0.4](A,J C,K B,L) - \tkzDrawSegments[line width=3pt,color=red,opacity=0.4](A,L B,K C,J) - \tkzMarkSegments[mark=o](J,K K,L L,J) - \tkzLabelPoint[right](J){J} - \tkzLabelPoint[below](K){K} - \tkzLabelPoint[above left](L){L} -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.6.tex deleted file mode 100644 index 953da4ee5d..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.6.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 236 (Section 30.2.6 : Example 2: John Kitzmiller ) - -\begin{tikzpicture}[scale=2,decoration={markings, - mark=at position 3cm with {\arrow[scale=2]{>}}}] - \tkzDefPoints{0/0/E, 6/0/F, 0/1.8/P, 6/1.8/Q, 0/3/R, 6/3/S} - \tkzDrawLines[postaction={decorate}](E,F P,Q R,S) - \tkzDefPoints{3.5/3/A, 5/3/B} - \tkzDrawSegments(E,A F,B) - \tkzInterLL(E,A)(P,Q) \tkzGetPoint{C} - \tkzInterLL(B,F)(P,Q) \tkzGetPoint{D} - \tkzLabelPoints[above right](A,B) - \tkzLabelPoints[below](E,F) - \tkzLabelPoints[above left](C) - \tkzDrawSegments[style=dashed](A,F) - \tkzInterLL(A,F)(P,Q) \tkzGetPoint{G} - \tkzLabelPoints[above right](D,G) - \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](A,C A,G) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](C,E G,F) - \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](B,D) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](D,F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.7.tex deleted file mode 100644 index 824a01e5dd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.7.tex +++ /dev/null @@ -1,34 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 237 (Section 30.2.7 : Example 3: John Kitzmiller ) - -\begin{tikzpicture}[scale=2] - \tkzDefPoints{0/0/B, 5/0/D} \tkzDefPoint(70:3){A} - \tkzDrawPolygon(B,D,A) - \tkzDefLine[bisector](B,A,D) \tkzGetPoint{a} - \tkzInterLL(A,a)(B,D) \tkzGetPoint{C} - \tkzDefLine[parallel=through B](A,C) \tkzGetPoint{b} - \tkzInterLL(A,D)(B,b) \tkzGetPoint{P} - \begin{scope}[decoration={markings, - mark=at position .5 with {\arrow[scale=2]{>}}}] - \tkzDrawSegments[postaction={decorate},dashed](C,A P,B) - \end{scope} - \tkzDrawSegment(A,C) \tkzDrawSegment[style=dashed](A,P) - \tkzLabelPoints[below](B,C,D) \tkzLabelPoints[above](A,P) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](B,C P,A) - \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](C,D A,D) - \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](A,B) - \tkzMarkAngles[size=3mm](B,A,C C,A,D) - \tkzMarkAngles[size=3mm](B,A,C A,B,P) - \tkzMarkAngles[size=3mm](B,P,A C,A,D) - \tkzMarkAngles[size=3mm](B,A,C A,B,P B,P,A C,A,D) - \tkzFillAngles[fill=green, opacity=0.5](B,A,C A,B,P) - \tkzFillAngles[fill=yellow, opacity=0.3](B,P,A C,A,D) - \tkzFillAngles[fill=green, opacity=0.6](B,A,C A,B,P B,P,A C,A,D) - \tkzLabelAngle[pos=1](B,A,C){1} \tkzLabelAngle[pos=1](C,A,D){2} - \tkzLabelAngle[pos=1](A,B,P){3} \tkzLabelAngle[pos=1](B,P,A){4} - \tkzMarkSegments[mark=|](A,B A,P) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.8.tex deleted file mode 100644 index 1717f0cfc6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.8.tex +++ /dev/null @@ -1,30 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 238 (Section 30.2.8 : Example 4: author John Kitzmiller ) - -\begin{tikzpicture}[scale=2] - \tkzDefPoint(0,3){A} \tkzDefPoint(6,3){E} \tkzDefPoint(1.35,3){B} - \tkzDefPoint(4.65,3){D} \tkzDefPoint(1,1){G} \tkzDefPoint(5,5){F} - \tkzDefMidPoint(A,E) \tkzGetPoint{C} - \tkzFillPolygon[yellow, opacity=0.4](B,G,C) - \tkzFillPolygon[yellow, opacity=0.4](D,F,C) - \tkzFillPolygon[blue, opacity=0.3](A,B,G) - \tkzFillPolygon[blue, opacity=0.3](E,D,F) - \tkzMarkAngles[size=0.5 cm](B,G,A D,F,E) - \tkzMarkAngles[size=0.5 cm](B,C,G D,C,F) - \tkzMarkAngles[size=0.5 cm](G,B,C F,D,C) - \tkzMarkAngles[size=0.5 cm](A,B,G E,D,F) - \tkzFillAngles[size=0.5 cm,fill=green](B,G,A D,F,E) - \tkzFillAngles[size=0.5 cm,fill=orange](B,C,G D,C,F) - \tkzFillAngles[size=0.5 cm,fill=yellow](G,B,C F,D,C) - \tkzFillAngles[size=0.5 cm,fill=red](A,B,G E,D,F) - \tkzMarkSegments[mark=|](B,C D,C) \tkzMarkSegments[mark=s||](G,C F,C) - \tkzMarkSegments[mark=o](A,G E,F) \tkzMarkSegments[mark=s](B,G D,F) - \tkzDrawSegment[color=red](A,E) - \tkzDrawSegment[color=blue](F,G) - \tkzDrawSegments(A,G G,B E,F F,D) - \tkzLabelPoints[below](C,D,E,G) \tkzLabelPoints[above](A,B,F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.9.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.9.tex deleted file mode 100644 index 70825cb132..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-30.2.9.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 239 (Section 30.2.9 : Example 1: from Indonesia) - -\begin{tikzpicture}[scale=3] - \tkzDefPoints{0/0/A,2/0/B} - \tkzDefSquare(A,B) \tkzGetPoints{C}{D} - \tkzDefPointBy[rotation=center D angle 45](C)\tkzGetPoint{G} - \tkzDefSquare(G,D)\tkzGetPoints{E}{F} - \tkzInterLL(B,C)(E,F)\tkzGetPoint{H} - \tkzFillPolygon[gray!10](D,E,H,C,D) - \tkzDrawPolygon(A,...,D)\tkzDrawPolygon(D,...,G) - \tkzDrawSegment(B,E) - \tkzMarkSegments[mark=|,size=3pt,color=gray](A,B B,C C,D D,A E,F F,G G,D D,E) - \tkzMarkSegments[mark=||,size=3pt,color=gray](B,E E,H) - \tkzLabelPoints[left](A,D) - \tkzLabelPoints[right](B,C,F,H) - \tkzLabelPoints[above](G)\tkzLabelPoints[below](E) - \tkzMarkRightAngles(D,A,B D,G,F) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.1.tex deleted file mode 100644 index 58fa13558b..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.1.tex +++ /dev/null @@ -1,29 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 243 (Section 31.1.1 : Example 1: change line width) - -\begin{tikzpicture} - \tkzSetUpLine[color=blue,line width=1pt] -\begin{scope}[rotate=-90] - \tkzDefPoint(10,6){C} - \tkzDefPoint( 0,6){A} - \tkzDefPoint(10,0){B} - \tkzDefPointBy[projection = onto B--A](C) - \tkzGetPoint{H} - \tkzDrawPolygon(A,B,C) - \tkzMarkRightAngle[size=.4,fill=blue!20](B,C,A) - \tkzMarkRightAngle[size=.4,fill=red!20](B,H,C) - \tkzDrawSegment[color=red](C,H) -\end{scope} - \tkzLabelSegment[below](C,B){$a$} - \tkzLabelSegment[right](A,C){$b$} - \tkzLabelSegment[left](A,B){$c$} - \tkzLabelSegment[color=red](C,H){$h$} - \tkzDrawPoints(A,B,C) - \tkzLabelPoints[above left](H) - \tkzLabelPoints(B,C) - \tkzLabelPoints[above](A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.2.tex deleted file mode 100644 index f7978fd5d9..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.2.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 244 (Section 31.1.2 : Example 2: change style of line) - -\begin{tikzpicture}[scale=.6] - \tkzDefPoint(1,0){A} \tkzDefPoint(4,0){B} - \tkzDefPoint(1,1){C} \tkzDefPoint(5,1){D} - \tkzDefPoint(1,2){E} \tkzDefPoint(6,2){F} - \tkzDefPoint(0,4){A'}\tkzDefPoint(3,4){B'} - \tkzCalcLength[cm](C,D) \tkzGetLength{rCD} - \tkzCalcLength[cm](E,F) \tkzGetLength{rEF} - \tkzInterCC[R](A',\rCD cm)(B',\rEF cm) - \tkzGetPoints{I}{J} - \tkzSetUpLine[style=dashed,color=gray] - \tkzDrawLine(A',B') - \tkzCompass(A',B') - \tkzDrawSegments(A,B C,D E,F) - \tkzDrawCircle[R](A',\rCD cm) - \tkzDrawCircle[R](B',\rEF cm) - \tkzSetUpLine[color=red] - \tkzDrawSegments(A',I B',I) - \tkzDrawPoints(A,B,C,D,E,F,A',B',I,J) - \tkzLabelPoints(A,B,C,D,E,F,A',B',I,J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.3.tex deleted file mode 100644 index 34476f6d05..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.1.3.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 245 (Section 31.1.3 : Example 3: extend lines) - -\begin{tikzpicture} - \tkzSetUpLine[add=.5 and .5] - \tkzDefPoints{0/0/A,4/0/B,1/3/C} - \tkzDrawLines(A,B B,C A,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.2.1.tex deleted file mode 100644 index 1b599cde55..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.2.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 246 (Section 31.2.1 : Use of \tkzcname{tkzSetUpPoint}) - -\begin{tikzpicture} - \tkzSetUpPoint[shape = cross out,color=blue] - \tkzInit[xmax=100,xstep=20,ymax=.5] - \tkzDefPoint(20,1){A} - \tkzDefPoint(80,0){B} - \tkzDrawLine(A,B) - \tkzDrawPoints(A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.2.2.tex deleted file mode 100644 index 73cd6a54c9..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.2.2.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 247 (Section 31.2.2 : Use of \tkzcname{tkzSetUpPoint} inside a group) - -\begin{tikzpicture} - \tkzInit[ymin=-0.5,ymax=3,xmin=-0.5,xmax=7] - \tkzDefPoint(0,0){A} - \tkzDefPoint(02.25,04.25){B} - \tkzDefPoint(4,0){C} - \tkzDefPoint(3,2){D} - \tkzDrawSegments(A,B A,C A,D) - {\tkzSetUpPoint[shape=cross out, - fill= teal!50, - size=4,color=teal] - \tkzDrawPoints(A,B)} - \tkzSetUpPoint[fill= teal!50,size=4, - color=teal] - \tkzDrawPoints(C,D) - \tkzLabelPoints(A,B,C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.3.1.tex deleted file mode 100644 index 6c94964942..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.3.1.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 248 (Section 31.3.1 : Use of \tkzcname{tkzSetUpCompass} with bisector) - -\begin{tikzpicture}[scale=0.75] - \tkzDefPoints{0/1/A, 8/3/B, 3/6/C} - \tkzDrawPolygon(A,B,C) - \tkzSetUpCompass[color=red,line width=.2 pt] - \tkzDefLine[bisector](A,C,B) \tkzGetPoint{c} - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzShowLine[bisector,size=2,gap=3](A,C,B) - \tkzShowLine[bisector,size=2,gap=3](B,A,C) - \tkzShowLine[bisector,size=1,gap=2](C,B,A) - \tkzDrawLines[add=0 and 0 ](B,b) - \tkzDrawLines[add=0 and -.4 ](A,a C,c) - \tkzLabelPoints(A,B) \tkzLabelPoints[above](C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.3.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.3.2.tex deleted file mode 100644 index d0770c2c93..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.3.2.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 249 (Section 31.3.2 : Another example of of\tkzcname{tkzSetUpCompass}) - -\begin{tikzpicture}[scale=1,rotate=90] - \tkzDefPoints{0/1/A, 8/3/B, 3/6/C} - \tkzDrawPolygon(A,B,C) - \tkzSetUpCompass[color=brown, - line width=.3 pt,style=tkzdotted] - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} - \tkzInterLL(A,a)(B,b) \tkzGetPoint{I} - \tkzDefPointBy[projection= onto A--B](I) - \tkzGetPoint{H} - \tkzMarkRightAngle(I,H,A) - \tkzDrawCircle[radius,color=red](I,H) - \tkzDrawSegments[color=red](I,H) - \tkzDrawLines[add=0 and -.5,,color=red](A,a) - \tkzDrawLines[add=0 and 0,color=red](B,b) - \tkzShowLine[bisector,size=2,gap=3](B,A,C) - \tkzShowLine[bisector,size=1,gap=3](C,B,A) - \tkzLabelPoints(A,B)\tkzLabelPoints[left](C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.4.0.tex deleted file mode 100644 index f7594210cd..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-31.4.0.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 250 (Section 31.4 : Own style) - -\begin{tikzpicture} - \tkzDefPoint(0,0){O} - \tkzDefPoint(0,1){A} - \tkzDrawPoints(O) % general style - \tkzDrawPoints[mystyle,size=4](A) % my style - \tkzLabelPoints(O,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.2.0.tex deleted file mode 100644 index 99cf75ec36..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.2.0.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 251 (Section 32.2 : \tkzcname{tkzInit} and \tkzcname{tkzShowBB}) - -\begin{tikzpicture} - \tkzInit[xmin=-1,xmax=3,ymin=-1, ymax=3] - \tkzGrid - \tkzShowBB[red,line width=2pt] -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.3.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.3.0.tex deleted file mode 100644 index d64141c801..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.3.0.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 252 (Section 32.3 : \tkzcname{tkzClip}) - -\begin{tikzpicture} - \tkzInit[xmax=4, ymax=3] - \tkzAxeXY - \tkzGrid - \tkzClip - \draw[red] (-1,-1)--(5,2); -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.4.0.tex deleted file mode 100644 index be93fea5d0..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-32.4.0.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 253 (Section 32.4 : \tkzcname{tkzClip} and the option \tkzname{space}) - -\begin{tikzpicture} - \tkzInit[xmax=4, ymax=3] - \tkzAxeXY - \tkzGrid - \tkzClip[space=1] - \draw[red] (-1,-1)--(5,2); -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.0.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.0.0.tex deleted file mode 100644 index c0de49d5e8..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.0.0.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 21 (Section 4 : Definition of a point) - -\begin{tikzpicture}[,scale=1] - \tkzInit[xmax=5,ymax=5] - \tkzDefPoints{0/0/O,1/0/I,0/1/J} - \tkzDefPoint(40:4){P} - \tkzDrawXY[noticks,>=triangle 45] - \tkzDrawSegment[dim={$d$, - 16pt,above=6pt}](O,P) - \tkzDrawPoints(O,P) - \tkzMarkAngle[mark=none,->](I,O,P) - \tkzFillAngle[fill=blue!20, - opacity=.5](I,O,P) - \tkzLabelAngle[pos=1.25](I,O,P){$\alpha$} - \tkzLabelPoint(P){$P (\alpha : d )$} - \tkzDrawPoints[shape=cross](I,J) - \tkzLabelPoints(O,I) - \tkzLabelPoints[left](J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.1.tex deleted file mode 100644 index 37a2adf9a2..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 22 (Section 4.1.1 : Cartesian coordinates ) - -\begin{tikzpicture} - \tkzInit[xmax=5,ymax=5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(4,0){B} - \tkzDefPoint(0,3){C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.2.tex deleted file mode 100644 index 1d3db1934a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.2.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 23 (Section 4.1.2 : Calculations with \tkzNamePack{xfp}) - -\begin{tikzpicture}[scale=1] - \tkzInit[xmax=4,ymax=4] - \tkzGrid - \tkzDefPoint(-1+2,sqrt(4)){O} - \tkzDefPoint({3*ln(exp(1))},{exp(1)}){A} - \tkzDefPoint({4*sin(pi/6)},{4*cos(pi/6)}){B} - \tkzDrawPoints[color=blue](O,B,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.3.tex deleted file mode 100644 index e855f43720..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.3.tex +++ /dev/null @@ -1,13 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 24 (Section 4.1.3 : Polar coordinates ) - -\begin{tikzpicture} - \foreach \an [count=\i] in {0,60,...,300} - { \tkzDefPoint(\an:3){A_\i}} - \tkzDrawPolygon(A_1,A_...,A_6) - \tkzDrawPoints(A_1,A_...,A_6) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.4.tex deleted file mode 100644 index f6c2211947..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.4.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 25 (Section 4.1.4 : Calculations and coordinates) - -\begin{tikzpicture}[scale=.5] - \foreach \an [count=\i] in {0,2,...,358} - { \tkzDefPoint(\an:sqrt(sqrt(\an mm))){A_\i}} - \tkzDrawPoints(A_1,A_...,A_180) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.5.tex deleted file mode 100644 index 46e19dd738..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.1.5.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 26 (Section 4.1.5 : Relative points) - -\begin{tikzpicture}[scale=1] - \tkzSetUpLine[color=blue!60] - \begin{scope}[rotate=30] - \tkzDefPoint(2,3){A} - \begin{scope}[shift=(A)] - \tkzDefPoint(90:5){B} - \tkzDefPoint(30:5){C} - \end{scope} - \end{scope} - \tkzDrawPolygon(A,B,C) -\tkzLabelPoints[above](B,C) -\tkzLabelPoints[below](A) -\tkzDrawPoints(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.1.tex deleted file mode 100644 index c0c8f00be3..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.1.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 27 (Section 4.2.1 : Isosceles triangle with \tkzcname{tkzDefShiftPoint}) - -\begin{tikzpicture}[rotate=-30] - \tkzDefPoint(2,3){A} - \tkzDefShiftPoint[A](0:4){B} - \tkzDefShiftPoint[A](30:4){C} - \tkzDrawSegments(A,B B,C C,A) - \tkzMarkSegments[mark=|,color=red](A,B A,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(B,C) - \tkzLabelPoints[above left](A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.2.tex deleted file mode 100644 index ba8146983a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.2.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 28 (Section 4.2.2 : Equilateral triangle) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(2,3){A} - \tkzDefShiftPoint[A](30:3){B} - \tkzDefShiftPoint[A](-30:3){C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(B,C) - \tkzLabelPoints[above left](A) - \tkzMarkSegments[mark=|,color=red](A,B A,C B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.3.tex deleted file mode 100644 index 1e08116f73..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.2.3.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 29 (Section 4.2.3 : Parallelogram) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(30:3){B} - \tkzDefShiftPointCoord[B](10:2){C} - \tkzDefShiftPointCoord[A](10:2){D} - \tkzDrawPolygon(A,...,D) - \tkzDrawPoints(A,...,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.4.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.4.0.tex deleted file mode 100644 index 7e4708d5ec..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.4.0.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 30 (Section 4.4 : Create a triangle) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,4/0/B,4/3/C} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.5.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.5.0.tex deleted file mode 100644 index 4e4840dd96..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-4.5.0.tex +++ /dev/null @@ -1,12 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 31 (Section 4.5 : Create a square) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,2/0/B,2/2/C,0/2/D} - \tkzDrawPolygon(A,...,D) - \tkzDrawPoints(A,B,C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.1.1.tex deleted file mode 100644 index f8e64c8c7f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.1.1.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 32 (Section 5.1.1 : Use of \tkzcname{tkzDefMidPoint}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(2,3){A} - \tkzDefPoint(4,0){B} - \tkzDefMidPoint(A,B) \tkzGetPoint{C} - \tkzDrawSegment(A,B) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints[right](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.2.1.tex deleted file mode 100644 index 3769b15dc9..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.2.1.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 33 (Section 5.2.1 : Using \tkzcname{tkzDefBarycentricPoint} with two points) - -\begin{tikzpicture} - \tkzDefPoint(2,3){A} - \tkzDefShiftPointCoord[2,3](30:4){B} - \tkzDefBarycentricPoint(A=1,B=2) - \tkzGetPoint{I} - \tkzDrawPoints(A,B,I) - \tkzDrawLine(A,B) - \tkzLabelPoints(A,B,I) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.2.2.tex deleted file mode 100644 index 4d9a504efa..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.2.2.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 34 (Section 5.2.2 : Using \tkzcname{tkzDefBarycentricPoint} with three points) - -\begin{tikzpicture}[scale=.8] - \tkzDefPoint(2,1){A} - \tkzDefPoint(5,3){B} - \tkzDefPoint(0,6){C} - \tkzDefBarycentricPoint(A=1,B=1,C=1) - \tkzGetPoint{M} - \tkzDefMidPoint(A,B) \tkzGetPoint{C'} - \tkzDefMidPoint(A,C) \tkzGetPoint{B'} - \tkzDefMidPoint(C,B) \tkzGetPoint{A'} - \tkzDrawPolygon(A,B,C) - \tkzDrawPoints(A',B',C') - \tkzDrawPoints(A,B,C,M) - \tkzDrawLines[add=0 and 1](A,M B,M C,M) - \tkzLabelPoint(M){$M$} - \tkzAutoLabelPoints[center=M](A,B,C) - \tkzAutoLabelPoints[center=M,above right](A',B',C') -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.3.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.3.0.tex deleted file mode 100644 index 38faf71e01..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-5.3.0.tex +++ /dev/null @@ -1,29 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 35 (Section 5.3 : Internal Similitude Center) - -\begin{tikzpicture}[scale=.75,rotate=-30] - \tkzDefPoint(0,0){O} - \tkzDefPoint(4,-5){A} - \tkzDefIntSimilitudeCenter(O,3)(A,1) - \tkzGetPoint{I} - \tkzExtSimilitudeCenter(O,3)(A,1) - \tkzGetPoint{J} - \tkzDefTangent[from with R= I](O,3 cm) - \tkzGetPoints{D}{E} - \tkzDefTangent[from with R= I](A,1 cm) - \tkzGetPoints{D'}{E'} - \tkzDefTangent[from with R= J](O,3 cm) - \tkzGetPoints{F}{G} - \tkzDefTangent[from with R= J](A,1 cm) - \tkzGetPoints{F'}{G'} - \tkzDrawCircle[R,fill=red!50,opacity=.3](O,3 cm) - \tkzDrawCircle[R,fill=blue!50,opacity=.3](A,1 cm) - \tkzDrawSegments[add = .5 and .5,color=red](D,D' E,E') - \tkzDrawSegments[add= 0 and 0.25,color=blue](J,F J,G) - \tkzDrawPoints(O,A,I,J,D,E,F,G,D',E',F',G') - \tkzLabelPoints[font=\scriptsize](O,A,I,J,D,E,F,G,D',E',F',G') -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.1.tex deleted file mode 100644 index 763183c634..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.1.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 36 (Section 6.1.1 : Option \tkzname{ortho} or \tkzname{orthic}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,1){B} - \tkzDefPoint(1,4){C} - \tkzClipPolygon(A,B,C) - \tkzDefTriangleCenter[ortho](B,C,A) - \tkzGetPoint{H} - \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPoints(A,B,C,H) - \tkzDrawLines[add=0 and 1](A,Ha B,Hb C,Hc) - \tkzLabelPoint(H){$H$} - \tkzAutoLabelPoints[center=H](A,B,C) - \tkzMarkRightAngles(A,Ha,B B,Hb,C C,Hc,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.2.tex deleted file mode 100644 index b637a48113..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.2.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 37 (Section 6.1.2 : Option \tkzname{centroid}) - -\begin{tikzpicture}[scale=.75] - \tkzDefPoints{-1/1/A,5/1/B} - \tkzDefEquilateral(A,B) - \tkzGetPoint{C} - \tkzDefTriangleCenter[centroid](A,B,C) - \tkzGetPoint{G} - \tkzDrawPolygon[color=brown](A,B,C) - \tkzDrawPoints(A,B,C,G) - \tkzDrawLines[add = 0 and 2/3](A,G B,G C,G) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.3.tex deleted file mode 100644 index 684da82e65..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.3.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 38 (Section 6.1.3 : Option \tkzname{circum}) - -\begin{tikzpicture} - \tkzDefPoints{0/1/A,3/2/B,1/4/C} - \tkzDefTriangleCenter[circum](A,B,C) - \tkzGetPoint{G} - \tkzDrawPolygon[color=brown](A,B,C) - \tkzDrawCircle(G,A) - \tkzDrawPoints(A,B,C,G) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.4.tex deleted file mode 100644 index 40a50fbf06..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.4.tex +++ /dev/null @@ -1,17 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 39 (Section 6.1.4 : Option \tkzname{in}) - -\begin{tikzpicture} - \tkzDefPoints{0/1/A,3/2/B,1/4/C} - \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I} - \tkzDefPointBy[projection=onto A--C](I) - \tkzGetPoint{Ib} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPoints(A,B,C,I) - \tkzDrawLines[add = 0 and 2/3](A,I B,I C,I) - \tkzDrawCircle(I,Ib) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.5.tex deleted file mode 100644 index 92701dca99..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.5.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 40 (Section 6.1.5 : Option \tkzname{ex}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/1/A,3/2/B,1/4/C} - \tkzDefTriangleCenter[ex](B,C,A) - \tkzGetPoint{J_c} - \tkzDefPointBy[projection=onto A--B](J_c) - \tkzGetPoint{Tc} - %or - % \tkzDefCircle[ex](B,C,A) - % \tkzGetFirstPoint{J_c} - % \tkzGetSecondPoint{Tc} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPoints(A,B,C,J_c) - \tkzDrawCircle[red](J_c,Tc) - \tkzDrawLines[add=1.5 and 0](A,C B,C) - \tkzLabelPoints(J_c) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.6.tex deleted file mode 100644 index 2caaafffe9..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.6.tex +++ /dev/null @@ -1,35 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 41 (Section 6.1.6 : Option \tkzname{euler}) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{0/0/A,6/0/B,0.8/4/C} - \tkzDefSpcTriangle[medial, - name=M](A,B,C){_A,_B,_C} - \tkzDefTriangleCenter[euler](A,B,C) - \tkzGetPoint{N} % I= N nine points - \tkzDefTriangleCenter[ortho](A,B,C) - \tkzGetPoint{H} - \tkzDefMidPoint(A,H) \tkzGetPoint{E_A} - \tkzDefMidPoint(C,H) \tkzGetPoint{E_C} - \tkzDefMidPoint(B,H) \tkzGetPoint{E_B} - \tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawCircle(N,E_A) - \tkzDrawSegments[blue](A,H_A B,H_B C,H_C) - \tkzDrawPoints(A,B,C,N,H) - \tkzDrawPoints[red](M_A,M_B,M_C) - \tkzDrawPoints[blue]( H_A,H_B,H_C) - \tkzDrawPoints[green](E_A,E_B,E_C) - \tkzAutoLabelPoints[center=N, - font=\scriptsize](A,B,C,% - M_A,M_B,M_C,% - H_A,H_B,H_C,% - E_A,E_B,E_C) - \tkzLabelPoints[font=\scriptsize](H,N) - \tkzMarkSegments[mark=s|,size=3pt, - color=blue,line width=1pt](B,E_B E_B,H) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.7.tex deleted file mode 100644 index 0df63327ee..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.7.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 42 (Section 6.1.7 : Option \tkzname{symmedian}) - -\begin{tikzpicture} - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDefPoint(1,4){C} - \tkzDefTriangleCenter[symmedian](A,B,C)\tkzGetPoint{K} - \tkzDefTriangleCenter[median](A,B,C)\tkzGetPoint{G} - \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I} - \tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c} - \tkzDefSpcTriangle[incentral,name=I](A,B,C){a,b,c} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawLines[add = 0 and 2/3,blue](A,K B,K C,K) - \tkzDrawSegments[red,dashed](A,Ma B,Mb C,Mc) - \tkzDrawSegments[orange,dashed](A,Ia B,Ib C,Ic) - \tkzDrawLine[add=2 and 2](G,I) - \tkzDrawPoints(A,B,C,K,G,I) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.8.tex deleted file mode 100644 index 7c5a83fcbf..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.8.tex +++ /dev/null @@ -1,27 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 43 (Section 6.1.8 : Option \tkzname{nagel}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/0/A,6/0/B,4/6/C} - \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc} - \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc} - \tkzDrawPoints(Ja,Jb,Jc,Ta,Tb,Tc) - \tkzLabelPoints(Ja,Jb,Jc,Ta,Tb,Tc) - \tkzDrawPolygon[blue](A,B,C) - \tkzDefTriangleCenter[nagel](A,B,C) \tkzGetPoint{Na} - \tkzDrawPoints[blue](B,C,A) - \tkzDrawPoints[red](Na) - \tkzLabelPoints[blue](B,C,A) - \tkzLabelPoints[red](Na) - \tkzDrawLines[add=0 and 1](A,Ta B,Tb C,Tc) - \tkzShowBB\tkzClipBB - \tkzDrawLines[add=1 and 1,dashed](A,B B,C C,A) - \tkzDrawCircles[ex,gray](A,B,C C,A,B B,C,A) - \tkzDrawSegments[dashed](Ja,Ta Jb,Tb Jc,Tc) - \tkzMarkRightAngles[fill=gray!20](Ja,Ta,C - Jb,Tb,A Jc,Tc,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.9.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.9.tex deleted file mode 100644 index 1b3b13181a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-6.1.9.tex +++ /dev/null @@ -1,29 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 44 (Section 6.1.9 : Option \tkzname{mittenpunkt}) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoints{0/0/A,6/0/B,4/6/C} - \tkzDefSpcTriangle[centroid](A,B,C){Ma,Mb,Mc} - \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc} - \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc} - \tkzDefTriangleCenter[mittenpunkt](A,B,C) - \tkzGetPoint{Mi} - \tkzDrawPoints(Ma,Mb,Mc,Ja,Jb,Jc) - \tkzClipBB - \tkzDrawPolygon[blue](A,B,C) - \tkzDrawLines[add=0 and 1](Ja,Ma - Jb,Mb Jc,Mc) - \tkzDrawLines[add=1 and 1](A,B A,C B,C) - \tkzDrawCircles[gray](Ja,Ta Jb,Tb Jc,Tc) - \tkzDrawPoints[blue](B,C,A) - \tkzDrawPoints[red](Mi) - \tkzLabelPoints[red](Mi) - \tkzLabelPoints[left](Mb) - \tkzLabelPoints(Ma,Mc,Jb,Jc) - \tkzLabelPoints[above left](Ja,Jc) - \tkzShowBB -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.2.tex deleted file mode 100644 index 4cdbb37312..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.2.tex +++ /dev/null @@ -1,15 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 45 (Section 7.0.2 : Example of point drawings) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(1,3){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(0,0){O} - \tkzDrawPoint[color=red](A) - \tkzDrawPoint[fill=blue!20,draw=blue](B) - \tkzDrawPoint[color=green](O) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.3.tex deleted file mode 100644 index 33ea4dcbaf..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.3.tex +++ /dev/null @@ -1,14 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 46 (Section 7.0.3 : First example) - -\begin{tikzpicture} - \tkzDefPoint(1,3){A} - \tkzDefPoint(4,1){B} - \tkzDefPoint(0,0){C} - \tkzDrawPoints[size=6,color=red, - fill=red!50](A,B,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.4.tex deleted file mode 100644 index 9ee9b5de99..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-7.0.4.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 47 (Section 7.0.4 : Second example) - -\begin{tikzpicture}[scale=.5] - \tkzDefPoint(2,3){A} \tkzDefPoint(5,-1){B} - \tkzDefPoint[label=below:$\mathcal{C}$, - shift={(2,3)}](-30:5.5){E} - \begin{scope}[shift=(A)] - \tkzDefPoint(30:5){C} - \end{scope} - \tkzCalcLength[cm](A,B)\tkzGetLength{rAB} - \tkzDrawCircle[R](A,\rAB cm) - \tkzDrawSegment(A,B) - \tkzDrawPoints(A,B,C) - \tkzLabelPoints(B,C) - \tkzLabelPoints[above](A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-8.1.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-8.1.1.tex deleted file mode 100644 index 0a6b2a966f..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-8.1.1.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 48 (Section 8.1.1 : Use of option \tkzname{pos}) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,4/0/B} - \tkzDrawLine[red](A,B) - \tkzDefPointOnLine[pos=1.2](A,B) - \tkzGetPoint{P} - \tkzDefPointOnLine[pos=-0.2](A,B) - \tkzGetPoint{R} - \tkzDefPointOnLine[pos=0.5](A,B) - \tkzGetPoint{S} - \tkzDrawPoints(A,B,P) - \tkzLabelPoints(A,B) - \tkzLabelPoint[above](P){pos=$1.2$} - \tkzLabelPoint[above](R){pos=$-.2$} - \tkzLabelPoint[above](S){pos=$.5$} - \tkzDrawPoints(A,B,P,R,S) - \tkzLabelPoints(A,B) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-8.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-8.2.0.tex deleted file mode 100644 index 75acbd5d7c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-8.2.0.tex +++ /dev/null @@ -1,23 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 49 (Section 8.2 : Point on a circle) - -\begin{tikzpicture} - \tkzDefPoints{0/0/A,4/0/B,0.8/3/C} - \tkzDefPointOnCircle[angle=90,center=B,radius=1 cm] - \tkzGetPoint{I} - \tkzDefCircle[circum](A,B,C) - \tkzGetPoint{G} \tkzGetLength{rG} - \tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt] - \tkzGetPoint{J} - \tkzDrawCircle[R,teal](B,1cm) - \tkzDrawPoint[teal](I) - \tkzDrawPoints(A,B,C) - \tkzDrawCircle(G,J) - \tkzDrawPoints(G,J) - \tkzDrawPoint[red](J) - \tkzLabelPoints(G,J) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.0.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.0.tex deleted file mode 100644 index 4b83d72a9a..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.0.tex +++ /dev/null @@ -1,16 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 50 (Section 9.2 : Example of translation) - -\begin{tikzpicture}[>=latex] - \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){B} - \tkzDefPoint(3,0){C} - \tkzDefPointBy[translation= from B to A](C) - \tkzGetPoint{D} - \tkzDrawPoints[teal](A,B,C,D) - \tkzLabelPoints[color=teal](A,B,C,D) - \tkzDrawSegments[orange,->](A,B D,C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.1.tex deleted file mode 100644 index 7d9517c803..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.1.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 51 (Section 9.2.1 : Example of reflection (orthogonal symmetry)) - -\begin{tikzpicture}[scale=1] - \tkzDefPoints{1.5/-1.5/C,-4.5/2/D} - \tkzDefPoint(-4,-2){O} - \tkzDefPoint(-2,-2){A} - \foreach \i in {0,1,...,4}{% - \pgfmathparse{0+\i * 72} - \tkzDefPointBy[rotation=% - center O angle \pgfmathresult](A) - \tkzGetPoint{A\i} - \tkzDefPointBy[reflection = over C--D](A\i) - \tkzGetPoint{A\i'}} - \tkzDrawPolygon(A0, A2, A4, A1, A3) - \tkzDrawPolygon(A0', A2', A4', A1', A3') - \tkzDrawLine[add= .5 and .5](C,D) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.2.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.2.tex deleted file mode 100644 index 4d5341ddd6..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.2.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 52 (Section 9.2.2 : Example of \tkzname{homothety} and \tkzname{projection}) - -\begin{tikzpicture}[scale=1.2] - \tkzDefPoint(0,1){A} \tkzDefPoint(5,3){B} \tkzDefPoint(3,4){C} - \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} - \tkzDrawLine[add=0 and 0,color=magenta!50 ](A,a) - \tkzDefPointBy[homothety=center A ratio .5](a) \tkzGetPoint{a'} - \tkzDefPointBy[projection = onto A--B](a') \tkzGetPoint{k'} - \tkzDefPointBy[projection = onto A--B](a) \tkzGetPoint{k} - \tkzDrawLines[add= 0 and .3](A,k A,C) - \tkzDrawSegments[blue](a',k' a,k) - \tkzDrawPoints(a,a',k,k',A) - \tkzDrawCircles(a',k' a,k) - \tkzLabelPoints(a,a',k,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.3.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.3.tex deleted file mode 100644 index 185d9cedad..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.3.tex +++ /dev/null @@ -1,24 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 53 (Section 9.2.3 : Example of projection) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(0,4){B} - \tkzDefTriangle[pythagore](B,A) \tkzGetPoint{C} - \tkzDefLine[bisector](B,C,A) \tkzGetPoint{c} - \tkzInterLL(C,c)(A,B) \tkzGetPoint{D} - \tkzDefPointBy[projection=onto B--C](D) \tkzGetPoint{G} - \tkzInterLC(C,D)(D,A) \tkzGetPoints{E}{F} - \tkzDrawPolygon[teal](A,B,C) - \tkzDrawSegment(C,D) - \tkzDrawCircle(D,A) - \tkzDrawSegment[orange](D,G) - \tkzMarkRightAngle[fill=orange!20](D,G,B) - \tkzDrawPoints(A,C,F) \tkzLabelPoints(A,C,F) - \tkzDrawPoints(B,D,E,G) - \tkzLabelPoints[above right](B,D,E,G) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.4.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.4.tex deleted file mode 100644 index 639e23b392..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.4.tex +++ /dev/null @@ -1,21 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 54 (Section 9.2.4 : Example of symmetry) - -\begin{tikzpicture}[scale=1] - \tkzDefPoint(0,0){O} - \tkzDefPoint(2,-1){A} - \tkzDefPoint(2,2){B} - \tkzDefPointsBy[symmetry=center O](B,A){} - \tkzDrawLine(A,A') - \tkzDrawLine(B,B') - \tkzMarkAngle[mark=s,arc=lll, - size=2 cm,mkcolor=red](A,O,B) - \tkzLabelAngle[pos=1,circle,draw, - fill=blue!10](A,O,B){$60^{\circ}$} - \tkzDrawPoints(A,B,O,A',B') - \tkzLabelPoints(A,B,O,A',B') -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.5.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.5.tex deleted file mode 100644 index fbd70534b5..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.5.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 55 (Section 9.2.5 : Example of rotation) - -\begin{tikzpicture}[scale=0.5] - \tkzDefPoint(0,0){A} - \tkzDefPoint(5,0){B} - \tkzDrawSegment(A,B) - \tkzDefPointBy[rotation=center A angle 60](B) - \tkzGetPoint{C} - \tkzDefPointBy[symmetry=center C](A) - \tkzGetPoint{D} - \tkzDrawSegment(A,tkzPointResult) - \tkzDrawLine(B,D) - \tkzDrawArc[orange,delta=10](A,B)(C) - \tkzDrawArc[orange,delta=10](B,C)(A) - \tkzDrawArc[orange,delta=10](C,D)(D) - \tkzMarkRightAngle(D,B,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.6.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.6.tex deleted file mode 100644 index 924a66ff76..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.6.tex +++ /dev/null @@ -1,18 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 56 (Section 9.2.6 : Example of rotation in radian) - -\begin{tikzpicture} - \tkzDefPoint["$A$" left](1,5){A} - \tkzDefPoint["$B$" right](5,2){B} - \tkzDefPointBy[rotation in rad= center A angle pi/3](B) - \tkzGetPoint{C} - \tkzDrawSegment(A,B) - \tkzDrawPoints(A,B,C) - \tkzCompass[color=red](A,C) - \tkzCompass[color=red](B,C) - \tkzLabelPoints(C) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.7.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.7.tex deleted file mode 100644 index 7f4955b754..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.7.tex +++ /dev/null @@ -1,26 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 57 (Section 9.2.7 : Inversion of points) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){A} - \tkzDefPoint(-1.5,-1.5){z1} - \tkzDefPoint(0.35,0){z2} - \tkzDefPointBy[inversion =% - center O through A](z1) - \tkzGetPoint{Z1} - \tkzDefPointBy[inversion =% - center O through A](z2) - \tkzGetPoint{Z2} - \tkzDrawCircle(O,A) - \tkzDrawPoints[color=black, - fill=red,size=4](Z1,Z2) - \tkzDrawSegments(z1,Z1 z2,Z2) - \tkzDrawPoints[color=black, - fill=red,size=4](O,z1,z2) - \tkzLabelPoints(O,A,z1,z2,Z1,Z2) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.8.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.8.tex deleted file mode 100644 index 0606dec824..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.2.8.tex +++ /dev/null @@ -1,22 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 58 (Section 9.2.8 : Point Inversion: Orthogonal Circles) - -\begin{tikzpicture}[scale=1.5] - \tkzDefPoint(0,0){O} - \tkzDefPoint(1,0){A} - \tkzDrawCircle(O,A) - \tkzDefPoint(0.5,-0.25){z1} - \tkzDefPoint(-0.5,-0.5){z2} - \tkzDefPointBy[inversion = % - center O through A](z1) - \tkzGetPoint{Z1} - \tkzCircumCenter(z1,z2,Z1) - \tkzGetPoint{c} - \tkzDrawCircle(c,Z1) - \tkzDrawPoints[color=black, - fill=red,size=4](O,z1,z2,Z1,O,A) -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.3.1.tex b/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.3.1.tex deleted file mode 100644 index 1ad547124c..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/examples/tkzEuclide-9.3.1.tex +++ /dev/null @@ -1,20 +0,0 @@ -\input{preamble-standalone.ltx} -\begin{document} - -% Ex. No. 59 (Section 9.3.1 : Example of translation) - -\begin{tikzpicture}[>=latex] - \tkzDefPoint(0,0){A} \tkzDefPoint(3,1){A'} - \tkzDefPoint(3,0){B} \tkzDefPoint(1,2){C} - \tkzDefPointsBy[translation= from A to A'](B,C){} - \tkzDrawPolygon[color=blue](A,B,C) - \tkzDrawPolygon[color=red](A',B',C') - \tkzDrawPoints[color=blue](A,B,C) - \tkzDrawPoints[color=red](A',B',C') - \tkzLabelPoints(A,B,A',B') - \tkzLabelPoints[above](C,C') - \tkzDrawSegments[color = gray,->, - style=dashed](A,A' B,B' C,C') -\end{tikzpicture} - -\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.cfg b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.cfg new file mode 100644 index 0000000000..fe8738e153 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.cfg @@ -0,0 +1,205 @@ +% tkz-euclide.cfg +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status “maintained”. +% +% The Current Maintainer of this work is Alain Matthes. +% If you modify this original file, YOUR CHANGES WILL BE LOST when it is +% updated. Instead, put your changes in the entire copy of tkz-base.cfg +% and save the file in a directory part of your TEXINPUTS environment +% variable. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-euclide.cfg} +%<------ colors ---------------------------------------–> +\def\tkz@backgroundcolor{white} +\def\tkz@textcolor{black} +%<--------------------------------------------------------- +\def\tkz@fillcolor{\tkz@backgroundcolor} +\def\tkz@mainlinecolor{\tkz@textcolor} +\def\tkz@otherlinecolor{\tkz@mainlinecolor!50} +%<------------------------- Cartesian system -----------------------------–> +% Default unity cm +% Geometry Euclidean with unity for x and y = 1cm ---> step = 1 +% 0 ≤ x ≤ 10 +% 0 ≤ y ≤ 10 +\def\tkz@init@xorigine{0} +\def\tkz@init@yorigine{0} +\def\tkz@init@xstep{1} +\def\tkz@init@ystep{1} +\def\tkz@init@xmin{0} +\def\tkz@init@ymin{0} +\def\tkz@init@xmax{10} +\def\tkz@init@ymax{10} +\def\tkz@init@xdec{1} +\def\tkz@init@ydec{1} +%<-------------------------- points -----------------------------------–> +\def\tkz@euc@pointshape{circle} +\def\tkz@euc@pointcolor{\tkz@mainlinecolor} +\def\tkz@euc@labelcolor{\tkz@mainlinecolor} +\def\tkz@euc@pointsize{3} +\def\tkz@euc@pointpos{below right} +\def\tkz@euc@segmentcolor{\tkz@mainlinecolor} +\def\tkz@euc@circlecolor{\tkz@mainlinecolor} +%<-------------------------- line ---------------------------------------–> +\def\tkz@euc@linecolor{\tkz@mainlinecolor} +\def\tkz@euc@linewidth{0.6pt} +\def\tkz@euc@linestyle{solid} +\def\tkz@euc@lineleft{.2} +\def\tkz@euc@lineright{.2} +%<------ axes cartesian system ---------------------------------------–> +\def\tkz@init@color{\tkz@textcolor} +\def\tkz@init@lw{0.4 pt} +\def\tkz@init@tickwd{0.8 pt} +\def\tkz@init@ticka{2 pt} +\def\tkz@init@tickb{2 pt} +\def\tkz@init@xlabel{$x$} +\def\tkz@init@ylabel{$y$} +\def\tkz@init@tickb{2 pt} +\def\tkz@init@rightspace{.5} +\def\tkz@init@leftspace{0} +\def\tkz@init@upspace{.5} +\def\tkz@init@downspace{0} +\global\let\tkzmathstyle\displaystyle +\def\tkz@legend@line@len{1cm} +%<-------------------------- rep ---------------------------------------–> +\def\tkz@sur@color{\tkz@mainlinecolor} +\def\tkz@sur@colorlabel{\tkz@mainlinecolor} +\def\tkz@sur@lw{0.8 pt} +\def\tkz@sur@posxlabel{below=2pt} +\def\tkz@sur@posylabel{left=2pt} +%<-------------------------- grid ---------------------------------------–> +\def\tkz@grid@color{gray} +\def\tkz@grid@lw{0.4 pt} +\def\tkzCoeffSubColor{50} +\def\tkzCoeffSubLw{0.8} +\def\tkz@grid@xstep{0.2} +\def\tkz@grid@ystep{0.2} +\def\tkz@init@gradsize{\textstyle} +\def\tkzRatioLineGrid{0.75} +\def\tkz@gd@sublw{0.4 pt}% size line sub grid +%<------------------------- compass -----------------------------------–> +\def\tkz@euc@compasscolor{\tkz@otherlinecolor} +\def\tkz@euc@compasswidth{0.4pt} +\def\tkz@euc@compassstyle{solid} +%<------------------------- arc -----------------------------------–> +\def\tkz@arc@lw{0.4pt} +\def\tkz@arc@color{\tkz@mainlinecolor} +\def\tkz@arc@style{solid} +%<---------------------------- mark -----------------------------------–> +\def\tkz@mk@color{\tkz@mainlinecolor} +\def\tkz@mk@mark{*} +\def\tkz@mk@size{3pt} +\def\tkz@mk@fill{\tkz@otherlinecolor} +%<--------------------------------------------------------------------------–> +%<------------------------------ styles ---------------------------------–> +\def\tkzSetUpStyle[#1]#2{\tikzset{#2/.style={#1}}}% add 2022 + +\tikzset{xlabel style/.style = {below = 3 pt, + inner sep = 1pt, + outer sep = 0pt} + } +\tikzset{ylabel style/.style = {left = 3 pt, + inner sep = 1pt, + outer sep = 0pt}} +\tikzset{xaxe style/.style = {> = latex, ->} +} +\tikzset{yaxe style/.style = {> = latex, ->} +} + +\tikzset{point style/.style = {draw = \tkz@euc@pointcolor, + inner sep = 0pt, + shape = \tkz@euc@pointshape, + minimum size = \tkz@euc@pointsize, + fill = \tkz@euc@pointcolor + } + } +% label for the point +\tikzset{label style/.style={ \tkz@euc@pointpos, + \tkz@euc@labelcolor, + font = \normalsize} + } +\tikzset{label angle style/.style={ \tkz@euc@labelcolor, + font = \normalsize} + } +\tikzset{line style/.style = {line width = \tkz@euc@linewidth, + color = \tkz@euc@linecolor, + style = \tkz@euc@linestyle, + add = {\tkz@euc@lineleft} and {\tkz@euc@lineright}% + } + } +\tikzset{label seg style/.style = {color = \tkz@mainlinecolor, + auto + } + } + +\tikzset{rep style/.style = { ->, + >=latex} + } +\tikzset{compass style/.style = {color = \tkz@euc@compasscolor, + line width = \tkz@euc@compasswidth, + style = \tkz@euc@compassstyle} + } +\tikzset{mark style/.style = {mark = \tkz@mk@mark, + mark size = \tkz@mk@size, + mark options = {color= \tkz@mk@color, + fill = \tkz@mk@fill + } + } +} +\tikzset{arc style/.style={gray,thin}} +%<---------------------- show coord -----------------------------------–> +\tikzset{arrow coord style/.style = {dashed, + \tkz@euc@linecolor, + > = latex', + ->} + } +\tikzset{xcoord style/.style = {\tkz@euc@labelcolor, + font = \normalsize, + text height = 1ex, + inner sep = 0pt, + outer sep = 0pt, + fill = \tkz@fillcolor, + below = 3pt} + } +\tikzset{ycoord style/.style = {\tkz@euc@labelcolor, + font = \normalsize, + text height = 1ex, + inner sep = 0pt, + outer sep = 0pt, + fill = \tkz@fillcolor, + left = 3pt} + } +%<--------------------------- vector --------------------------------------–> +\tikzset{vector style/.style={>=latex,->} +} +\tikzset{tkzdotted/.style={% + dash pattern=on 0.4\pgflinewidth off #1\pgflinewidth,line cap=round, shorten >=#1\pgflinewidth/2,shorten <=#1\pgflinewidth/2, + tkzdotted/.default=8}} + +% \tikzset{tkzreverseclip/.style={insert path={% +% (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb)}}} + +\tikzset{tkzreverseclip/.style={insert path={ + (current bounding box.south west) --(current bounding box.north west) + --(current bounding box.north east) -- (current bounding box.south east) + -- cycle} }} + +\def\tkzPhi{1.618034} +\def\tkzInvPhi{0.618034} +\def\tkzSqrtPhi{1.27202} +\def\tkzSqrTwo{1.414213} +\def\tkzSqrThree{1.7320508} +\def\tkzSqrFive{2.2360679} +\def\tkzSqrTwobyTwo{0.7071065} +\def\tkzPi{3.1415926} +\def\tkzEuler{2.71828182} +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.sty b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.sty index 9507e2b1e6..9c27ae7620 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.sty +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-euclide.sty @@ -1,78 +1,151 @@ -% tkz-euclide.sty (utf8 encoding) -% Copyright 2020 Alain Matthes +% tkz-euclide.sty +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% -% This work consists of the files: -% tkz-euclide.sty -% tkz-obj-eu-angles.tex -% tkz-obj-eu-arcs.tex -% tkz-obj-eu-circles.tex -% tkz-obj-eu-compass.tex -% tkz-obj-eu-draw-circles.tex -% tkz-obj-eu-draw-lines.tex -% tkz-obj-eu-draw-polygons.tex -% tkz-obj-eu-lines.tex -% tkz-obj-eu-points-by.tex -% tkz-obj-eu-points-rnd.tex -% tkz-obj-eu-points-with.tex -% tkz-obj-eu-points.tex -% tkz-obj-eu-polygons.tex -% tkz-obj-eu-protractor.tex -% tkz-obj-eu-sectors.tex -% tkz-obj-eu-show.tex -% tkz-obj-eu-triangles.tex -% tkz-tools-angles.tex -% tkz-tools-intersections.tex -% tkz-tools-math.tex -%<------------------------------------------------------------–> -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-euclide.sty} +%<------------------------------------------------------------> +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-euclide.sty} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tkz-euclide}[2020/03/18 3.06c for euclidan geometry ] -\RequirePackage{tkz-base} -\makeatletter -\@ifpackagelater{tkz-base}{2020/03/18}{% - % Package is new enough -}{% - \PackageError{tkz-euclide}{Package tkz-base is too old , you need a recent version}% +\ProvidesPackage{tkz-euclide}[ 2022/01/04 4.00 for pure Euclidean Geometry ] + +\@ifpackageloaded{tkz-base}{ +\newdimen\tkzRadius +\newdimen\tkzLength +\newdimen\tkz@radi +\newif\iftkz@line@normed +\newif\ifnormtkzcode@execute% german ? right angle +\newif\iftkz@swap@sc%---------------------- semi circle +}{ +\RequirePackage{tikz} +\usetikzlibrary{angles, + arrows, + arrows.meta, + calc, + decorations, + decorations.markings, + decorations.pathreplacing, + decorations.shapes, + decorations.text, + decorations.pathmorphing, + intersections, + plotmarks, + quotes, + shapes.misc + } +\RequirePackage{xfp} +%--------------------- +\newdimen\tkzRadius +\newdimen\tkzLength +\newdimen\tkz@radi +%--------------------- tkz registres +\newdimen\tkz@ax +\newdimen\tkz@ay +\newdimen\tkz@bx +\newdimen\tkz@by +\newdimen\tkz@cx +\newdimen\tkz@cy +\newdimen\tkz@dx +\newdimen\tkz@dy +%--------------------- points +\newif\iftkz@polar\tkz@polarfalse +\newif\iftkz@pt@polar +\newif\iftkz@pt@show +\newif\iftkz@pt@noname +\newif\iftkz@coord@noxdraw +\newif\iftkz@coord@noydraw +\newif\iftkz@vec@normed +%--------------------- lines +\newif\iftkz@line@normed +%--------------------- tkz axis +\newif\iftkz@X@noticks +\newif\iftkz@Y@noticks +\newif\iftkz@X@nograd +\newif\iftkz@Y@nograd +\newif\iftkz@X@orig +\newif\iftkz@Y@orig +\newif\iftkz@X@unit +\newif\iftkz@Y@unit +\newif\iftkz@np +\newif\iftkz@swap +\newif\iftkz@init@NO +\newif\iftkz@Rep@orig%--------------------- Rep +\newif\iftkzLengthIncm%--------------------- Math +\newif\iftkz@sop@show%--------------------- marks +\newif\iftkz@equi@show +\newif\iftkz@gd@sub% sub grid ?%--------------------- about grid +\newif\iftkz@node\tkz@nodefalse +\newif\iftkz@legend@line%--------------------- legend +\newif\iftkz@TestSubString +\newif\ifnormtkzcode@execute% german ? right angle +\newif\iftkz@swap@sc%---------------------- semi circle +\newif\ifpgf@unknown % math arith +\newif\ifpgf@isaprime +\newcount\tkz@cntmk +\newif\iftkz@RappReturn % protractor +\newif\iftkz@RappFull +%--------------------- Init +\def\tkz@xa{0} +\def\tkz@xb{10} +\def\tkz@ya{0} +\def\tkz@yb{10} +\def\tkz@mathresult{} +\InputIfFileExists{tkz-euclide.cfg}{% +\typeout{Local configuration file tkz-euclide.cfg found and used}}{% +\typeout{tkz-euclide.cfg not found}} } -\makeatother +%--------------------- Init +\def\tkz@tmp@xa{-5} +\def\tkz@tmp@xb{+5} +\def\tkz@tmp@ya{-5} +\def\tkz@tmp@yb{+5} +%<----------------------------------------------------------> + \DeclareOption*{} \ProcessOptions -%<----------------------------------------------------------–> +%<----------------------------------------------------------> % Initialisation -%<----------------------------------------------------------–> -\input{tkz-tools-intersections} -\input{tkz-tools-angles} -\usetkzobj{% - eu-angles,% - eu-arcs,% - eu-compass,% - eu-circles,% - eu-draw-circles,% - eu-draw-lines,% - eu-draw-polygons,% - eu-draw-triangles,% - eu-lines,% - eu-points,% - eu-points-by,% - eu-points-rnd,% - eu-points-with,% - eu-polygons,% - eu-protractor,% - eu-sectors,% - eu-show,% - eu-triangles} -\endinput
\ No newline at end of file +%<----------------------------------------------------------> +\@ifpackageloaded{tkz-base}{}{% +% from base +\input{tkz-tools-eu-base.tex} +\input{tkz-tools-eu-utilities.tex} +\input{tkz-tools-eu-BB.tex} +\input{tkz-obj-eu-grids.tex} +\input{tkz-lib-eu-marks.tex} +\input{tkz-tools-eu-text.tex} +\input{tkz-lib-eu-shape.tex} +\input{tkz-obj-eu-axesmin.tex} +\input{tkz-tools-eu-colors.tex} +\input{tkz-obj-eu-points.tex} +} +% next from euclide +\input{tkz-tools-eu-math.tex} +\input{tkz-tools-eu-intersections} +\input{tkz-tools-eu-angles} +\input{tkz-obj-eu-compass.tex} +\input{tkz-obj-eu-circles.tex} +\input{tkz-obj-eu-circles-by.tex} +\input{tkz-obj-eu-draw-angles.tex} +\input{tkz-obj-eu-draw-circles.tex} +\input{tkz-obj-eu-draw-lines.tex} +\input{tkz-obj-eu-draw-polygons.tex} +\input{tkz-obj-eu-draw-triangles.tex} +\input{tkz-obj-eu-lines.tex} +\input{tkz-obj-eu-points-by.tex} +\input{tkz-obj-eu-points-rnd.tex} +\input{tkz-obj-eu-points-spc.tex} +\input{tkz-obj-eu-points-with.tex} +\input{tkz-obj-eu-polygons.tex} +\input{tkz-obj-eu-protractor.tex} +\input{tkz-obj-eu-sectors.tex} +\input{tkz-obj-eu-show.tex} +\input{tkz-obj-eu-triangles} +\endinput diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-lib-eu-marks.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-lib-eu-marks.tex new file mode 100644 index 0000000000..f78e764632 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-lib-eu-marks.tex @@ -0,0 +1,122 @@ +% tkz-eu-lib-marks.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-lib-eu-marks.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% Création des symboles +%<--------------------------------------------------------------------------–> +\def\tkz@undefined{none} +% double bar +\pgfdeclareplotmark{||} +{% + \pgfpathmoveto{\pgfqpoint{2\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{-2\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-2\pgflinewidth}{-\pgfplotmarksize}} + \pgfusepathqstroke +} +%triple bar +\pgfdeclareplotmark{|||} +{% + \pgfpathmoveto{\pgfqpoint{0 pt}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0 pt}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{-3\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-3\pgflinewidth}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{3\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{3\pgflinewidth}{-\pgfplotmarksize}} + \pgfusepathqstroke +} +% An bar slant + +\pgfdeclareplotmark{s|} +{% + \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}% + {-.70710678\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}% + {.70710678\pgfplotmarksize}} + \pgfusepathqstroke +} + +% An double bar slant + +\pgfdeclareplotmark{s||} +{% + \pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}} + \pgfusepathqstroke +} +\pgfdeclareplotmark{s|||} +{% + \pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{1.75\pgfplotmarksize}{\pgfplotmarksize}} + \pgfusepathqstroke +} +% z +\pgfdeclareplotmark{z} +{% + \pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0.75\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{\pgfplotmarksize}} + \pgfusepathqstroke +} +% s +\pgfdeclareplotmark{s} +{% + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{-\pgfplotmarksize}{\pgfplotmarksize}} + {\pgfpoint{\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{\pgfplotmarksize}{-\pgfplotmarksize}} + {\pgfpoint{-\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfusepathqstroke +} +% infinity +\pgfdeclareplotmark{oo} +{% + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{.5\pgfplotmarksize}{1\pgfplotmarksize}} + {\pgfpoint{\pgfplotmarksize}{0pt}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{-.5\pgfplotmarksize}{1\pgfplotmarksize}} + {\pgfpoint{-\pgfplotmarksize}{0pt}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{.5\pgfplotmarksize}{-1\pgfplotmarksize}} + {\pgfpoint{\pgfplotmarksize}{0pt}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{-.5\pgfplotmarksize}{-1\pgfplotmarksize}} + {\pgfpoint{-\pgfplotmarksize}{0pt}} + \pgfusepathqstroke +} +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-lib-eu-shape.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-lib-eu-shape.tex new file mode 100644 index 0000000000..234ba5084f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-lib-eu-shape.tex @@ -0,0 +1,51 @@ +% tkz-lib-eu-shape.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-lib-eu-shape.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% Création des symboles +%<--------------------------------------------------------------------------–> +% define a new shape for the points +\pgfdeclareshape{cross} +{% + \inheritsavedanchors[from=rectangle] % this is nearly a rectangle + \inheritanchorborder[from=rectangle] + \inheritanchor[from=rectangle]{north} + \inheritanchor[from=rectangle]{north west} + \inheritanchor[from=rectangle]{north east} + \inheritanchor[from=rectangle]{center} + \inheritanchor[from=rectangle]{west} + \inheritanchor[from=rectangle]{east} + \inheritanchor[from=rectangle]{mid} + \inheritanchor[from=rectangle]{mid west} + \inheritanchor[from=rectangle]{mid east} + \inheritanchor[from=rectangle]{base} + \inheritanchor[from=rectangle]{base west} + \inheritanchor[from=rectangle]{base east} + \inheritanchor[from=rectangle]{south} + \inheritanchor[from=rectangle]{south west} + \inheritanchor[from=rectangle]{south east} + \foregroundpath{ +% store lower right in xa/ya and upper right in xb/yb + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y + \pgfpathmoveto{\pgfqpoint{0 pt}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{0 pt}{\pgf@yb}} + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0 pt}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{0 pt}} + } +} +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-angles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-angles.tex deleted file mode 100644 index 75b8bf6c92..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-angles.tex +++ /dev/null @@ -1,297 +0,0 @@ -% tkz-tool-eu-angles.tex -% Copyright 2020 Alain Matthes -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status “maintained”. -% -% The Current Maintainer of this work is Alain Matthes. - -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-tool-eu-angles.tex} -\makeatletter -%<--------------------------------------------------------------------------–> -\newdimen\tkz@arcsize% from julian julian@d-and-j.net -\newdimen\tkz@fillsize -%<-------------------------------------------------------------------------–> - -%<--------------------------------------------------------------------------–> -% tkzDrawArcRAN > -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcRAN[#1](#2,#3)(#4,#5){% -\begingroup - \draw[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); -\endgroup -} -%<--------------- tkzPathArcRAN ---------------------------------- -\def\tkzPathArcRAN[#1](#2,#3)(#4,#5){% -\begingroup - \path[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); -\endgroup -} -%<--------------------------------------------------------------------------–> -% Mark an angle modi 3.03 suppression de \tkz@mksize, -%<--------------------------------------------------------------------------–> -% \tkzMarkAngle(B, A, C) -% -% Marque d'angle -% arc de cercle (simple/double/triple) et marque d'églité. -% -% Par défaut: -% arc = simple -% size = 1cm (rayon de l'arc) -% style traits pleins -% mkpos ? position: 0.5 (position de la marque) -% mark rien du tout (ignoré si type est utilisé) -% -% Paramètres (optionnels) -% arc : l, ll, lll -% mksize : 1cm -% gap : 3pt -% dist ? -% style : type de traits -% type : none, |, ||,|||, z, s, x, o, oo -% position: 0.5 -% mark : none , |, ||,|||, z, s, x, o, oo mais tous les -% % symboles de tikz sont permis -%<------------------------- Label on angle -------------------------------–> -\def\tkz@arcsimple{l} -\def\tkz@arcdouble{ll} -\def\tkz@arctriple{lll} - -%\tikzset{lbstyle/.style = {color=\tkz@mainlinecolor}} - -\pgfkeys{/tkzmkangle/.cd, - arc/.estore in = \tkz@arc, - size/.store in = \tkz@size, - mark/.store in = \tkz@markang, - mkpos/.estore in = \tkz@mkpos, - mksize/.store in = \tkz@mksize, - mkcolor/.store in = \tkz@mkcolor, - arc = l, - size = 1 cm, - mark = |, - mksize = 4pt, - mkcolor = black, - mkpos = 0.5, - /tkzmkangle/.search also={/tikz} -} \def\tkzMarkAngle{\pgfutil@ifnextchar[{\tkz@MarkAngle}{\tkz@MarkAngle[]}} -\def\tkz@MarkAngle[#1](#2,#3,#4){% -\begingroup -\pgfqkeys{/tkzmkangle}{#1} - -\tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} -\tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} -\tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - -% les marques, aucune si mktype = none -\def\tkz@mymark{\pgfuseplotmark{\tkz@markang}} -% draw the arcs -\begin{scope}[decoration= {markings, - mark=at position \tkz@mkpos with {\tkz@mymark}}] - \ifx\tkz@arc\tkz@arcsimple - \tkzDrawArcRAN[#1,fill=none,postaction={decorate}]% - (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle) - \else - \ifx\tkz@arc\tkz@arcdouble - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size-1.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle) - \tkzPathArcRAN[#1,fill=none,postaction={decorate}]% - (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle)% - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size+1.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle)% - \else - \ifx\tkz@arc\tkz@arctriple - \tkzDrawArcRAN[#1,fill=none,postaction={decorate}]% - (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle)% - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size-2.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle)% - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size+2.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle)% - \fi - \fi - \fi -\end{scope} -\endgroup -} -%<--------------------------------------------------------------------------–> -% multiple -\def\tkz@multiMA#1 #2\@nil{% - \protected@edef\tkz@temp{ - \noexpand \tkzMarkAngle[\tkz@optma](#1)}\tkz@temp% - \def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi - \next#2\@nil -} -%<--------------------------------------------------------------------------–> -\def\tkzMarkAngles{\pgfutil@ifnextchar[{\tkz@MarkAngles}{\tkz@MarkAngles[]}} -\def\tkz@MarkAngles[#1](#2){% -\xdef\tkz@optma{#1} - \begingroup - \let\next\tkz@multiMA - \next#2 \@nil % -\endgroup -} -% fin de \tkzMarkAngle -%<--------------------------------------------------------------------------–> -% FillAngle -%<--------------------------------------------------------------------------–> -\pgfkeys{/tkzFill/.cd, - size/.store in = \tkz@size, - size = 1 cm, - /tkzFill/.search also = {/tikz} - } - -\def\tkzFillAngle{\pgfutil@ifnextchar[{\tkz@FillAngle}{\tkz@FillAngle[]}} -\def\tkz@FillAngle[#1](#2,#3,#4){% -\begingroup -\pgfqkeys{/tkzFill}{#1} - \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} - \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} - \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - \path[shift = {(#3)},/tkzFill/.cd,#1]% - (#3) -- (\tkz@FirstAngle:\tkz@size) arc% - (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@size)--cycle; -\endgroup -} -%<--------------------------------------------------------------------------–> -% multiple -\def\tkz@multiFA#1 #2\@nil{\protected@edef\tkz@temp{% - \noexpand \tkzFillAngle[\tkz@optfa](#1)}% - \tkz@temp% - \def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi - \next#2\@nil -} -%<--------------------------------------------------------------------------–> -\def\tkzFillAngles{\pgfutil@ifnextchar[{\tkz@MFillAngles}{\tkz@MFillAngles[]}} -\def\tkz@MFillAngles[#1](#2){% -\xdef\tkz@optfa{#1} -\begingroup - \let\next\tkz@multiFA - \next#2 \@nil % -\endgroup -} -%<------------------------- Label on angle -------------------------------–> -\pgfkeys{/tkzlabelangle/.cd, - dist/.store in = \tkzlabeldist, - angle/.store in = \tkzlabelangle, - dist = 1, - angle = {}, - /tkzlabelangle/.search also={/tikz} -} -\def\tkzLabelAngle{\pgfutil@ifnextchar[{\tkz@LabelAngle}{\tkz@LabelAngle[]}} -\def\tkz@LabelAngle[#1](#2,#3,#4)#5{%2016 added normalize from karu's code -\begingroup - \pgfqkeys{/tkzlabelangle}{#1} - \ifx\tkzutil@empty\tkzlabelangle% no value so calc angle of bisector - \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} - \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} - \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - \edef\tkzlabelAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} - \fi - \path (#3) --+(\tkzlabelAngle:\tkzlabeldist) node[/tkzlabelangle/.cd,#1] {#5}; -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% multiple labels -\def\tkz@multiLBA#1 #2\@nil{% - \protected@edef\tkz@temp{ - \noexpand \tkzLabelAngle[\tkz@optlba](#1){\tkz@labelangle}}\tkz@temp% - \def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi - \next#2\@nil -} -% %<--------------------------------------------------------------------- -\def\tkzLabelAngles{\pgfutil@ifnextchar[{\tkz@LabelAngles}{% - \tkz@LabelAngles[]}} -\def\tkz@LabelAngles[#1](#2)#3{% - \def\tkz@optlba{#1} - \def\tkz@labelangle{#3} - \begingroup - \let\next\tkz@multiLBA - \next#2 \@nil % - \endgroup -} -%<----------------------------------------------------------------------- -% Symbole droites perpendiculaires -%<---------------------------------------------------------------------- -\pgfkeys{/tkzrightangle/.cd, - norm tkz code/.is if = normtkzcode@execute, - german/.code = \normtkzcode@executefalse, - size/.store in = \tkz@ra@size, - dotsize/.store in = \tkz@dotsize, - size = .25, - dotsize = 3 pt, - /tkzrightangle/.search also={/tikz}, -} -\newcommand*{\tkzMarkRightAngle}[1][]{\tkz@RightAngle[#1]} -\def\tkz@RightAngle[#1](#2,#3,#4){% -\begingroup -\normtkzcode@executetrue -\pgfqkeys{/tkzrightangle}{#1} - \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% - \pgfpointanchor{#2}{center}}} - \tkz@ax=\pgf@x\relax% - \tkz@ay=\pgf@y\relax% - \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% - \pgfpointanchor{#4}{center}}} - \tkz@bx=\pgf@x\relax% - \tkz@by=\pgf@y\relax% - \ifnormtkzcode@execute% - \draw[/tkzrightangle/.cd,#1] - (#3) --++( 28.45274*\tkz@ra@size\tkz@ax , 28.45274*\tkz@ra@size\tkz@ay) - --++( 28.45274*\tkz@ra@size\tkz@bx , 28.45274*\tkz@ra@size\tkz@by) - --++(-28.45274*\tkz@ra@size\tkz@ax ,-28.45274*\tkz@ra@size\tkz@ay) - -- (#3); - \else% - % find angles - \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} - \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} - \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - \edef\tkzCircleAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} - \tkzDrawArcRAN[/tkzrightangle/.cd,#1](#3,\tkz@ra@size)% - (\tkz@FirstAngle,\tkz@SecondAngle) - \path (#3) --+ (\tkzCircleAngle:\tkz@ra@size/2) - node[fill,circle,minimum size=\tkz@dotsize, - inner sep=0 pt,/tkzrightangle/.cd,#1] {}; -\fi% -\endgroup -} -%<--------------------------------------------------------------------------–> -\def\tkz@multiRA#1 #2\@nil{% -\protected@edef\tkz@temp{ - \noexpand \tkzMarkRightAngle[\tkz@optRA](#1)}\tkz@temp% -\def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi -\next#2\@nil -} -%<--------------------------------------------------------------------------–> -\def\tkzMarkRightAngles{\pgfutil@ifnextchar[{\tkz@RightAngles}{% - \tkz@RightAngles[]}} -\def\tkz@RightAngles[#1](#2){% -\xdef\tkz@optRA{#1} -\begingroup - \let\next\tkz@multiRA - \next#2 \@nil % -\endgroup -} - -\makeatother -\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-arcs.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-arcs.tex deleted file mode 100644 index 2302fbbc61..0000000000 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-arcs.tex +++ /dev/null @@ -1,178 +0,0 @@ -% tkz-obj-eu-arcs.tex -% Copyright 2020 Alain Matthes -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status “maintained”. -% -% The Current Maintainer of this work is Alain Matthes. - - -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/23} -\typeout{2020/03/23 3.06c tkz-obj-eu-arcs.tex} -\makeatletter -%<------------------------------ Arcs -------------------------------------– -% options : delta -% \def\tkz@delta{0} -% \tikzset{arc style/.style={#1}} -% \pgfkeys{/tikz/.cd,delta/.code={\def\tkz@delta{#1}}} -\tikzset{arc style/.style={gray,thin}} -\gdef\tkz@numa{0} -\pgfkeys{/tkzdrawarc/.cd, - type/.is choice, - type/towards/.code = \def\tkz@numa{0}, - type/rotate/.code = \def\tkz@numa{1}, - type/angles/.code = \def\tkz@numa{2}, - type/R/.code = \def\tkz@numa{3}, - type/R with nodes/.code = \def\tkz@numa{4}, - towards/.style = {type=towards}, - rotate/.style = {type=rotate}, - R/.style = {type=R}, - angles/.style = {type=angles}, - R with nodes/.style = {type=R with nodes}, - diameter/.code = {}, - arc/.code = {}, - size/.code = {}, - mark/.code = {}, - mkpos/.code = {}, - mksize/.code = {}, - mkcolor/.code = {}, - type/.default = towards, - delta/.store in = \tkz@delta, - delta = 0, - /tkzdrawarc/.search also = {/tikz} -} -\def\tkzDrawArc{\pgfutil@ifnextchar[{\tkz@DrawArc}{\tkz@DrawArc[]}} -\def\tkz@DrawArc[#1](#2,#3)(#4){% -\begingroup -\pgfqkeys{/tkzdrawarc}{#1} -\ifcase\tkz@numa% - \tkzDrawArcTowards[#1](#2,#3)(#4) -\or% 1 - \tkzDrawArcRotate[#1](#2,#3)(#4) -\or% 2 - \tkzDrawArcAngles[#1](#2,#3)(#4) -\or% 3 - \tkzDrawArcRAngles[#1](#2,#3)(#4) - \or% 4 - \tkzDrawArcR[#1](#2,#3)(#4) -\fi -\endgroup -} -%<--------------------------------------------------------------------------–> -% ARC nodes #2 center #3 first point last point #4 -% delta un peu plus à chaque extrémité -% example : \tkzDrawArc(A,B)(C) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcTowards{\pgfutil@ifnextchar[{\tkz@DrawArcN}{\tkz@DrawArcN[]}} -\def\tkz@DrawArcN[#1](#2,#3)(#4){% -\begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} - \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,\tkz@SecondAngle) -\endgroup -} -%<--------------------------------------------------------------------------–> -% nodes #2 center #3 first point rotate #4 with Angle -% delta un peu plus à chaque extrémité -% tkzDrawArcRotate(O,A)(60) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcRotate{\pgfutil@ifnextchar[{\tkz@DrawArcRotate}{% - \tkz@DrawArcRotate[]}} -\def\tkz@DrawArcRotate[#1](#2,#3)(#4){% -\begingroup - \tkzCalcLength(#2,#3) \tkzGetLength{tkz@radius} - \tkzFindSlopeAngle(#2,#3) \tkzGetAngle{tkz@FirstA} - \pgfmathadd{\tkz@FirstA}{#4} - \edef\tkz@SecondA{\pgfmathresult} - \pgfmathgreaterthan{#4}{0} - \ifdim\pgfmathresult pt=1 pt\relax% - \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstA,\tkz@SecondA) - \else - \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@SecondA,\tkz@FirstA) - \fi - \endgroup -} -%<--------------------------------------------------------------------------–> -% deux angles -% \tkzDrawArcAngles(O,A)(0,60) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcAngles{\pgfutil@ifnextchar[{\tkz@DrawArcAngles}{% - \tkz@DrawArcAngles[]}} -\def\tkz@DrawArcAngles[#1](#2,#3)(#4,#5){% -\begingroup - \tkzCalcLength(#2,#3) - \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult pt)(#4,#5) -\endgroup -} -%<--------------------------------------------------------------------------–> -% Degree #2 center #4 - #3 radius from #5 (degree) to #6(degree) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcRwithNodes{\pgfutil@ifnextchar[{\tkz@DrawArcRwithNodes}{% - \tkz@DrawArcRwithNodes[]}} -\def\tkz@DrawArcRwithNodes[#1](#2,#3,#4)(#5,#6){% -\begingroup - \tkzCalcLength(#3,#4) - \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#6)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult)(\tkz@FirstAngle,\tkz@SecondAngle) -\endgroup -} -%<--------------------------------------------------------------------------–> -% Nodes R #2 center #3 radius en cm from #4(node) to #5(node) -% \tkzDrawArcR(O,2 cm)(A,B) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcR{\pgfutil@ifnextchar[{\tkz@DrawArcR}{\tkz@DrawArcR[]}} -\def\tkz@DrawArcR[#1](#2,#3)(#4,#5){% -\begingroup - \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawArcRAngles[#1](#2,#3)(\tkz@FirstAngle,\tkz@SecondAngle) -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% #1 center #2 radius #4 first angle (degree) #5 second angle (degree) -% angles 0 .. 180 or -180 .. 0 -%<--------------------------------------------------------------------------–> -% example : \tkzDrawArc(A,2 cm)(30,90) -\def\tkzDrawArcRAngles{\pgfutil@ifnextchar[{\tkz@DrawArcRAngles}{% - \tkz@DrawArcRAngles[]}} -\def\tkz@DrawArcRAngles[#1](#2,#3)(#4,#5){% - \begingroup - \pgfmathparse{#4}\edef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathparse{#5}\edef\tkz@SecondAngle{\pgfmathresult}% - \pgfmathgreaterthan{\tkz@FirstAngle}{0} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathsubtract{\tkz@FirstAngle}{360} - \edef\tkz@FirstAngle{\pgfmathresult}% - \fi - \else - \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathadd{\tkz@SecondAngle}{360} - \edef\tkz@SecondAngle{\pgfmathresult}% - \fi - \fi - \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} - \edef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} - \edef\tkz@SecondAngle{\pgfmathresult} - \draw[shift = {(#2)},arc style,/tkzdrawarc/.cd,#1]% - (\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3); -\endgroup -} -%<--------------------------------------------------------------------------–> - -\makeatother -\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-axesmin.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-axesmin.tex new file mode 100644 index 0000000000..2c230a6f07 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-axesmin.tex @@ -0,0 +1,171 @@ +% tkz-obj-eu-axesmin.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-axesmin} + +\makeatletter +\newif\ifinteger +\def\removedot#1.{#1} +\newcommand\tkzgetinteger[1]{\expandafter\tkz@getinteger#1.\@nil} +\def\tkz@getinteger#1.#2\@nil{% + \ifx\empty#2\empty + \integertrue + \else + \ifnum\removedot#2=0 + \integertrue + \else + \integerfalse + \fi + \fi +} + +%<--------------------------------------------------------------------------–> +% Setup axe +%<--------------------------------------------------------------------------–> +\pgfkeys{tkzaxis/.cd, + line width/.code = \xdef\tkz@sua@lw{#1}, + color/.code = \xdef\tkz@sua@color{#1}, + tickwd/.code = \xdef\tkz@sua@tickwd{#1}, + ticka/.code = \xdef\tkz@sua@ticka{#1}, + tickb/.code = \xdef\tkz@sua@tickb{#1}, + line width = \tkz@init@lw, + color = \tkz@init@color, + tickwd = \tkz@init@tickwd, + ticka = \tkz@init@ticka, + tickb = \tkz@init@tickb +} + +\def\tkzSetUpAxis{\pgfutil@ifnextchar[{\tkz@SetUpAxis}{\tkz@SetUpAxis[]}} +\def\tkz@SetUpAxis[#1]{% +\begingroup +\pgfqkeys{/tkzaxis}{#1} +\global\let\tkz@init@lw\tkz@sua@lw +\global\let\tkz@init@gradsize\tkz@sua@gradsize +\global\let\tkz@init@color\tkz@sua@color +\global\let\tkz@init@tickwd\tkz@sua@tickwd +\global\let\tkz@init@ticka\tkz@sua@ticka +\global\let\tkz@init@tickb\tkz@sua@tickb +\endgroup +} +%<--------------------------------------------------------------------------–> +% tkzDrawX todo améliorer les unités +% sans doute à revoir loop from 0 to i then calcul dans la boucle de la position +% et de l'affichage +%<--------------------------------------------------------------------------–> +\pgfkeys{% + /tkzdrawX/.cd, + color/.store in = \tkz@X@color, + label/.store in = \tkz@X@label, + right space/.store in = \tkz@axe@rxspace, + left space/.store in = \tkz@axe@lxspace, + step/.code = {\edef\tkz@posnext{\fpeval{#1}}}, + color = \tkz@init@color, + label = \tkz@init@xlabel, + step = \tkz@init@xstep, + right space = \tkz@init@rightspace, %??? + left space = \tkz@init@leftspace, + noticks/.is if = tkz@X@noticks, + noticks/.default = true, + noticks = true, + tickwd/.store in = \tkz@X@tickwd, + tickup/.store in = \tkz@X@tickup, + tickdn/.store in = \tkz@X@tickdn, + tickwd = \tkz@init@tickwd, + tickup = \tkz@init@ticka, + tickdn = \tkz@init@tickb, + /tkzdrawX/.search also={/tikz}, + } + +\def\tkzDrawX{\pgfutil@ifnextchar[{\tkz@DrawX}{\tkz@DrawX[]}} +\def\tkz@DrawX[#1]{ +\begingroup% +\pgfqkeys{/tkzdrawX}{#1} +\edef\tkz@posmax{\fpeval{trunc(\tkz@xb,\tkz@init@xdec)}} +\edef\tkz@posmin{\fpeval{trunc(\tkz@xa,\tkz@init@xdec)}} +\edef\tkz@xbsup{\fpeval{\tkz@xb+\tkz@axe@rxspace}} +\edef\tkz@xainf{\fpeval{\tkz@xa-\tkz@axe@lxspace}} +\path (\tkz@xainf,0)--(\tkz@xbsup,0) node(tkz@xline){}; +\draw[xaxe style, + color = \tkz@X@color, + /tkzdrawX/.cd, #1] (\tkz@xainf,0)--(\tkz@xbsup,0) + node[ xlabel style, + /tkzdrawX/.cd, + #1]{\tkz@X@label}; + \iftkz@X@noticks + \else + \edef\tkz@posmax{\fpeval{trunc(\tkz@posmax,\tkz@init@xdec)}} + \edef\tkz@posnext{\fpeval{\tkz@posnext/\tkz@init@xstep+\tkz@posmin}} + \foreach \pos in {\tkz@posmin,...,\tkz@posmax}{% + \edef\tkz@pos{\fpeval{\pos*1}}% ??? + \draw[ color = \tkz@X@color, line width = \tkz@X@tickwd, + shift = {(\tkz@pos,0)}]% + (0pt,\tkz@X@tickup)--(0pt,-\tkz@X@tickdn); + } + \fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% tkzDrawY todo améliorer les unités +%<--------------------------------------------------------------------------–> +\pgfkeys{% + /tkzdrawY/.cd, + color/.store in = \tkz@Y@color, + label/.store in = \tkz@Y@label, + up space/.store in = \tkz@axe@uyspace, + down space/.store in = \tkz@axe@dyspace, + step/.code = {\edef\tkz@posnext{\fpeval{#1}}}, + color = \tkz@init@color, + label = \tkz@init@ylabel, + step = \tkz@init@ystep, + up space = \tkz@init@upspace, + down space = \tkz@init@downspace, + noticks/.is if = tkz@Y@noticks, + noticks/.default = true, + noticks = true, + tickwd/.store in = \tkz@Y@tickwd, + ticklt/.store in = \tkz@Y@ticklt, + tickrt/.store in = \tkz@Y@tickrt, + tickwd = \tkz@init@tickwd, + ticklt = \tkz@init@tickb, + tickrt = \tkz@init@ticka, + /tkzdrawY/.search also={/tikz}, + } + +\def\tkzDrawY{\pgfutil@ifnextchar[{\tkz@DrawY}{\tkz@DrawY[]}} +\def\tkz@DrawY[#1]{% +\begingroup +\pgfkeys{/tkzdrawY/.cd,step = \tkz@init@ystep} +\pgfqkeys{/tkzdrawY}{#1} +\edef\tkz@posmax{\fpeval{trunc(\tkz@yb,\tkz@init@ydec)}} +\edef\tkz@posmin{\fpeval{trunc(\tkz@ya,\tkz@init@ydec)}} +\edef\tkz@ybsup{\fpeval{\tkz@yb+\tkz@axe@uyspace}} +\edef\tkz@yainf{\fpeval{\tkz@ya-\tkz@axe@dyspace}} +\path (0,\tkz@yainf)--(0,\tkz@ybsup) node(tkz@yline){}; +\draw[color = \tkz@Y@color, + yaxe style,/tkzdrawY/.cd,#1] (0,\tkz@yainf)--(0,\tkz@ybsup) + node[ylabel style,/tkzdrawY/.cd,#1]{\tkz@Y@label}; + \iftkz@Y@noticks + \else + \edef\tkz@posmax{\fpeval{trunc(\tkz@posmax,\tkz@init@ydec)}} + \edef\tkz@posnext{\fpeval{\tkz@posnext/\tkz@init@ystep+\tkz@posmin}} + \foreach \tkz@pos in {\tkz@posmin,\tkz@posnext,...,\tkz@posmax}{% + \draw[color = \tkz@Y@color, + line width = \tkz@Y@tickwd, + shift = {(0,\tkz@pos)}]% + (\tkz@Y@tickrt,0pt)--(-\tkz@Y@ticklt,0pt);} + + \fi +\endgroup} +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles-by.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles-by.tex new file mode 100644 index 0000000000..c4824009ce --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles-by.tex @@ -0,0 +1,161 @@ +% tkz-obj-eu-circles.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-circles.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% tkzCircle center and one point +%<--------------------------------------------------------------------------–> +% attention radius circle is defined by center and a point on the circle +% R defined by center and the value of the radius +% no need to define a circle with R tikz uses this method. +% through instead of radius +\def\tkz@numcby{0} +\pgfkeys{/tkzDefCircleBy/.cd, + translation/.code args = {from #1 to #2} { \def\tkz@numcby{0} + \def\tkzfrom{#1} + \def\tkzto{#2}}, + homothety/.code args = {center #1 ratio #2}{ \def\tkz@numcby{1} + \def\tkzcenter{#1} + \def\tkzratio{#2}}, + reflection/.code args = {over #1--#2}{ \def\tkz@numcby{2} + \def\tkzdeb{#1} + \def\tkzfin{#2}}, + symmetry/.code args = {center #1}{ \def\tkz@numcby{3} + \def\tkzcenter{#1}}, + rotation/.code args = {center #1 angle #2}{ \def\tkz@numcby{4} + \def\tkzcenter{#1} + \def\tkzangle{#2}}, + orthogonal from/.code args = {#1}{ \def\tkz@numcby{5} + \def\tkz@ptfrom{#1}}, + orthogonal through/.code args = {#1 and #2}{ \def\tkz@numcby{6} + \def\tkz@ptone{#1} + \def\tkz@pttwo{#2}}, + inversion/.code args={center #1 through #2}{ \def\tkz@numcby{7} + \def\tkzcenter{#1} + \def\tkzpoint{#2}} + } +\def\tkzDefCircleBy{\pgfutil@ifnextchar[{\tkz@DefCircleBy}{\tkz@DefCircleBy[]}} +\def\tkz@DefCircleBy[#1](#2){% +\begingroup +\pgfqkeys{/tkzDefCircleBy}{#1} +\ifcase\tkz@numcby% + \tkzDefCircleTranslation(#2)% + \or% 1 + \tkzDefCircleHomothety(#2) + \or% 2 + \tkzDefCircleReflection(#2) + \or% 3 + \tkzDefCircleSymmetry(#2) + \or% 4 + \tkzDefCircleRotation(#2) + \or% 5 + \tkzDefOrthogonalCircle(#2,\tkz@ptfrom) + \or% 6 + \tkzDefOrthoThroughCircle(#2,\tkz@ptone,\tkz@pttwo) + \or% 7 + \tkzDefInversionCircle(#2,\tkzcenter,\tkzpoint) + \fi +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleTranslation(#1,#2){% +\begingroup + \tkzUTranslation(\tkzfrom,\tkzto)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUTranslation(\tkzfrom,\tkzto)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleHomothety(#1,#2){% +\begingroup + \tkzUHomo(\tkzcenter,\tkzratio)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUHomo(\tkzcenter,\tkzratio)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleReflection(#1,#2){% +\begingroup + \tkzUSymOrth(\tkzdeb,\tkzfin)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUSymOrth(\tkzdeb,\tkzfin)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleSymmetry(#1,#2){% +\begingroup + \tkzUCSym(\tkzcenter)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUCSym(\tkzcenter)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleRotation(#1,#2){% +\begingroup + \tkzURotateAngle(\tkzcenter,\tkzangle)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzURotateAngle(\tkzcenter,\tkzangle)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefOrthogonalCircle(#1,#2,#3){% +\begingroup + \tkzTgtFromP(#1,#2)(#3) + \tkz@@CalcLengthcm(#1,tkzFirstPointResult){tkzLengthResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefOrthoThroughCircle(#1,#2,#3,#4){% +\begingroup + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{1/\tkz@lnb}} + \tkzVecKNorm[\tkz@lnc](#1,#3) + \pgfnodealias{tkz@PointResult}{tkzPointResult} + \tkzCircumCenter(tkz@PointResult,#3,#4) + \tkz@@CalcLength(tkzPointResult,#3){tkzLengthResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefInversionCircle(#1,#2,#3,#4){% +\begingroup + \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} + \tkzUInversePoint(#3,#4)(tkz@p1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUInversePoint(#3,#4)(tkz@p2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% \def\tkzDefInversionNegativeCircle(#1,#2,#3,#4){% +% \begingroup +% \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} +% \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p1) +% \tkzUCSym(\tkzcenter)(tkzPointResult) +% \pgfnodealias{tkzFirstPointResult}{tkzPointResult} +% \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p2) +% \tkzUCSym(\tkzcenter)(tkzPointResult) +% \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +% \endgroup +% } +%<--------------------------------------------------------------------------–> +% End Def Circle +%<--------------------------------------------------------------------------–> +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles.tex index 78e98afa8f..b6b2b80005 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-circles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-circles.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-circles.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-circles.tex} \makeatletter %<--------------------------------------------------------------------------–> % tkzCircle center and one point @@ -42,7 +39,7 @@ \def\tkz@numc{8}}, spieker/.code = \def\tkz@numc{9}, K/.code = \def\tkz@koeff{#1}, - K = 1, + K = 1, through } \def\tkzDefCircle{\pgfutil@ifnextchar[{\tkz@DefCircle}{\tkz@DefCircle[]}} @@ -72,13 +69,40 @@ \fi \endgroup } +%for compatibility +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleR(#1,#2){% +\begingroup + \edef\tkzLengthResult{\fpeval{round(#2,5)}} + \global\let\tkzLengthResult\tkzLengthResult + \tkzRenamePoint(#1){tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Through Circle center and point +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleThrough(#1,#2){% +\begingroup + \tkz@@CalcLengthcm(#1,#2){tkzLengthResult} + \tkzRenamePoint(#1){tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Diameter Circle +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleD(#1,#2){% +\begingroup + \tkzDefMidPoint(#1,#2) + \tkz@@CalcLengthcm(#1,tkzPointResult){tkzLengthResult} +\endgroup +} %<--------------------------------------------------------------------------–> % Circum Circle %<--------------------------------------------------------------------------–> \def\tkzDefCircumCircle(#1,#2,#3){% \begingroup \tkzCircumCenter(#1,#2,#3) - \tkzCalcLength(#1,tkzPointResult) + \tkz@@CalcLengthcm(#1,tkzPointResult){tkzLengthResult}%3.06 add [cm] \endgroup } %<--------------------------------------------------------------------------–> @@ -90,7 +114,7 @@ \pgfnodealias{tkz@incenter}{tkzPointResult} \tkzUProjection(#1,#3)(tkz@incenter) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \tkzCalcLength(tkzPointResult,tkz@incenter) + \tkz@@CalcLengthcm(tkzPointResult,tkz@incenter){tkzLengthResult} \pgfnodealias{tkzPointResult}{tkz@incenter} \pgfnodealias{tkzFirstPointResult}{tkz@incenter} \endgroup @@ -104,7 +128,7 @@ \pgfnodealias{tkz@excenter}{tkzPointResult} \tkzUProjection(#1,#3)(tkz@excenter) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \tkzCalcLength(tkzPointResult,tkz@excenter)% for tkzGetLength + \tkz@@CalcLengthcm(tkzPointResult,tkz@excenter){tkzLengthResult}% for tkzGetLength \pgfnodealias{tkzPointResult}{tkz@excenter} \pgfnodealias{tkzFirstPointResult}{tkz@excenter} \endgroup @@ -128,7 +152,7 @@ \tkzDefMidPoint(#2,#3) \pgfnodealias{tkz@e2}{tkzPointResult} \tkzDefMidPoint(#1,#3) \pgfnodealias{tkz@e3}{tkzPointResult} \tkzCircumCenter(tkz@e1,tkz@e2,tkz@e3) - \tkzCalcLength(tkzPointResult,tkz@e1) + \tkz@@CalcLengthcm(tkzPointResult,tkz@e1){tkzLengthResult} \endgroup } \let\tkzDefNinePointsCircle\tkzEulerCircle% @@ -139,7 +163,7 @@ \tkzEulerCenter(#1,#2,#3) \pgfnodealias{eur@pta}{tkzPointResult} \tkzDefMidPoint(#1,#2) - \tkzCalcLength(eur@pta,tkzPointResult) + \tkz@@CalcLengthcm(eur@pta,tkzPointResult){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -152,7 +176,7 @@ \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) - \tkzCalcLength(tkzPointResult,tkzFirstPointResult) + \tkz@@CalcLengthcm(tkzPointResult,tkzFirstPointResult){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -172,7 +196,7 @@ \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#2,#3) \pgfnodealias{apo@ptb}{tkzPointResult} \tkzDefMidPoint(apo@pta,apo@ptb) - \tkzCalcLength(tkzPointResult,apo@pta) + \tkz@@CalcLengthcm(tkzPointResult,apo@pta){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -212,18 +236,18 @@ \def\tkzDefOrthogonalCircle(#1,#2,#3){% \begingroup \tkzTgtFromP(#1,#2)(#3) - \tkzCalcLength[cm](#1,tkzFirstPointResult) + \tkz@@CalcLengthcm(#1,tkzFirstPointResult){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> \def\tkzDefOrthoThroughCircle(#1,#2,#3,#4){% \begingroup - \tkzCalcLength[cm](#1,#3)\tkzGetLength{tkz@lnb}% - \edef\tkz@lnc{\fpeval{1/\tkz@lnb}} + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{1/\tkz@lnb}} \tkzVecKNorm[\tkz@lnc](#1,#3) \pgfnodealias{tkz@PointResult}{tkzPointResult} \tkzCircumCenter(tkz@PointResult,#3,#4) - \tkzCalcLength(tkzPointResult,#3) + \tkz@@CalcLength(tkzPointResult,#3){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -235,11 +259,33 @@ \pgfnodealias{tkz@spka}{tkzPointResult} \tkzDefMidPoint(#1,#2) \tkzUProjection(#1,#2)(tkzPointResult) - \tkzCalcLength(tkz@spka,tkzPointResult) + \tkz@@CalcLength(tkz@spka,tkzPointResult){tkzLengthResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefInversionCircle(#1,#2,#3,#4){% +\begingroup + \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} + \tkzUInversePoint(#3,#4)(tkz@p1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUInversePoint(#3,#4)(tkz@p2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefInversionNegativeCircle(#1,#2,#3,#4){% +\begingroup + \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} + \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p1) + \tkzUCSym(\tkzcenter)(tkzPointResult) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p2) + \tkzUCSym(\tkzcenter)(tkzPointResult) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } %<--------------------------------------------------------------------------–> % End Def Circle %<--------------------------------------------------------------------------–> - \makeatother +\makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-compass.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-compass.tex index 136fee4522..a5eaa32e06 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-compass.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-compass.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-compass.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-compass.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-compass.tex} \makeatletter %<--------------------------------------------------------------------------–> % Author Alain Matthes @@ -27,21 +24,18 @@ % Setup Compass %<--------------------------------------------------------------------------–> \pgfkeys{tkzsucompass/.cd, - line width/.code = {\global\edef\tkz@compass@lw{#1}}, - color/.code = {\global\edef\tkz@compass@color{#1}}, - style/.code = {\global\edef\tkz@compass@style{#1}}, - } + line width/.store in = \tkz@compass@lw, + color/.store in = \tkz@compass@color, + style/.store in = \tkz@compass@style, + line width = \tkz@euc@compasswidth, + color = \tkz@euc@compasscolor, + style = \tkz@euc@compassstyle, + /tkzsucompass/.search also = {/tikz,/tkzcompass} + } %<--------------------------------------------------------------------------–> -\def\tkzSetUpCompass{\pgfutil@ifnextchar[{\tkz@SetUpCompass}{% remove tkzActivOff 3.03 - \tkz@SetUpCompass[]}} +\def\tkzSetUpCompass{\pgfutil@ifnextchar[{\tkz@SetUpCompass}{\tkz@SetUpCompass[]}} %<--------------------------------------------------------------------------–> \def\tkz@SetUpCompass[#1]{% -\pgfkeys{tkzsucompass/.cd, - line width = \tkz@euc@compasswidth, - color = \tkz@euc@compasscolor, - style = \tkz@euc@compassstyle, - /tkzsucompass/.search also = {/tikz} -} \pgfqkeys{/tkzsucompass}{#1} \tikzset{compass style/.style={color = \tkz@compass@color, line width = \tkz@compass@lw, @@ -59,31 +53,25 @@ % style traits pleins %<--------------------------------------------------------------------------–> - \pgfkeys{ - /tkzcompass/delta/.code = {\def\tkz@delta{#1}}, - /tkzcompass/length/.code = {\def\tkz@length{#1}}, - /tkzcompass/ratio/.code = {\def\tkz@ratio{#1}}, + \pgfkeys{/tkzcompass/.cd, + delta/.store in = \tkz@delta, + length/.store in = \tkz@length, + length = 1, + delta = 0, /tkzcompass/.unknown/.code = {\let\searchname=\pgfkeyscurrentname - \pgfkeysalso{\searchname/.try=#1, - /tikz/\searchname/.retry=#1}} + \pgfkeysalso{\searchname/.try=#1, /tikz/\searchname/.retry=#1}} } \def\tkzCompass{\pgfutil@ifnextchar[{\tkz@Compass}{\tkz@Compass[]}} \def\tkz@Compass[#1](#2,#3){% \begingroup -\pgfkeys{% - tkzcompass/.cd, - length = 1, - delta = 0, - ratio = .5 - } \pgfkeys{tkzcompass/.cd,#1} -\tkzCalcLength(#2,#3)\tkzGetLength{tkz@tempLen} +\tkz@@CalcLength(#2,#3){tkz@tempLen} \ifnum\tkz@delta=0 % \pgfmathsetmacro{\tkz@delta}{min(deg(\tkz@length cm/ \tkz@tempLen pt),180)/2} \fi \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@angle}% -\draw[shift ={(#2)},/tkzcompass/.cd,compass style,#1]% +\draw[shift ={(#2)},compass style,/tkzcompass/.cd,#1]% (\tkz@angle-\tkz@delta:\tkz@tempLen pt)% arc (\tkz@angle-\tkz@delta:\tkz@angle+\tkz@delta:\tkz@tempLen pt); \endgroup} @@ -108,4 +96,4 @@ }% \makeatother -\endinput
\ No newline at end of file +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-angles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-angles.tex new file mode 100644 index 0000000000..31e77f3f97 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-angles.tex @@ -0,0 +1,554 @@ +% tkz-tool-eu-angles.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tool-eu-angles.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% tkzSetUpArc +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzsetuparc/.cd, + color/.store in = \tkz@arc@color, + line width/.store in = \tkz@arc@lw, + style/.store in = \tkz@arc@style, + line width = \tkz@euc@linewidth, + color = \tkz@euc@linecolor, + style = \tkz@euc@linestyle, + /tkzsetuparc/.search also = {/tikz,/tkzcompass}, + } +\def\tkzSetUpArc{\pgfutil@ifnextchar[{\tkz@SetUpArc}{\tkz@SetUpArc[]}} +\def\tkz@SetUpArc[#1]{% +\pgfqkeys{/tkzsetuparc}{#1} +\tikzset{arc style/.style={color = \tkz@arc@color, + line width = \tkz@arc@lw, + style = \tkz@arc@style + }} +}% end setup +%<---------------------------------------------------------------------------> +\newdimen\tkz@arcsize% from julian julian@d-and-j.net +\newdimen\tkz@fillsize +%<--------------------------------------------------------------------------> + +%<------------------------------ Arcs -------------------------------------– +% options : delta +% \def\tkz@delta{0} +% \tikzset{arc style/.style={#1}} +% \pgfkeys{/tikz/.cd,delta/.code={\def\tkz@delta{#1}}} +\gdef\tkz@numa{0} +\pgfkeys{/tkzdrawarc/.cd, + type/.is choice, + type/towards/.code = \def\tkz@numa{0}, + type/rotate/.code = \def\tkz@numa{1}, + type/angles/.code = \def\tkz@numa{2}, + type/R/.code = \def\tkz@numa{3}, + type/R with nodes/.code = \def\tkz@numa{4}, + towards/.style = {type=towards}, + rotate/.style = {type=rotate}, + R/.style = {type=R}, + angles/.style = {type=angles}, + R with nodes/.style = {type=R with nodes}, + diameter/.code = {}, + arc/.code = {}, + size/.code = {}, + mark/.code = {}, + mkpos/.code = {}, + mksize/.code = {}, + mkcolor/.code = {}, + type/.default = towards, + delta/.store in = \tkz@delta, + delta = 0, + /tkzdrawarc/.search also = {/tikz} +} +\def\tkzDrawArc{\pgfutil@ifnextchar[{\tkz@DrawArc}{\tkz@DrawArc[]}} +\def\tkz@DrawArc[#1](#2,#3)(#4){% +\begingroup +\pgfqkeys{/tkzdrawarc}{#1} +\ifcase\tkz@numa% + \tkzDrawArcTowards[#1](#2,#3)(#4) +\or% 1 + \tkzDrawArcRotate[#1](#2,#3)(#4) +\or% 2 + \tkzDrawArcAngles[#1](#2,#3)(#4) +\or% 3 + \tkzDrawArcRAngles[#1](#2,#3)(#4) + \or% 4 + \tkzDrawArcR[#1](#2,#3)(#4) +\fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% ARC nodes #2 center #3 first point last point #4 +% delta un peu plus à chaque extrémité +% example : \tkzDrawArc(A,B)(C) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcTowards{\pgfutil@ifnextchar[{\tkz@DrawArcN}{\tkz@DrawArcN[]}} +\def\tkz@DrawArcN[#1](#2,#3)(#4){% +\begingroup + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} + \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,\tkz@SecondAngle) +\endgroup +} +%<--------------------------------------------------------------------------–> +% nodes #2 center #3 first point rotate #4 with Angle +% delta un peu plus à chaque extrémité +% tkzDrawArcRotate(O,A)(60) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcRotate{\pgfutil@ifnextchar[{\tkz@DrawArcRotate}{% + \tkz@DrawArcRotate[]}} +\def\tkz@DrawArcRotate[#1](#2,#3)(#4){% +\begingroup + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3) \tkzGetAngle{tkz@FirstA} + \pgfmathadd{\tkz@FirstA}{#4} + \edef\tkz@SecondA{\pgfmathresult} + \pgfmathgreaterthan{#4}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstA,\tkz@SecondA) + \else + \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@SecondA,\tkz@FirstA) + \fi + \endgroup +} +%<--------------------------------------------------------------------------–> +% deux angles +% \tkzDrawArcAngles(O,A)(0,60) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcAngles{\pgfutil@ifnextchar[{\tkz@DrawArcAngles}{% + \tkz@DrawArcAngles[]}} +\def\tkz@DrawArcAngles[#1](#2,#3)(#4,#5){% +\begingroup + \tkz@@CalcLength(#2,#3){tkzLengthResult} + \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult pt)(#4,#5) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Degree #2 center #4 - #3 radius from #5 (degree) to #6(degree) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcRwithNodes{\pgfutil@ifnextchar[{\tkz@DrawArcRwithNodes}{% + \tkz@DrawArcRwithNodes[]}} +\def\tkz@DrawArcRwithNodes[#1](#2,#3,#4)(#5,#6){% +\begingroup + \tkz@@CalcLength(#3,#4){tkzLengthResult} + \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#6)\tkzGetAngle{tkz@SecondAngle} + \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult)(\tkz@FirstAngle,\tkz@SecondAngle) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Nodes R #2 center #3 radius en cm from #4(node) to #5(node) +% \tkzDrawArcR(O,2)(A,B) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcR{\pgfutil@ifnextchar[{\tkz@DrawArcR}{\tkz@DrawArcR[]}} +\def\tkz@DrawArcR[#1](#2,#3)(#4,#5){% +\begingroup + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@SecondAngle} + \tkz@DrawArcRAngles[#1](#2,#3)(\tkz@FirstAngle,\tkz@SecondAngle) +\endgroup +} +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +% #1 center #2 radius #4 first angle (degree) #5 second angle (degree) +% angles 0 .. 180 or -180 .. 0 +%<--------------------------------------------------------------------------–> +% example : \tkzDrawArc(A,2)(30,90) +\def\tkzDrawArcRAngles{\pgfutil@ifnextchar[{\tkz@DrawArcRAngles}{% + \tkz@DrawArcRAngles[]}} +\def\tkz@DrawArcRAngles[#1](#2,#3)(#4,#5){% + \begingroup + \pgfmathparse{#4}\edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{#5}\edef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \edef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \edef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \edef\tkz@SecondAngle{\pgfmathresult} + \draw[shift = {(#2)},arc style,/tkzdrawarc/.cd,#1]% + (\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3); +\endgroup +} +%<--------------------------------------------------------------------------–> +\pgfkeys{ + /@tkzmarkarc/.cd, + pos/.store in = \tkz@mkarcpos, + color/.store in = \tkz@mkcolor, + mark/.store in = \tkz@markarcseg, + size/.store in = \tkz@mkarcsize, + color = teal!20, + size = 4pt, + pos = .5, + mark = |, + /@tkzmarkarc/.search also={/tikz}, +} +\def\tkzMarkArc{\pgfutil@ifnextchar[{\tkz@MarkArc}{\tkz@MarkArc[]}} +\def\tkz@MarkArc[#1](#2,#3,#4){% +\begingroup + \pgfqkeys{/@tkzmarkarc}{#1} \def\tkz@mymarkarc{\pgfsetplotmarksize{\tkz@mkarcsize}\pgfuseplotmark{\tkz@markarcseg}} + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} + \pgfmathparse{\tkz@FirstAngle}\edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{\tkz@SecondAngle}\edef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \edef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \edef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \edef\tkz@SecondAngle{\pgfmathresult} + \begin{scope}[decoration={markings, + mark=at position \tkz@mkarcpos with {\tkz@mymarkarc}}] + \path[shift = {(#2)},\tkz@mkcolor,/@tkzmarkarc/.cd,#1,postaction={decorate}]% + (\tkz@FirstAngle:\tkz@radius pt) arc (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@radius pt); + \end{scope} +\endgroup +} + +\def\tkzLabelArc{\pgfutil@ifnextchar[{\tkz@LabelArc}{\tkz@LabelArc[]}} +\def\tkz@LabelArc[#1](#2,#3,#4)#5{% +\begingroup + \pgfqkeys{/@tkzmarkarc}{#1} + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} + \pgfmathparse{\tkz@FirstAngle}\edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{\tkz@SecondAngle}\edef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \edef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \edef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \edef\tkz@SecondAngle{\pgfmathresult} + \begin{scope}[decoration={markings, + mark=at position \tkz@mkarcpos with \node{#5};}] + \path[shift = {(#2)},/@tkzmarkarc/.cd,#1,postaction={decorate}]% + (\tkz@FirstAngle:\tkz@radius pt) arc (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@radius pt); + \end{scope} +\endgroup +} +%<---------------------------------------------------------------------------> +% tkzDrawArcRAN > +%<---------------------------------------------------------------------------> +\def\tkzDrawArcRAN[#1](#2,#3)(#4,#5){% +\begingroup + \draw[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); +\endgroup +} +%<--------------- tkzPathArcRAN ---------------------------------- +\def\tkzPathArcRAN[#1](#2,#3)(#4,#5){% +\begingroup + \path[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); +\endgroup +} +%<---------------------------------------------------------------------------> +% Mark an angle modi 3.03 suppression de \tkz@mksize, +%<---------------------------------------------------------------------------> +% \tkzMarkAngle(B, A, C) +% +% Marque d'angle +% arc de cercle (simple/double/triple) et marque d'églité. +% +% Par défaut: +% arc = simple +% size = 1cm (rayon de l'arc) +% style traits pleins +% mkpos ? position: 0.5 (position de la marque) +% mark rien du tout (ignoré si type est utilisé) +% +% Paramètres (optionnels) +% arc : l, ll, lll +% mksize : 1cm +% gap : 3pt +% dist ? +% style : type de traits +% position: 0.5 +% mark : none , |, ||,|||, z, s, x, o, oo mais tous les +% % symboles de tikz sont permis +%<------------------------- Label on angle --------------------------------> +\def\tkz@arcsimple{l} +\def\tkz@arcdouble{ll} +\def\tkz@arctriple{lll} + +%\tikzset{lbstyle/.style = {color=\tkz@mainlinecolor}} + +\pgfkeys{/tkzmkangle/.cd, + arc/.estore in = \tkz@arc, + size/.store in = \tkz@size, + mark/.store in = \tkz@markang, + mkpos/.estore in = \tkz@mkpos, + mksize/.store in = \tkz@mksize, + mkcolor/.store in = \tkz@mkcolor, + arc = l, + size = 1, + mark = none, + mksize = 4pt, + mkcolor = black, + mkpos = 0.5, + /tkzmkangle/.search also={/tikz} +} +\def\tkzMarkAngle{\pgfutil@ifnextchar[{\tkz@MarkAngle}{\tkz@MarkAngle[]}} +\def\tkz@MarkAngle[#1](#2,#3,#4){% +\begingroup +\pgfqkeys{/tkzmkangle}{#1} +\tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} +\tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} +\tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + +% les marques, aucune si mktype = none +% add cm after tkz@size !! 01/2022 +\def\tkz@mymark{\pgfsetplotmarksize{\tkz@mksize}\pgfuseplotmark{\tkz@markang}} +% draw the arcs +\begin{scope}[decoration= {markings, + mark=at position \tkz@mkpos with {\tkz@mymark}}] + \ifx\tkz@arc\tkz@arcsimple + \tkzDrawArcRAN[#1,fill=none]% + (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzPathArcRAN[\tkz@mkcolor,postaction={decorate}]% + (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle) + \else + \ifx\tkz@arc\tkz@arcdouble + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm-2.5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle) + \tkzPathArcRAN[\tkz@mkcolor,postaction={decorate}]% + (#3,\tkz@size cm)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm+2.5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle)% + \else + \ifx\tkz@arc\tkz@arctriple + \tkzDrawArcRAN[#1,fill=none]% + (#3,\tkz@size cm)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzPathArcRAN[\tkz@mkcolor,postaction={decorate}]% + (#3,\tkz@size cm)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm-5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm+5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle)% + \fi + \fi + \fi +\end{scope} +\endgroup +} +%<---------------------------------------------------------------------------> +% multiple +\def\tkz@multiMA#1 #2\@nil{% + \protected@edef\tkz@temp{ + \noexpand \tkzMarkAngle[\tkz@optma](#1)}\tkz@temp% + \def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi + \next#2\@nil +} +%<---------------------------------------------------------------------------> +\def\tkzMarkAngles{\pgfutil@ifnextchar[{\tkz@MarkAngles}{\tkz@MarkAngles[]}} +\def\tkz@MarkAngles[#1](#2){% +\xdef\tkz@optma{#1} + \begingroup + \let\next\tkz@multiMA + \next#2 \@nil % +\endgroup +} +% fin de \tkzMarkAngle + +%<---------------------------------------------------------------------------> +% FillAngle +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzFill/.cd, + size/.store in = \tkz@size, + size = 1 cm, + /tkzFill/.search also = {/tikz} + } + +\def\tkzFillAngle{\pgfutil@ifnextchar[{\tkz@FillAngle}{\tkz@FillAngle[]}} +\def\tkz@FillAngle[#1](#2,#3,#4){% +\begingroup +\pgfqkeys{/tkzFill}{#1} + \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} + \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} + \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + \path[shift = {(#3)},fill=\tkz@euc@linecolor!10,/tkzFill/.cd,#1]% + (#3) -- (\tkz@FirstAngle:\tkz@size) arc% + (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@size)--cycle; +\endgroup +} +%<---------------------------------------------------------------------------> +% multiple +\def\tkz@multiFA#1 #2\@nil{\protected@edef\tkz@temp{% + \noexpand \tkzFillAngle[\tkz@optfa](#1)}% + \tkz@temp% + \def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi + \next#2\@nil +} +%<---------------------------------------------------------------------------> +\def\tkzFillAngles{\pgfutil@ifnextchar[{\tkz@MFillAngles}{\tkz@MFillAngles[]}} +\def\tkz@MFillAngles[#1](#2){% +\xdef\tkz@optfa{#1} +\begingroup + \let\next\tkz@multiFA + \next#2 \@nil % +\endgroup +} +%<------------------------- Label on angle --------------------------------> +\pgfkeys{/tkzlabelangle/.cd, + dist/.store in = \tkzlabeldist, + angle/.store in = \tkzlabelangle, + dist = 1, + angle = {}, + /tkzlabelangle/.search also={/tikz} +} +\def\tkzLabelAngle{\pgfutil@ifnextchar[{\tkz@LabelAngle}{\tkz@LabelAngle[]}} +\def\tkz@LabelAngle[#1](#2,#3,#4)#5{%2016 added normalize from karu's code +\begingroup + \pgfqkeys{/tkzlabelangle}{#1} + \ifx\tkzutil@empty\tkzlabelangle% no value so calc angle of bisector + \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} + \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} + \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + \edef\tkzlabelAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} + \fi + \path (#3) --+(\tkzlabelAngle:\tkzlabeldist) node[label angle style,/tkzlabelangle/.cd,#1] {#5}; +\endgroup +} +%<---------------------------------------------------------------------------> +%<---------------------------------------------------------------------------> +% multiple labels +\def\tkz@multiLBA#1 #2\@nil{% + \protected@edef\tkz@temp{ + \noexpand \tkzLabelAngle[\tkz@optlba](#1){\tkz@labelangle}}\tkz@temp% + \def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi + \next#2\@nil +} +% %<--------------------------------------------------------------------- +\def\tkzLabelAngles{\pgfutil@ifnextchar[{\tkz@LabelAngles}{% + \tkz@LabelAngles[]}} +\def\tkz@LabelAngles[#1](#2)#3{% + \def\tkz@optlba{#1} + \def\tkz@labelangle{#3} + \begingroup + \let\next\tkz@multiLBA + \next#2 \@nil % + \endgroup +} +%<----------------------------------------------------------------------- +% Symbole droites perpendiculaires +%<---------------------------------------------------------------------- +\pgfkeys{/tkzrightangle/.cd, + norm tkz code/.is if = normtkzcode@execute, + german/.code = \normtkzcode@executefalse, + size/.store in = \tkz@ra@size, + dotsize/.store in = \tkz@dotsize, + size = .25, + dotsize = 3 pt, + /tkzrightangle/.search also={/tikz}, +} +\newcommand*{\tkzMarkRightAngle}[1][]{\tkz@RightAngle[#1]} +\def\tkz@RightAngle[#1](#2,#3,#4){% +\begingroup +\normtkzcode@executetrue +\pgfqkeys{/tkzrightangle}{#1} + \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% + \pgfpointanchor{#2}{center}}} + \tkz@ax=\pgf@x\relax% + \tkz@ay=\pgf@y\relax% + \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% + \pgfpointanchor{#4}{center}}} + \tkz@bx=\pgf@x\relax% + \tkz@by=\pgf@y\relax% + \ifnormtkzcode@execute% + \draw[/tkzrightangle/.cd,#1] + (#3) --++( 28.45274*\tkz@ra@size\tkz@ax , 28.45274*\tkz@ra@size\tkz@ay) + --++( 28.45274*\tkz@ra@size\tkz@bx , 28.45274*\tkz@ra@size\tkz@by) + --++(-28.45274*\tkz@ra@size\tkz@ax ,-28.45274*\tkz@ra@size\tkz@ay) + -- (#3); + \else% + % find angles + \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} + \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} + \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + \edef\tkzCircleAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} + \tkzDrawArcRAN[/tkzrightangle/.cd,#1](#3,\tkz@ra@size)% + (\tkz@FirstAngle,\tkz@SecondAngle) + \path (#3) --+ (\tkzCircleAngle:\tkz@ra@size/2) + node[fill,circle,minimum size=\tkz@dotsize, + inner sep=0 pt,/tkzrightangle/.cd,#1] {}; +\fi% +\endgroup +} +%<---------------------------------------------------------------------------> +\def\tkz@multiRA#1 #2\@nil{% +\protected@edef\tkz@temp{ + \noexpand \tkzMarkRightAngle[\tkz@optRA](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi +\next#2\@nil +} +%<---------------------------------------------------------------------------> +\def\tkzMarkRightAngles{\pgfutil@ifnextchar[{\tkz@RightAngles}{% + \tkz@RightAngles[]}} +\def\tkz@RightAngles[#1](#2){% +\xdef\tkz@optRA{#1} +\begingroup + \let\next\tkz@multiRA + \next#2 \@nil % +\endgroup +} + +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-circles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-circles.tex index 8d340ba99d..99d3531067 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-circles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-circles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-draw-circles.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,43 +7,14 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-draw-circles.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-draw-circles.tex} \makeatletter -%for compatibility -%<--------------------------------------------------------------------------–> -\def\tkzDefCircleR(#1,#2){% -\begingroup - \edef\tkzLengthResult{\fpeval{round(#2,5)}} - \global\let\tkzLengthResult\tkzLengthResult - \tkzRenamePoint(#1){tkzPointResult} -\endgroup -} -%<--------------------------------------------------------------------------–> -% Through Circle center and point -%<--------------------------------------------------------------------------–> -\def\tkzDefCircleThrough(#1,#2){% -\begingroup - \tkzCalcLength(#1,#2) - \tkzRenamePoint(#1){tkzPointResult} -\endgroup -} -%<--------------------------------------------------------------------------–> -% Diameter Circle -%<--------------------------------------------------------------------------–> -\def\tkzDefCircleD(#1,#2){% -\begingroup - \tkzDefMidPoint(#1,#2) - \tkzCalcLength(#1,tkzPointResult) -\endgroup -} + \def\tkz@numdc{0} \pgfkeys{/tkzdrawc/.cd, @@ -75,13 +46,13 @@ \begingroup \pgfqkeys{/tkzdrawc}{#1} \ifcase\tkz@numdc% - \tkzDefCircleThrough(#2) + \tkzDefCircleThrough(#2) \or% 1 - \tkzDefCircleR(#2) + \tkzDefCircleR(#2) \or% 2 - \tkzDefCircleD(#2) + \tkzDefCircleD(#2) \or% 3 - \tkzDefCircumCircle(#2) + \tkzDefCircumCircle(#2) \or% 4 \tkzDefInCircle(#2) \or% 4 @@ -95,8 +66,7 @@ \or% 8 \tkzDefOrthoThroughCircle(#2,\tkz@ptone,\tkz@pttwo) \fi - \draw[line style,/tkzdrawc/.cd,#1] - (tkzPointResult) circle (\tkzLengthResult pt); + \draw[line style,/tkzdrawc/.cd,#1] (tkzPointResult) circle (\tkzLengthResult); \endgroup } @@ -126,11 +96,11 @@ \pgfkeys{/tkzdrawsc/.cd, through/.code = \def\tkz@numdsc{0}, diameter/.code = \def\tkz@numdsc{1}, - swap/.is if = tkz@sawp@sc, + swap/.is if = tkz@swap@sc, swap/.default = true, swap = false, through, - /tkzdrawsc/.search also={/tikz} + /tkzdrawsc/.search also={/tikz} } \def\tkzDrawSemiCircle{\pgfutil@ifnextchar[{\tkz@DrawSemiCircle}{% \tkz@DrawSemiCircle[]}} @@ -142,19 +112,19 @@ \or% \tkzDrawSemiCircleDiameter(#2) \fi - \tkzDrawArc[#1](\tkz@Center,\tkz@FirstPoint)(\tkz@SecondPoint) + \tkzDrawArc[#1,delta=0](\tkz@Center,\tkz@FirstPoint)(\tkz@SecondPoint) \endgroup } %<--------------------------------------------------------------------------–> \def\tkzDrawSemiCircleThrough(#1,#2){% \tkzDefPointBy[symmetry=center #1](#2) - \pgfnodealias{tkz@pt}{tkzPointResult} + \pgfnodealias{tkz@pt}{tkzPointResult} \def\tkz@Center{#1} - \iftkz@sawp@sc - \gdef\tkz@FirstPoint{tkz@pt} + \iftkz@swap@sc + \gdef\tkz@FirstPoint{tkz@pt} \gdef\tkz@SecondPoint{#2} \else - \gdef\tkz@FirstPoint{#2} + \gdef\tkz@FirstPoint{#2} \gdef\tkz@SecondPoint{tkz@pt} \fi } @@ -163,7 +133,7 @@ \tkzDefMidPoint(#1,#2) \pgfnodealias{tkz@Center}{tkzPointResult} \def\tkz@Center{tkz@Center} - \iftkz@sawp@sc + \iftkz@swap@sc \def\tkz@FirstPoint{#1} \def\tkz@SecondPoint{#2} \else @@ -171,11 +141,33 @@ \def\tkz@SecondPoint{#1} \fi } - +%<--------------------------------------------------------------------------–> +\def\tkz@multisemicircles#1 #2\@nil{% +\protected@edef\tkz@temp{ +\noexpand \tkzDrawSemiCircle[\tkz@optsemicircle](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% +\ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble +\fi +\next#2\@nil +} +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +\def\tkzDrawSemiCircles{\pgfutil@ifnextchar[{\tkz@DrawSemiCircles}{% + \tkz@DrawSemiCircles[]}} +\def\tkz@DrawSemiCircles[#1](#2){% +\xdef\tkz@optsemicircle{#1} +\begingroup + \let\next\tkz@multisemicircles + \next#2 \@nil % +\endgroup +}% +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> %<---------------------------- Fill Circle --------------------------------–> \def\tkz@numfc{0} \pgfkeys{/fillcircle/.cd, radius/.code = \def\tkz@numfc{0}, - R/.code = \def\tkz@numfc{1}, + R/.code = \def\tkz@numfc{1}, radius, /fillcircle/.search also={/tikz} } @@ -185,46 +177,42 @@ \pgfqkeys{/fillcircle}{#1} \ifcase\tkz@numfc% % first case 0 - \tkzCalcLength(#2,#3) + \tkz@@CalcLength(#2,#3){tkzLengthResult} \fill[/fillcircle/.cd,#1] (#2) circle (\tkzLengthResult pt);% \or% 1 \fill[/fillcircle/.cd,#1] (#2) circle (#3);% \fi \endgroup } -%<----------------------- Out Clip Circle ---------------------------------–> -\def\tkz@numocc{0} -\pgfkeys{/clipoutcircle/.cd, radius/.code = \def\tkz@numocc{0}, - R/.code = \def\tkz@numocc{1}, - radius} -%<--------------------------------------------------------------------------–> -\def\tkzClipOutCircle{\pgfutil@ifnextchar[{\tkz@ClipOutCircle}{% - \tkz@ClipOutCircle[]}} -\def\tkz@ClipOutCircle[#1](#2,#3){% -\pgfqkeys{/clipoutcircle}{#1} -\ifcase\tkz@numocc - \tkzCalcLength(#2,#3) - \clip[tkzreverseclip] (#2) circle (\tkzLengthResult pt); - \or% 1 - \clip[tkzreverseclip] (#2) circle (#3); - \fi -} + %<--------------------------- Clip Circle ---------------------------------–> +\newif\iftkzClipOutCircle \def\tkz@numcc{0} \pgfkeys{/tkzclipc/.cd, - through/.code = \def\tkz@numcc{0}, - R/.code = \def\tkz@numcc{1}, + through/.code = \def\tkz@numcoc{0}, + R/.code = \def\tkz@numcoc{1}, + out code/.is if = tkzClipOutCircle, + out/.code = \tkzClipOutCirclefalse, through} %<--------------------------------------------------------------------------–> \def\tkzClipCircle{\pgfutil@ifnextchar[{\tkz@ClipCircle}{\tkz@ClipCircle[]}} \def\tkz@ClipCircle[#1](#2,#3){% +\tkzClipOutCircletrue \pgfqkeys{/tkzclipc}{#1} -\ifcase\tkz@numcc - \tkzCalcLength(#2,#3) +\ifcase\tkz@numcoc + \tkz@@CalcLength(#2,#3){tkzLengthResult} + \iftkzClipOutCircle \clip (#2) circle (\tkzLengthResult pt); + \else + \clip (#2) circle (\tkzLengthResult pt) [tkzreverseclip] ; + \fi \or% 1 + \iftkzClipOutCircle \clip (#2) circle (#3); + \else + \clip (#2) circle (#3) [tkzreverseclip] ; + \fi \fi } %<--------------------------- Label Circle --------------------------------–> @@ -255,6 +243,5 @@ \fi \endgroup } -%<--------------------------------------------------------------------------–> - \makeatother +\makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-lines.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-lines.tex index 9804439ee3..0e3e9f6096 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-lines.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-lines.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-draw-lines.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,195 +7,26 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-draw-lines.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-draw-lines.tex} \makeatletter + \def\tkz@numdl{0} \pgfkeys{/tkzdrawl/.cd, - median/.code = \def\tkz@numdl{0}, - altitude/.code = \def\tkz@numdl{1}, - bisector/.code = \def\tkz@numdl{2}, - none/.code = \def\tkz@numdl{3}, - none, /tkzdrawl/.search also={/tikz} } %<--------------------------------------------------------------------------–> % Drawing a line > %<--------------------------------------------------------------------------–> \def\tkzDrawLine{\pgfutil@ifnextchar[{\tkz@DrawLine}{\tkz@DrawLine[]}} -\def\tkz@DrawLine[#1](#2){% +\def\tkz@DrawLine[#1](#2,#3){% \begingroup \pgfqkeys{/tkzdrawl}{#1} -\ifcase\tkz@numdl% - \tkzDrawMedian[#1](#2) - \or% 1 - \tkzDrawAltitude[#1](#2) - \or% 2 - \tkzDrawBisector[#1](#2) - \or% 3 - \tkzDrawSLine[#1](#2) - \fi -\endgroup -} -%<--------------------------------------------------------------------------–> -% Droites particulières d'un triangle -%<--------------------------------------------------------------------------–> -% -%<--------------------------------------------------------------------------–> -\def\tkzDrawSLine{\pgfutil@ifnextchar[{\tkz@DrawSLine}{\tkz@DrawSLine[]}} -\def\tkz@DrawSLine[#1](#2,#3){% -\begingroup -\draw[line style,#1] (#2) to (#3); -\endgroup -}% -%<--------------------------------------------------------------------------–> -% median -%<--------------------------------------------------------------------------–> -\def\tkzDrawMedian{\pgfutil@ifnextchar[{\tkz@Median}{\tkz@Median[]}} -\def\tkz@Median[#1](#2,#3,#4){% -\begingroup - \tkzDefMidPoint(#2,#4) - \tkzDrawSLine[add= 0 and 0,/tkzdrawl/.cd,#1](#3,tkzPointResult) -\endgroup -} -%<--------------------------------------------------------------------------–> -% altitude -%<--------------------------------------------------------------------------–> -\def\tkzDrawAltitude{\pgfutil@ifnextchar[{\tkz@Altitude}{\tkz@Altitude[]}} -\def\tkz@Altitude[#1](#2,#3,#4){% -\begingroup - \tkzUProjection(#2,#4)(#3) - \tkzDrawSLine[add= 0 and 0,/tkzdrawl/.cd,#1](#3,tkzPointResult) -\endgroup -} -%<--------------------------------------------------------------------------–> -% bisector -%<--------------------------------------------------------------------------–> -\def\tkzDrawBisector{\pgfutil@ifnextchar[{\tkz@Bisector}{\tkz@Bisector[]}} -\def\tkz@Bisector[#1](#2,#3,#4){% -\begingroup - \tkzDefBisectorLine(#2,#3,#4) - \tkzInterLL(#2,#4)(#3,tkzPointResult) - \tkzDrawSLine[add= 0 and 0,/tkzdrawl/.cd,#1](#3,tkzPointResult) -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% \def\tkz@recuplast(#1,#2){\def\tkz@last{#1}} -% \def\tkz@stop{\tkz@stop} -%<--------------------------------------------------------------------------–> -% medians -%<--------------------------------------------------------------------------–> -\def\tkz@@Medians(#1,#2,#3)(#4,#5){% - \def\tkz@tmp{#5}% - \ifx\tkz@tmp\tkz@stop\else\tkz@@Medians(#2,#3)(#5)\fi - \tkz@recuplast(#3) - - \pgfcoordinate{#4}{\pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}{% - \pgfpointanchor{\tkz@last}{center}}% - }}% - \protected@edef\tkz@temp{\noexpand - \tkzDrawLine[add= 0 and 0,/DrawTLines/.cd,\tkz@opttline](#4,#1)}\tkz@temp% - \ifx\tkzutil@empty\tkz@newpoint@name - \else - \coordinate (\tkz@newpoint@name#4) at (#4); - \fi -} -\def\tkzDrawMedians{\pgfutil@ifnextchar[{\tkz@Medians}{\tkz@Medians[]}} -\def\tkz@Medians[#1](#2)#3{% -\begingroup - \xdef\tkz@opttline{#1} - \tkz@@Medians(#2,#2)(#3,\tkz@stop) - \endgroup -} - -%<--------------------------------------------------------------------------–> -% Altitudes -%<--------------------------------------------------------------------------–> -\def\tkz@@Altitudes(#1,#2,#3)(#4,#5){% - \def\tkz@tmp{#5}% - \ifx\tkz@tmp\tkz@stop\else\tkz@@Altitudes(#2,#3)(#5)\fi - \tkz@recuplast(#3) - \tkzUProjection(#2,\tkz@last)(#1) - \pgfnodealias{tkz@tmp@pt}{tkzPointResult} - \protected@edef\tkz@temp{% - \noexpand - \tkzDrawLine[add= 0 and 0,/DrawTLines/.cd,\tkz@opttline](#1,tkz@tmp@pt)}\tkz@temp% - \ifx\tkzutil@empty\tkz@newpoint@name - \else - \coordinate (\tkz@newpoint@name#4) at (tkz@tmp@pt); - \fi -} -\def\tkzDrawAltitudes{\pgfutil@ifnextchar[{\tkz@DrawAltitudes}{\tkz@DrawAltitudes[]}} -\def\tkz@DrawAltitudes[#1](#2)#3{% -\begingroup - \xdef\tkz@opttline{#1} - \tkz@@Altitudes(#2,#2)(#3,\tkz@stop) - \endgroup - } -%<--------------------------------------------------------------------------–> -% bisectors -%<--------------------------------------------------------------------------–> -\def\tkz@@Bisectors(#1,#2,#3)(#4,#5){% -\def\tkz@tmp{#5}% -\ifx\tkz@tmp\tkz@stop\else\tkz@@Bisectors(#2,#3)(#5)\fi - \tkz@recuplast(#3) - \tkzDefBisectorLine(\tkz@last,#1,#2) - \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) - \pgfnodealias{tkz@tmp@pt}{tkzPointResult} - \protected@edef\tkz@temp{ - \noexpand \tkzDrawLine[add= 0 and 0, - /DrawTLines/.cd, - \tkz@opttline](#1,tkz@tmp@pt)}\tkz@temp - \ifx\tkzutil@empty\tkz@newpoint@name - \else - \coordinate (\tkz@newpoint@name#4) at (tkz@tmp@pt); - \fi -} -\def\tkzDrawBisectors{\pgfutil@ifnextchar[{\tkz@DrawBisectors}{\tkz@DrawBisectors[]}} - -\def\tkz@DrawBisectors[#1](#2)#3{% -\begingroup - \xdef\tkz@opttline{#1} - \tkz@@Bisectors(#2,#2)(#3,\tkz@stop) -\endgroup -} -%<-------------------------------------------------------------------------– -%<-------------------------------------------------------------------------– -%<-------------------------------------------------------------------------– -\def\tkz@numdtls{0} -\pgfkeys{/DrawTLines/.cd, - median/.code = \def\tkz@numdtls{0}, - altitude/.code = \def\tkz@numdtls{1}, - bisector/.code = \def\tkz@numdtls{2}, - median, - name/.store in = \tkz@newpoint@name, - name/.initial = {}, - name = {}, - /DrawTLines/.search also={/tikz} -} -%<--------------------------------------------------------------------------–> -% Drawing tr lines > -%<--------------------------------------------------------------------------–> -\def\tkzDrawTLines{\pgfutil@ifnextchar[{\tkz@DrawTLines}{\tkz@DrawTLines[]}} -\def\tkz@DrawTLines[#1](#2)#3{% -\begingroup -\pgfqkeys{/DrawTLines}{#1} -\ifcase\tkz@numdtls% - \tkzDrawMedians[#1](#2){#3} - \or% 1 - \tkzDrawAltitudes[#1](#2){#3} - \or% 2 - \tkzDrawBisectors[#1](#2){#3} - \fi + \draw[line style,#1] (#2) to (#3); \endgroup } %<-------------------------------------------------------------------------– @@ -231,11 +62,11 @@ %<--------------------------------------------------------------------------–> \pgfkeys{% tkzsuline/.cd, - line width/.code = {\xdef\tkz@line@lw{#1}}, - color/.code = {\xdef\tkz@line@color{#1}}, - style/.code = {\xdef\tkz@line@style{#1}}, - add/.code args = {#1 and #2} {\xdef\tkz@line@left{#1}% - \xdef\tkz@line@right{#2}}, + line width/.code = \def\tkz@line@lw{#1}, + color/.code = \def\tkz@line@color{#1}, + style/.code = \def\tkz@line@style{#1}, + add/.code args = {#1 and #2} {\def\tkz@line@left{#1} + \def\tkz@line@right{#2}}, /tkzsuline/.search also={/tikz}% } %<--------------------------------------------------------------------------–> @@ -268,10 +99,10 @@ \def\tkzDrawSegment{\pgfutil@ifnextchar[{\tkz@DrawSegment}{% \tkz@DrawSegment[]}} \def\tkz@DrawSegment[#1](#2,#3){% -\begingroup +\scope \pgfqkeys{/tkzdraws}{#1} \draw[line style,add=0 and 0,#1] (#2) to (#3); -\endgroup +\endscope }% \def\tkz@multiDrawSeg#1 #2\@nil{% @@ -387,17 +218,24 @@ % \draw[dim={7cm,10pt,transform shape}] (B) -- (C); % \draw[dim={X,,}] (A) -- (C); %<--------------------------------------------------------------------------–> +% code from muzimuzhi Z + \pgfkeys{/pgf/decoration/.cd, distance/.initial = 10pt} \pgfdeclaredecoration{add dim}{final}{ \state{final}{% \pgfmathsetmacro{\dist}{\pgfkeysvalueof{/pgf/decoration/distance}} - \pgfpathmoveto{\pgfpoint{0pt}{0pt}} + \pgfpathmoveto{\pgfpoint{0pt}{0pt}} \pgfpathlineto{\pgfpoint{0pt}{1.2*\dist}} \pgfpathmoveto{\pgfpoint{\pgfdecoratedpathlength}{0pt}} - \pgfpathlineto{\pgfpoint{(\pgfdecoratedpathlength}{1.2*\dist}} + \pgfpathlineto{\pgfpoint{(\pgfdecoratedpathlength}{1.2*\dist}} + % start of patch + \pgfusepath{stroke} \pgfsetarrowsstart{latex} \pgfsetarrowsend{latex} + \expandafter\pgfsetdash\tkz@dim@dashpattern + \pgfsetstrokecolor{\tkz@dim@color} + % end of patch \pgfpathmoveto{\pgfpoint{0pt}{\dist}} \pgfpathlineto{\pgfpoint{\pgfdecoratedpathlength}{\dist}} \pgfusepath{stroke} @@ -424,12 +262,26 @@ }, dim/.default={,0pt,} } - +\tikzset{ + dim color/.store in=\tkz@dim@color, + dim color=black, + % similar to code for \tikzoption{dash pattern}{...} + dim dash pattern/.code={% + \def\tikz@temp{#1}% + \ifx\tikz@temp\pgfutil@empty% + \def\tkz@dim@dashpattern{{}{0pt}}% + \else% + \def\tikz@dashpattern{}% + \expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil% + \edef\tkz@dim@dashpattern{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}% + \fi + }, + dim dash pattern=, +} %<--------------------------- style line ---------------------------------> \tikzset{add/.style args={#1 and #2}{to path={% ($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)% \tikztonodes}} } -%<--------------------------------------------------------------------------–> \makeatother -\endinput +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-polygons.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-polygons.tex index 9388916c42..0bad413a37 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-polygons.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-polygons.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-polygons.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-polygons.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-polygons.tex} \makeatletter %<--------------------------------------------------------------------------–> % Polygon @@ -31,6 +28,27 @@ \foreach \pt in {#2,#3}{--(\pt)}--cycle;% \endgroup } +%<--------------------------------------------------------------------------–> +\def\tkz@multipolygons#1 #2\@nil{% +\protected@edef\tkz@temp{ +\noexpand \tkzDrawPolygon[\tkz@optpolygon](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% +\ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble +\fi +\next#2\@nil +} +%<--------------------------------------------------------------------------–> +\def\tkzDrawPolygons{\pgfutil@ifnextchar[{\tkz@DrawPolygons}{\tkz@DrawPolygons[]}} +\def\tkz@DrawPolygons[#1](#2){% +\xdef\tkz@optpolygon{#1} +\begingroup + \let\next\tkz@multipolygons + \next#2 \@nil % +\endgroup +}% +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> %<---------------------------- FILL --------------------------------–> % %<--------------------------------------------------------------------------–> @@ -39,7 +57,7 @@ \def\tkz@FillPolygon[#1](#2,#3){% \begingroup \fill[#1] (#2) - \foreach \pt in {#2,#3}{--(\pt)}--cycle;% + \foreach \pt in {#2,#3}{--(\pt)}--cycle;% \endgroup } %<--------------------------------------------------------------------------–> @@ -52,7 +70,7 @@ } %<--------------------------------------------------------------------------–> \def\tkzDrawRectangle{\pgfutil@ifnextchar[{\tkz@DrawRectangle}% - {\tkz@DrawRectangle[]}} + {\tkz@DrawRectangle[]}} \def\tkz@DrawRectangle[#1](#2,#3){% \begingroup \draw[#1](#2) -| (#3) -| (#2); @@ -61,20 +79,23 @@ %<-------------------------- gold rectangle -------------------------------–> % %<--------------------------------------------------------------------------–> +\def\tkzDrawGoldRectangle{\pgfutil@ifnextchar[{\tkz@DrawGoldRectangle}{% + \tkz@DrawGoldRectangle[]}} \def\tkz@DrawGoldRectangle[#1](#2,#3){ \begingroup - \tkzDefGoldRectangle(#2,#3) - \tkzDrawPolygon[#1](#2,#3,tkzFirstPointResult,tkzSecondPointResult) + \tkzDefGoldRectangle(#2,#3) + \tkzDrawPolygon[#1](#2,#3,tkzFirstPointResult,tkzSecondPointResult) \endgroup } +\let\tkzDrawGoldenRectangle\tkzDrawGoldRectangle %<-------------- Labels for Regular Polygon -------------------------–> % %<--------------------------------------------------------------------------–> \pgfkeys{/deflabelregpoly/.cd, - name/.store in = \tkz@regpolname, - sep/.store in = \tkz@regpolsep, - name = P, - sep = 1.1 + name/.store in = \tkz@regpolname, + sep/.store in = \tkz@regpolsep, + name = P, + sep = 1.1 } \def\tkzLabelRegPolygon{\pgfutil@ifnextchar[{\tkz@labelPolygon}{% @@ -83,11 +104,31 @@ \begingroup \pgfqkeys{/deflabelregpoly}{#1} \foreach \v [count=\vi from 1] in {#3} {% - \path (#2) to [pos=1.1] node {$\v$} (\tkz@regpolname\vi) ; - \pgfnodealias{\v}{\tkz@regpolname\vi} + \path (#2) to [pos=1.1] node {$\v$} (\tkz@regpolname\vi) ; + \pgfnodealias{\v}{\tkz@regpolname\vi} } \endgroup } +%<---------------------------- CLIP --------------------------------–> +% +%<--------------------------------------------------------------------------–> + +\newif\iftkzClipOutPoly% +\pgfkeys{tkzclippolygon/.cd, + out code/.is if = tkzClipOutPoly, + out/.code = \tkzClipOutPolyfalse} +\def\tkzClipPolygon{\pgfutil@ifnextchar[{\tkz@ClipPolygon}{\tkz@ClipPolygon[]}} +\def\tkz@ClipPolygon[#1](#2,#3){% +\tkzClipOutPolytrue +\pgfqkeys{/tkzclippolygon}{#1}% +\iftkzClipOutPoly +\clip (#2) + \foreach \pt in {#2,#3}{--(\pt)}--cycle; +\else + \clip(#2) + \foreach \pt in {#2,#3}{--(\pt)}--cycle[tkzreverseclip] ; +\fi +}% \makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-triangles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-triangles.tex index bc0d6b10f2..00c5a97e54 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-triangles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-draw-triangles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-draw-triangles.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,12 +7,13 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% -% This work has the LPPL maintenance status “maintained”. -% +% This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-draw-triangles.tex} +\makeatletter %<--------------------------------------------------------------------------–> % Draw Triangles %<--------------------------------------------------------------------------–> @@ -25,12 +26,13 @@ school/.code = {\def\tkz@numdtr{3}}, golden/.code = {\def\tkz@numdtr{4}}, sublime/.code = {\def\tkz@numdtr{4}}, - euclide/.code = {\def\tkz@numdtr{5}}, + euclid/.code = {\def\tkz@numdtr{5}}, gold/.code = {\def\tkz@numdtr{6}}, cheops/.code = {\def\tkz@numdtr{7}}, two angles/.code args = {#1 and #2}{\def\tkz@numdtr{8}% \def\tkz@alpha{#1}% \def\tkz@beta{#2}}, + isosceles right/.code = {\def\tkz@numdtr{9}}, equilateral, /drawtriangle/.search also={/tikz} } @@ -58,9 +60,32 @@ \or% 7 \tkzDefCheopsTriangle(#2,#3) \or% 8 - \tkzDefTwoAnglesTriangle(#2,#3) + \tkzDefTwoAnglesTriangle(#2,#3) + \or% 9 + \tkzDefIsoscelesRightTriangle(#2,#3) \fi \draw[/drawtriangle/.cd,line style,#1] (#2)--(#3)--(tkzPointResult)--cycle; \endgroup } +%<--------------------------------------------------------------------------–> +\def\tkz@multitriangles#1 #2\@nil{% +\protected@edef\tkz@temp{ +\noexpand \tkzDrawPolygon[\tkz@opttrianle](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% +\ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble +\fi +\next#2\@nil +} +%<--------------------------------------------------------------------------–> +\def\tkzDrawTriangles{\pgfutil@ifnextchar[{\tkz@DrawTriangles}{\tkz@DrawTriangles[]}} +\def\tkz@DrawTriangles[#1](#2){% +\xdef\tkz@opttrianle{#1} +\begingroup + \let\next\tkz@multitriangles + \next#2 \@nil % +\endgroup +}% +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-grids.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-grids.tex new file mode 100644 index 0000000000..709d78079f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-grids.tex @@ -0,0 +1,83 @@ +% tkz-obj-eu-grids.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-grids.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% Setup Grid +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzsugrid/.cd, + line width/.store in = \tkz@sug@lw, + color/.store in = \tkz@sug@color, + line width = \tkz@grid@lw, + color = \tkz@grid@color + } + +\def\tkzSetUpGrid{\pgfutil@ifnextchar[{\tkz@SetUpGrid}{\tkz@SetUpGrid[]}} +\def\tkz@SetUpGrid[#1]{% +\begingroup +\pgfqkeys{/tkzsugrid}{#1} +\global\let\tkz@grid@lw\tkz@sug@lw +\global\let\tkz@grid@color\tkz@sug@color +\endgroup +} +%<--------------------------------------------------------------------------–> +% tkzGrid +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzGrid/.cd, + color/.code = {\def\tkz@gd@color{#1}% + \edef\tkz@gd@subcolor{% + \tkz@gd@color!\tkzCoeffSubColor}}, + subxstep/.store in = {\tkz@gd@subxstep}, + subystep/.store in = {\tkz@gd@subystep}, + ratio/.store in = {\tkz@gd@ratio}, + line width/.code = {\edef\tkz@gd@lw{#1} + \edef\tkz@gd@sublw{\tkz@gd@ratio\tkz@gd@lw}}, + sub/.is if = tkz@gd@sub, + sub/.default = true , + sub = false, + color = \tkz@grid@color, + ratio = 0.75, + subxstep = \tkz@grid@xstep, + subystep = \tkz@grid@ystep, + line width = \tkz@grid@lw, + /tkzGrid/.search also= {/tikz}, +} +%<--------------------------------------------------------------------------–> +\def\tkzGrid{\pgfutil@ifnextchar[{\tkz@Grid}{\tkz@Grid[]}} +\def\tkz@Grid[#1]{\@ifnextchar({\tkz@@Grid[#1]}% + {\tkz@@Grid[#1](\tkz@tmp@xa,\tkz@tmp@ya)(\tkz@tmp@xb,\tkz@tmp@yb)}} +\def\tkz@@Grid[#1](#2,#3)(#4,#5){% + \pgfqkeys{/tkzGrid}{#1} + \begingroup + \edef\tkz@gxa{\fpeval{(#2-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkz@gxb{\fpeval{(#4-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkz@gya{\fpeval{(#3-\tkz@init@yorigine)/\tkz@init@ystep}} + \edef\tkz@gyb{\fpeval{(#5-\tkz@init@yorigine)/\tkz@init@ystep}} + \iftkz@gd@sub% + \edef\@subxstep{\fpeval{\tkz@gd@subxstep/\tkz@init@xstep}}% + \edef\@subystep{\fpeval{\tkz@gd@subystep/\tkz@init@ystep}}% + \draw [xstep = \@subxstep cm,% + ystep = \@subystep cm,% + color = \tkz@gd@subcolor,% + line width = \tkzRatioLineGrid]% + (\tkz@gxa,\tkz@gya) grid (\tkz@gxb,\tkz@gyb);% + \fi + \draw [color = \tkz@gd@color,% + line width = \tkz@gd@lw]% + (\tkz@gxa,\tkz@gya) grid (\tkz@gxb,\tkz@gyb);% + \endgroup +}% +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex index c8137bcc6e..6bdecebee9 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-lines.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-lines.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-lines.tex} \makeatletter %<--------------------------------------------------------------------------–> % les lignes @@ -32,6 +29,10 @@ bisector/.code = \def\tkz@numl{3}, bisector out/.code = \def\tkz@numl{4}, symmedian/.code = \def\tkz@numl{5}, + tangent at/.code = {#1}{\def\tkz@numl{6} \def\tkz@ptat{#1}}, + tangent from/.code = {#1}{\def\tkz@numl{7} \def\tkz@ptfrom{#1}}, + median/.code = \def\tkz@numl{8}, + altitude/.code = \def\tkz@numl{9}, K/.code = \def\tkz@koeff{#1}, K = 1, normed/.is if = tkz@line@normed, @@ -39,7 +40,6 @@ normed = false, mediator } - \def\tkzDefLine{\pgfutil@ifnextchar[{\tkz@DefLine}{\tkz@DefLine[]}} \def\tkz@DefLine[#1](#2){% \begingroup @@ -49,7 +49,7 @@ % first case 0 \tkzDefMediatorLine(#2) \or% 1 - \tkzDefOrthLine[\tkz@koeff](#2)(\tkz@through) + \tkzDefOrthLine[\tkz@koeff](#2) \or% 2 \tkzDefLineLL(#2) \or% 3 @@ -58,6 +58,10 @@ \tkzDefBisectorOutLine(#2) \or% 5 \tkzDefSymmedianLine(#2) + \or% 6 + \tkzTgtAt(#1)(#2) + \or% 7 + \tkzTgtFromP(#1)(#2) \fi \endgroup } @@ -74,7 +78,7 @@ \pgfinterruptboundingbox \path[coordinate](\tkz@through)--++(\tkz@koeff\pgf@xa,\tkz@koeff\pgf@ya)% coordinate (tkzPointResult); - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \iftkz@line@normed \tkzVecKNorm(\tkz@through,tkzPointResult) \fi @@ -90,9 +94,9 @@ \pgfnodealias{tkz@OLtmp}{tkzPointResult} \tkz@VecKCoLinear[\tkz@koeff](#2,tkz@OLtmp,\tkz@through) \iftkz@line@normed - \pgfinterruptboundingbox + \pgfinterruptboundingbox \tkzVecKNorm(\tkz@through,tkzPointResult) - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \fi \endgroup}% %<--------------------------------------------------------------------------–> @@ -105,7 +109,7 @@ \begingroup \tkzDefEquilateral(#2,#3) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzDefEquilateral(#3,#2) + \tkzDefEquilateral(#3,#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \ifx\tkz@koeff=1 % \else @@ -119,12 +123,12 @@ \iftkz@line@normed \tkzDefMidPoint(#2,#3) \pgfnodealias{tkz@mid}{tkzPointResult} - \pgfinterruptboundingbox + % \pgfinterruptboundingbox \tkzVecKNorm[\tkz@koeff](tkz@mid,tkzFirstPointResult) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} \tkzVecKNorm[\tkz@koeff](tkz@mid,tkzSecondPointResult) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \endpgfinterruptboundingbox + % \endpgfinterruptboundingbox \fi \endgroup} % autre possibilité @@ -134,10 +138,11 @@ %<--------------------------------------------------------------------------–> \def\tkzDefBisectorLine(#1,#2,#3){% \begingroup - \pgfinterruptboundingbox + \pgfinterruptboundingbox \tkzDuplicateSegment(#2,#1)(#2,#3) \pgfnodealias{bi@tmp}{tkzPointResult} - \tkzDefEquilateral(bi@tmp,#1) + \tkzDefMidPoint(bi@tmp,#1) +% \tkzDefEquilateral(bi@tmp,#1) \ifx\tkz@koeff=1 % \else \tkzVecK[\tkz@koeff](#2,tkzPointResult) @@ -145,7 +150,7 @@ \iftkz@line@normed \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) \fi - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -153,7 +158,7 @@ %<--------------------------------------------------------------------------–> \def\tkzDefBisectorOutLine(#1,#2,#3){% \begingroup - \pgfinterruptboundingbox + \pgfinterruptboundingbox \tkzDuplicateLength(#2,#1)(#2,#3) \pgfnodealias{out@tmp}{tkzPointResult} \tkzDefMidPoint(#1,out@tmp) @@ -166,7 +171,7 @@ \iftkz@line@normed \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) \fi - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -178,7 +183,7 @@ \pgfnodealias{sym@pt1}{tkzPointResult} \tkzDefMidPoint(#1,#3) \pgfnodealias{sym@pt2}{tkzPointResult} - \tkzUSymOrth(#2,sym@pt1)(sym@pt2) + \tkzUSymOrth(#2,sym@pt1)(sym@pt2) \ifx\tkz@koeff=1 % \else \tkzVecK[\tkz@koeff](#2,tkzPointResult) @@ -188,43 +193,43 @@ \fi \endgroup } -%<-------------------------------------------------------------------------–> %<--------------------------------------------------------------------------–> % tangente à cercle passant par un point donné %<--------------------------------------------------------------------------–> -\def\tkzTgtFromPR(#1,#2)(#3){% - \begingroup - \tkzDefMidPoint(#1,#3) - \tkzCalcLength(tkzPointResult,#1) - \tkzInterCCR(#1,#2)(tkzPointResult,\tkzLengthResult pt){% - tkzFirstPointResult}{% - tkzSecondPointResult}% - \endgroup + +\def\tkzTgtAt(#1)(#2){% +\begingroup + \tkz@VecKOrthNorm[-1](#2,#1) + \endgroup } - +%<-------------------------------------------------------------------------–> \def\tkzTgtFromP(#1,#2)(#3){% - \begingroup +\begingroup \tkzDefMidPoint(#1,#3) - \tkzCalcLength(#1,#2) - \tkzGetLength{tkz@radone}% - \tkzCalcLength(tkzPointResult,#1) - \tkzGetLength{tkz@radtwo}% - \tkzInterCCR(#1,\tkz@radone pt)(tkzPointResult,\tkz@radtwo pt){% + \tkz@@CalcLengthcm(#1,#2){tkz@radone} + \tkz@@CalcLengthcm(tkzPointResult,#1){tkz@radtwo} + \tkzInterCCR(#1,\tkz@radone)(tkzPointResult,\tkz@radtwo){% tkzFirstPointResult}{% tkzSecondPointResult}% - \endgroup -} -\def\tkzTgtAt(#1)(#2){% +\endgroup +} +%<-------------------------------------------------------------------------–> +\def\tkzTgtFromPR(#1,#2)(#3){% \begingroup - \tkz@VecKOrthNorm[-1](#2,#1) - \endgroup -} %<--------------------------------------------------------------------------–> %<--------------------------------------------------------------------------–> + \tkzDefMidPoint(#1,#3) + \tkz@@CalcLengthcm(tkzPointResult,#1){tkzLengthResult} + \tkzInterCCR(#1,#2)(tkzPointResult,\tkzLengthResult){% + tkzFirstPointResult}{% + tkzSecondPointResult}% +\endgroup +} +%<--------------------------------------------------------------------------–> \def\tkz@numtang{0} \pgfkeys{/tkz@tang/.cd, - at/.code = {\def\tkz@numtang{0}\def\tkz@ptat{#1}}, - from/.code = {\def\tkz@numtang{1}\def\tkz@ptfrom{#1}}, - from with R/.code = {\def\tkz@numtang{2}\def\tkz@ptfrom{#1}} - } + at/.code = {\def\tkz@numtang{0}\def\tkz@ptat{#1}}, + from/.code = {\def\tkz@numtang{1}\def\tkz@ptfrom{#1}}, + from with R/.code = {\def\tkz@numtang{2}\def\tkz@ptfrom{#1}} + } %<--------------------------------------------------------------------------–> \def\tkzDefTangent{\pgfutil@ifnextchar[{\tkz@Tangent}{\tkz@Tangent[]}} diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-by.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-by.tex index 9075bff11a..d255a1713b 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-by.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-by.tex @@ -1,5 +1,5 @@ % tkz-tools-eu-points-by.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,51 +7,45 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-tools-eu-points-by.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-el-points-by.tex} \makeatletter %<--------------------------------------------------------------------------–> % Transformations Géométriques %<--------------------------------------------------------------------------–> \def\tkz@numtrsf{0} \pgfkeys{/tkzDefPointBy/.cd, -translation/.code args={from #1 to #2}{% - \def\tkzfrom{#1}% - \def\tkzto{#2}% - \def\tkz@numtrsf{0}}, - homothety/.code args={center #1 ratio #2}{% - \def\tkzcenter{#1}% - \def\tkzratio{#2}% - \def\tkz@numtrsf{1}}, - reflection/.code args={over #1--#2}{% - \def\tkzdeb{#1}% - \def\tkzfin{#2}% - \def\tkz@numtrsf{2}}, - symmetry/.code args={center #1}{% - \def\tkzcenter{#1}% - \def\tkz@numtrsf{3}}, - projection/.code args={onto #1--#2}{% - \def\tkzdeb{#1}% - \def\tkzfin{#2}% - \def\tkz@numtrsf{4}}, - rotation/.code args={center #1 angle #2}{% - \def\tkzcenter{#1}% - \def\tkzangle{#2}% - \def\tkz@numtrsf{5}}, - rotation in rad/.code args={center #1 angle #2}{% - \def\tkzcenter{#1}% - \def\tkzangle{#2}% - \def\tkz@numtrsf{6}}, -inversion/.code args={center #1 through #2}{% - \def\tkzcenter{#1}% - \def\tkzpoint{#2}% - \def\tkz@numtrsf{7}} + translation/.code args={from #1 to #2}{ \def\tkzfrom{#1}% + \def\tkzto{#2}% + \def\tkz@numtrsf{0}}, + homothety/.code args={center #1 ratio #2}{ \def\tkzcenter{#1}% + \def\tkzratio{#2}% + \def\tkz@numtrsf{1}}, + reflection/.code args={over #1--#2}{ \def\tkzdeb{#1}% + \def\tkzfin{#2}% + \def\tkz@numtrsf{2}}, + symmetry/.code args={center #1}{ \def\tkzcenter{#1}% + \def\tkz@numtrsf{3}}, + projection/.code args={onto #1--#2}{ \def\tkzdeb{#1}% + \def\tkzfin{#2}% + \def\tkz@numtrsf{4}}, + rotation/.code args={center #1 angle #2}{ \def\tkzcenter{#1}% + \def\tkzangle{#2}% + \def\tkz@numtrsf{5}}, + rotation in rad/.code args={center #1 angle #2}{ \def\tkzcenter{#1}% + \def\tkzangle{#2}% + \def\tkz@numtrsf{6}}, + inversion/.code args={center #1 through #2}{ \def\tkzcenter{#1}% + \def\tkzpoint{#2}% + \def\tkz@numtrsf{7}}, + inversion negative/.code args={center #1 through #2}{ \def\tkzcenter{#1}% + \def\tkzpoint{#2}% + \def\tkz@numtrsf{8}} +% inversion négative ? } %<--------------------------------------------------------------------------–> \def\tkzDefPointBy{\pgfutil@ifnextchar[{\tkz@DefPointBy}{\tkz@DefPointBy[]}} @@ -75,6 +69,8 @@ inversion/.code args={center #1 through #2}{% \tkzURotateInRad(\tkzcenter,\tkzangle)(#2) \or% 7 \tkzUInversePoint(\tkzcenter,\tkzpoint)(#2) +\or% 8 + \tkzUInverseNegativePoint(\tkzcenter,\tkzpoint)(#2) \fi \endgroup } @@ -93,13 +89,15 @@ inversion/.code args={center #1 through #2}{% \or% 3 \tkzCSym(\tkzcenter)(#2){#3} \or% 4 - \tkzProjection(\tkzdeb,\tkzfin)(#2){#3} + \tkzProjection(\tkzdeb,\tkzfin)(#2){#3} \or% 5 \tkzRotateAngle(\tkzcenter,\tkzangle)(#2){#3} \or% 6 \tkzRotateInRad(\tkzcenter,\tkzangle)(#2){#3} \or% 7 \tkzInversePoint(\tkzcenter,\tkzpoint)(#2){#3} + \or% 8 + \tkzInverseNegativePoint(\tkzcenter,\tkzpoint)(#2){#3} \fi \endgroup } @@ -235,7 +233,7 @@ inversion/.code args={center #1 through #2}{% \pgfinterruptboundingbox \path[coordinate](#3)--++(-\tkz@ax,\tkz@ay) coordinate (tkz@point); \tkzInterLL(#1,#2)(#3,tkz@point)% définit tkzPointResult - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -334,9 +332,9 @@ inversion/.code args={center #1 through #2}{% {#2} \tkz@bx\pgf@x% \tkz@by\pgf@y% - \pgfinterruptboundingbox - \path (\tkz@bx,\tkz@by) coordinate (tkzPointResult);% - \endpgfinterruptboundingbox + \pgfinterruptboundingbox + \path (\tkz@bx,\tkz@by) coordinate (tkzPointResult);% + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -405,19 +403,51 @@ inversion/.code args={center #1 through #2}{% \else \xdef\tkz@pointtsf{\tkz@FirstPoint} \fi - \tkzCalcLength[cm](#1,#2)\tkzGetLength{tkz@lna} - \tkzCalcLength[cm](#1,\PointIP)\tkzGetLength{tkz@lnb} - \edef\tkz@lnc{\tkz@lna/\tkz@lnb*\tkz@lna} - \tkzVecKNorm[\tkz@lnb](#1,\PointIP) - } + \tkz@@CalcLengthcm(#1,#2){tkz@lna} + \tkz@@CalcLengthcm(#1,\PointIP){tkz@lnb} + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkzVecKNorm[\tkz@lnc](#1,\PointIP) + \pgfnodealias{\tkz@pointtsf}{tkzPointResult} + } \endgroup } \def\tkzUInversePoint(#1,#2)(#3){% \begingroup - \tkzCalcLength[cm](#1,#2)\tkzGetLength{tkz@lna}% - \tkzCalcLength[cm](#1,#3)\tkzGetLength{tkz@lnb}% - \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkz@@CalcLengthcm(#1,#2){tkz@lna}% + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkzVecKNorm[\tkz@lnc](#1,#3) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Inverse negative of a point +%<--------------------------------------------------------------------------–> +\def\tkzInverseNegativePoint(#1,#2)(#3)#4{% +\begingroup +\gdef\tkz@LastList{#4} + \foreach\PointIP in {#3}{% + \FirstPointInList\tkz@LastList + \ifx\tkz@FirstPoint\tkzutil@empty + \xdef\tkz@pointtsf{\PointIP '} + \else + \xdef\tkz@pointtsf{\tkz@FirstPoint} + \fi + \tkz@@CalcLengthcm(#1,#2){tkz@lna} + \tkz@@CalcLengthcm(#1,\PointIP){tkz@lnb} + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkzVecKNorm[\tkz@lnc](#1,\PointIP) + \tkzUCSym(#1)(tkzPointResult) + \pgfnodealias{\tkz@pointtsf}{tkzPointResult} + } +\endgroup +} +\def\tkzUInverseNegativePoint(#1,#2)(#3){% +\begingroup + \tkz@@CalcLengthcm(#1,#2){tkz@lna}% + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} \tkzVecKNorm[\tkz@lnc](#1,#3) + \tkzUCSym(#1)(tkzPointResult) \endgroup } %<--------------------------------------------------------------------------–> diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-rnd.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-rnd.tex index 008021cf10..9832a3e9be 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-rnd.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-rnd.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-points-rnd.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,14 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-points-rnd.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-el-points-rnd.tex} %<--------------------------------------------------------------------------–> \makeatletter %<-------------------------------------------------------------------------–> @@ -94,25 +92,25 @@ %<--------------------------------------------------------------------------–> \def\tkzRandPointOnCircle(#1,#2){% \pgfmathrandominteger{\tkzrnd}{0}{360} -\tkz@ax#2 % - \edef\tkz@xa{\fpeval{\tkz@ax*cosd(\tkzrnd)}} - \edef\tkz@xb{\fpeval{\tkz@ax*sind(\tkzrnd)}} - \path[coordinate]($(#1) + (\tkz@xa pt,\tkz@xb pt) $) coordinate (tkzPointResult); +\tkz@ax#2cm % + \edef\tkz@pxa{\fpeval{\tkz@ax*cosd(\tkzrnd)}} + \edef\tkz@pxb{\fpeval{\tkz@ax*sind(\tkzrnd)}} + \path[coordinate]($(#1) + (\tkz@pxa pt,\tkz@pxb pt) $) coordinate (tkzPointResult); } \def\tkzRandPointOnCircleThrough(#1,#2){% \pgfmathrandominteger{\tkzrnd}{0}{360} -\tkzCalcLength(#1,#2) - \edef\tkz@xa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} - \edef\tkz@xb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} -\path[coordinate]($(#1) + (\tkz@xa pt ,\tkz@xb pt) $) coordinate (tkzPointResult); +\tkz@@CalcLength(#1,#2){tkzLengthResult} + \edef\tkz@pxa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} + \edef\tkz@pxb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} +\path[coordinate]($(#1) + (\tkz@pxa pt ,\tkz@pxb pt) $) coordinate (tkzPointResult); } %<--------------------------------------------------------------------------–> \def\tkzRandPointOnDisk(#1,#2){% \pgfmathrandominteger{\tkzrnd}{0}{360} - \tkzCalcLength(#1,#2) - \edef\tkz@xa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} - \edef\tkz@xb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} - \path[coordinate]($(#1) + (\tkz@xa pt ,\tkz@xb pt) $) coordinate (tkz@tmp); + \tkz@@CalcLength(#1,#2){tkzLengthResult} + \edef\tkz@pxa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} + \edef\tkz@pxb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} + \path[coordinate]($(#1) + (\tkz@pxa pt ,\tkz@pxb pt) $) coordinate (tkz@tmp); \pgfmathparse{rnd} \let\myrnd\pgfmathresult \path[coordinate] ($ (#1)!\myrnd!(tkz@tmp) $) coordinate (tkzPointResult); diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-spc.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-spc.tex new file mode 100644 index 0000000000..888e127bfc --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-spc.tex @@ -0,0 +1,536 @@ +% tkz-obj-eu-points.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-el-points.tex} +\makeatletter +%add ExCenter +%<--------------------------------------------------------------------------–> +% Specific points +%<--------------------------------------------------------------------------–> +% barycentre +%<--------------------------------------------------------------------------–> +\def\tkzDefBarycentricPoint(#1){% +\begingroup + \path[coordinate] (barycentric cs:#1) coordinate (tkzPointResult); +\endgroup +} +\let\tkzDefBCPoint\tkzDefBarycentricPoint + +\def\tkzDefCentroid(#1){% +\begingroup + \xdef\tkz@arg{} + \foreach \X in {#1} + {% + \ifx\tkzutil@empty\tkz@arg% + \xdef\tkz@arg{\X=1} + \else + \xdef\tkz@arg{\tkz@arg,\X=1} + \fi + } + \path[coordinate] (barycentric cs:\tkz@arg) coordinate (tkzPointResult); +\endgroup +} + +%<--------------------------------------------------------------------------–> +% milieu de deux points +%<--------------------------------------------------------------------------–> +% possible \coordinate (#3) at ($(#1)!0.5!(#2)$); +%<--------------------------------------------------------------------------–> +% \def\tkzDefMidPoint(#1,#2){% +% \begingroup +% \path (#1) -- (#2) coordinate[pos=.5](tkzPointResult); +% \endgroup +% } +\def\tkzDefMidPoint(#1,#2){% +\begingroup + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#2}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \advance\tkz@bx by\tkz@ax\relax% + \advance\tkz@by by\tkz@ay\relax% + \divide\tkz@bx by2\relax% + \divide\tkz@by by2\relax + \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} +\endgroup +} +\def\tkz@DefMidPoint(#1,#2,#3,#4){% +\begingroup + \tkz@ax#1% + \tkz@ay#2% + \tkz@bx#3% + \tkz@by#4% + \advance\tkz@bx by\tkz@ax\relax% + \advance\tkz@by by\tkz@ay\relax% + \divide\tkz@bx by2\relax% + \divide\tkz@by by2\relax + \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Internal Similitude center +% Two circles have two similitude centers namely the internal center of +% similitude Si and the external similitude center Se. +%<--------------------------------------------------------------------------–> +\def\tkz@numhomo{0} +\pgfkeys{ +/tkzSimilitudeCenter/.cd, + node/.code = \def\tkz@numhomo{0}, + R/.code = \def\tkz@numhomo{1}, + node +} +\def\tkzDefIntSimilitudeCenter{\pgfutil@ifnextchar[{\tkz@DefIntSimilitudeCenter}{\tkz@DefIntSimilitudeCenter[]}} +\def\tkz@DefIntSimilitudeCenter[#1](#2,#3)(#4,#5){% +\begingroup +\pgfqkeys{/tkzSimilitudeCenter}{#1} +\ifcase\tkz@numhomo% + \tkzCalcLength(#2,#3) + \tkzGetLength{tkz@rt} + \tkzCalcLength(#4,#5) + \tkzGetLength{tkz@rf} + \or% 1 + \def\tkz@rt{#3} + \def\tkz@rf{#5} +\fi + \path[coordinate](barycentric cs:#2=\tkz@rf,#4=\tkz@rt)coordinate (tkzPointResult); +\endgroup +} +\let\tkzDefIntHomotheticCenter\tkzDefIntSimilitudeCenter +%<--------------------------------------------------------------------------–> +% External Similitude center +%<--------------------------------------------------------------------------–> +\def\tkzDefExtSimilitudeCenter{\pgfutil@ifnextchar[{\tkz@DefExtSimilitudeCenter}{\tkz@DefExtSimilitudeCenter[]}} + +\def\tkz@DefExtSimilitudeCenter[#1](#2,#3)(#4,#5){% +\begingroup +\pgfqkeys{/tkzSimilitudeCenter}{#1} +\ifcase\tkz@numhomo% + \tkzCalcLength(#2,#3) + \tkzGetLength{tkz@rt} + \tkzCalcLength(#4,#5) + \tkzGetLength{tkz@rf} + \or% 1 + \def\tkz@rt{#3} + \def\tkz@rf{#5} +\fi + \path[coordinate](barycentric cs:#2=-\tkz@rf,#4=\tkz@rt) coordinate(tkzPointResult); +\endgroup +} + +\let\tkzDefExtHomotheticCenter\tkzDefExtSimilitudeCenter + +%<--------------------------------------------------------------------------–> +% golden ratio +%<--------------------------------------------------------------------------–> +\def\tkzDefGoldenRatio(#1,#2){% +\begingroup +\tkzDefPointWith[linear,K=\tkzInvPhi](#1,#2) +\endgroup +} +%<--------------------------------------------------------------------------–> +% triangle center +%<--------------------------------------------------------------------------–> + +\def\tkz@numtc{0} +\pgfkeys{/tkzDefTriangleCenter/.cd, + ortho/.code = \def\tkz@numtc{0}, + orthic/.code = \def\tkz@numtc{0}, + centroid/.code = \def\tkz@numtc{1}, + median/.code = \def\tkz@numtc{1}, + circum/.code = \def\tkz@numtc{2}, + in/.code = \def\tkz@numtc{3}, + ex/.code = \def\tkz@numtc{4}, + euler/.code = \def\tkz@numtc{5}, + symmedian/.code = \def\tkz@numtc{6}, + lemoine/.code = \def\tkz@numtc{6}, + grebe/.code = \def\tkz@numtc{6}, + spieker/.code = \def\tkz@numtc{7}, + gergonne/.code = \def\tkz@numtc{8}, + nagel/.code = \def\tkz@numtc{9}, + mittenpunkt/.code = \def\tkz@numtc{10}, + feuerbach/.code = \def\tkz@numtc{11}, + circum +} +\def\tkzDefTriangleCenter{\pgfutil@ifnextchar[{\tkz@DefTriangleCenter}{\tkz@DefTriangleCenter[]}} +\def\tkz@DefTriangleCenter[#1](#2){% +\begingroup +\pgfqkeys{/tkzDefTriangleCenter}{#1} +\ifcase\tkz@numtc% + \tkzOrthoCenter(#2) + \or% 1 + \tkzCentroid(#2) + \or% 2 + \tkzCircumCenter(#2) + \or% 3 + \tkzInCenter(#2) + \or% 4 + \tkzExCenter(#2) + \or% 5 + \tkzEulerCenter(#2) + \or% 6 + \tkzSymmedianCenter(#2) + \or% 7 + \tkzSpiekerCenter(#2) + \or% 8 + \tkzGergonneCenter(#2) + \or%9 + \tkzNagelCenter(#2) + \or%10 + \tkzMittenpunktCenter(#2) + \or%11 + \tkzFeuerbachCenter(#2) + \fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% OrthoCenter +%<--------------------------------------------------------------------------–> +\def\tkzOrthoCenter(#1,#2,#3){% H orthocentre +\begingroup + \pgfinterruptboundingbox + \tkzUProjection(#1,#2)(#3) + \pgfnodealias{ort@pta}{tkzPointResult} + \tkzUProjection(#1,#3)(#2) + \pgfnodealias{ort@ptb}{tkzPointResult} + \tkzInterLL(#2,ort@ptb)(#3,ort@pta) + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefOrthoCenter\tkzOrthoCenter +%<--------------------------------------------------------------------------–> +% GravityCenter modif 3.03 +%<--------------------------------------------------------------------------–> +\def\tkzCentroid(#1,#2,#3){% +\begingroup + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#2}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \pgf@process{\pgfpointanchor{#3}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \advance\tkz@cx by\tkz@ax\relax% + \advance\tkz@cy by\tkz@ay\relax% + \advance\tkz@cx by\tkz@bx\relax% + \advance\tkz@cy by\tkz@by\relax% + \divide\tkz@cx by3\relax% + \divide\tkz@cy by3\relax + \pgfinterruptboundingbox + \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@cx}{\tkz@cy}} + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzBaryCenter\tkzCentroid + +%<--------------------------------------------------------------------------–> +% CircumCenter +%<--------------------------------------------------------------------------–> +\def\tkzCircumCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefMediatorLine(#1,#2) + \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \tkzDefMediatorLine(#1,#3) + \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% + \tkz@dx\pgf@x% + \tkz@dy\pgf@y% + \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)(\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefCircumCenter\tkzCircumCenter +%<--------------------------------------------------------------------------–> +% InCenter +%<--------------------------------------------------------------------------–> +\def\tkzInCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefBisectorLine(#3,#1,#2) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \tkzDefBisectorLine(#3,#2,#1) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@dx\pgf@x% + \tkz@dy\pgf@y% + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#2}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% + (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefInCenter\tkzInCenter +%<--------------------------------------------------------------------------–> +% ExCenter +%<--------------------------------------------------------------------------–> +\def\tkzExCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefBisectorOutLine(#2,#1,#3) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \tkzDefBisectorOutLine(#2,#3,#1) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@dx\pgf@x% + \tkz@dy\pgf@y% + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#3}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% + (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefExCenter\tkzExCenter +%<--------------------------------------------------------------------------–> +% EulerCenter neuf points +%<--------------------------------------------------------------------------–> +\def\tkzEulerCenter(#1,#2,#3){% +% mileu de orthocentre et centre cercle circonscrit +% passe par les midpoints par les pieds des hauteurs +\begingroup +\pgfinterruptboundingbox + \tkzDefMidPoint(#1,#2) + \pgfnodealias{eu@mic}{tkzPointResult} + \tkzDefMidPoint(#1,#3) + \pgfnodealias{eu@mib}{tkzPointResult} + \tkzDefMidPoint(#2,#3) + \pgfnodealias{eu@mia}{tkzPointResult} + \tkzCircumCenter(eu@mia,eu@mib,eu@mic) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzNinePointCenter\tkzEulerCenter +\let\tkzDefEulerCenter\tkzEulerCenter +%<--------------------------------------------------------------------------–> +%Symmedian center Lemoine point Grebe point K +%<--------------------------------------------------------------------------–> +\def\tkzSymmedianCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefMidPoint(#2,#3) + \pgfnodealias{eu@mic}{tkzPointResult} + \tkzDefMidPoint(#1,#3) + \pgfnodealias{eu@mib}{tkzPointResult} + \tkzUProjection(#2,#3)(#1) + \pgfnodealias{ort@pta}{tkzPointResult} + \tkzDefMidPoint(#1,ort@pta) + \pgfnodealias{eu@mid}{tkzPointResult} + \tkzUProjection(#1,#3)(#2) + \pgfnodealias{ort@ptb}{tkzPointResult} + \tkzDefMidPoint(#2,ort@ptb) + \pgfnodealias{eu@mie}{tkzPointResult} + \tkzInterLL(eu@mic,eu@mid)(eu@mib,eu@mie) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzLemoinePoint\tkzSymmedianCenter +\let\tkzGrebePoint\tkzSymmedianCenter +\let\tkzDefLemoinePoint\tkzLemoinePoint +%<--------------------------------------------------------------------------–> +% Spieker center +%<--------------------------------------------------------------------------–> +\def\tkzSpiekerCenter(#1,#2,#3){% +\begingroup +% we need to get the midpoints +\pgfcoordinate{tkz@m3}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#2}{center}}}}% +\pgfcoordinate{tkz@m2}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#3}{center}}}}% +\pgfcoordinate{tkz@m1}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#2}{center}}% + {\pgfpointanchor{#3}{center}}}}% +\tkzInCenter(tkz@m1,tkz@m2,tkz@m3) +\endgroup +} +\let\tkzDefSpiekerCenter\tkzSpiekerCenter +%<--------------------------------------------------------------------------–> +% Gergonne center Ge +%<--------------------------------------------------------------------------–> +\def\tkzGergonneCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzInCenter(#1,#2,#3) + \pgfnodealias{tkz@ptin}{tkzPointResult} + \tkzUProjection(#2,#3)(tkz@ptin) + \pgfnodealias{tkz@oca}{tkzPointResult} + \tkzUProjection(#1,#3)(tkz@ptin) + \pgfnodealias{tkz@ocb}{tkzPointResult} + \tkzInterLL(#1,tkz@oca)(#2,tkz@ocb) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefGergonneCenter\tkzGergonneCenter +%<--------------------------------------------------------------------------–> +% Nagel center Na +%<--------------------------------------------------------------------------–> +% INa = 3 IG. Nagel point % correction 02/02/20 +\def\tkzNagelCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefExcentralTriangle(#1,#2,#3){tkz@a,tkz@b,tkz@c} + \tkzUProjection(#2,#3)(tkz@a) + \pgfnodealias{tkz@tgta}{tkzPointResult} + \tkzUProjection(#1,#2)(tkz@c) + \pgfnodealias{tkz@tgtc}{tkzPointResult} + \tkzInterLL(#1,tkz@tgta)(#3,tkz@tgtc) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefNagelCenter\tkzNagelCenter +%<--------------------------------------------------------------------------–> +% Mittenpunkt +%<--------------------------------------------------------------------------–> +\def\tkzMittenpunktCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzExCenter(#2,#3,#1) + \pgfnodealias{tkz@a}{tkzPointResult} + \tkzExCenter(#3,#1,#2) + \pgfnodealias{tkz@b}{tkzPointResult} + \pgfcoordinate{tkz@ma}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}}}% + \pgfcoordinate{tkz@mb}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}}}% + \tkzInterLL(tkz@a,tkz@ma)(tkz@b,tkz@mb) + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefMittenpunktCenter\tkzMittenpunktCenter +\let\tkzDefMiddlespoint\tkzMittenpunktCenter +%<--------------------------------------------------------------------------–> +% Feuerbach point +%<--------------------------------------------------------------------------–> +\def\tkzFeuerbachCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzEulerCenter(#1,#2,#3) + \pgfnodealias{tkz@euler}{tkzPointResult} + \tkzInCenter(#1,#2,#3) + \pgfnodealias{tkz@in}{tkzPointResult} + \tkzUProjection(#2,#3)(tkzPointResult) + \tkzInterLC(tkz@in,tkz@euler)(tkz@in,tkzPointResult)\tkzGetFirstPoint{tkz@fe} + \tkzRenamePoint(tkz@fe){tkzPointResult} + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefFeuerbachCenter\tkzFeuerbachCenter +%<--------------------------------------------------------------------------–> +% Orthogonal center +%<--------------------------------------------------------------------------–> +\def\tkzOrthogonalCenter(#1,#2){% +\begingroup +\pgfinterruptboundingbox + \tkz@VecK[\tkz@koeff/(1+\tkz@koeff)](#1,#2) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} + \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) +\endpgfinterruptboundingbox +\endgroup +} +%<--------------------------------------------------------------------------–> +% End Triangle center +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +% Projection center of excircles +%<--------------------------------------------------------------------------–> +\def\tkzDefProjExcenter{\pgfutil@ifnextchar[{% + \tkz@DefProjExcenter}{% + \tkz@DefProjExcenter[]} + } +\def\tkz@DefProjExcenter[#1](#2,#3,#4)(#5)#6{ +\begingroup + \SetUpPTTR{#1} + \foreach \name [count=\i] in {#5} {% + \global\expandafter\edef\csname tkz@pt\i\endcsname{\name} + } + \foreach \name [count=\i] in {#6} {% + \global\expandafter\edef\csname tkz@ppt\i\endcsname{\name} + } +\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) +\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) +\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) +\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) +\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) +\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) +\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt1\endcsname) +\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt2\endcsname) +\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt3\endcsname) +\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Point on circle +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzptcircle/.cd, + angle/.store in = \tkz@angle, + angle = 0 , + center/.store in = \tkz@center, + radius/.store in = \tkz@radius, +} +\def\tkzDefPointOnCircle{\pgfutil@ifnextchar[{\tkz@DefPointOnCircle}{\tkz@DefPointOnCircle[]}} +\def\tkz@DefPointOnCircle[#1]{% +\begingroup +\pgfqkeys{/tkzptcircle}{#1} +\path (\tkz@center) --++(\tkz@angle:\tkz@radius) coordinate(tkzPointResult); +\endgroup +} +%<--------------------------------------------------------------------------–> +% Point on line +%<--------------------------------------------------------------------------–> +\def\tkzDefPointOnLine{\pgfutil@ifnextchar[{\tkz@DefPointOnLine}{\tkz@DefPointOnLine[]}} +\def\tkz@DefPointOnLine[#1](#2,#3){% +\begingroup +\path (#2) to [#1] coordinate (tkzPointResult) (#3); +\endgroup +} +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-with.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-with.tex index 66ce3aa16c..585b90c1b6 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-with.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points-with.tex @@ -1,5 +1,5 @@ -% tkz-obj-eu-points-with.tex -% Copyright 2020 Alain Matthes +% tkz-obj-el-points-with.tex +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,14 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-points-with.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-el-points-with.tex} \makeatletter %<--------------------------------------------------------------------------–> % Vectors @@ -39,9 +37,9 @@ \def\tkzDuplicateSegment(#1,#2)(#3,#4){% \begingroup - \tkzCalcLength(#1,#2)\tkzGetLength{tkz@firstlen}% - \tkzCalcLength(#3,#4)\tkzGetLength{tkz@secondlen}% - \edef\tkz@ratio{\fpeval{\tkz@firstlen/\tkz@secondlen}} + \tkz@@CalcLength(#1,#2){tkz@firstlen}% + \tkz@@CalcLength(#3,#4){tkz@secondlen}% + \edef\tkz@ratio{\fpeval{\tkz@firstlen/\tkz@secondlen}} \tkz@VecKCoLinear[\tkz@ratio](#3,#4,#3)% \endgroup } @@ -263,6 +261,5 @@ \endpgfinterruptboundingbox \endgroup }% -%<-------------------------------------------------------------------------–> \makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points.tex index 64118c22e9..c7b94a86a0 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-points.tex @@ -1,5 +1,5 @@ -% tkz-obj-eu-points.tex -% Copyright 2020 Alain Matthes + % tkz-obj-eu-points.tex +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,491 +7,322 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% -% This work has the LPPL maintenance status “maintained”. -% +% This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-points.tex} -\makeatletter -%add ExCenter -%<--------------------------------------------------------------------------–> -% Specific points -%<--------------------------------------------------------------------------–> -% barycentre -%<--------------------------------------------------------------------------–> -\def\tkzDefBarycentricPoint(#1){% -\begingroup - \path[coordinate] (barycentric cs:#1) coordinate (tkzPointResult); -\endgroup -} -\let\tkzDefBCPoint\tkzDefBarycentricPoint -\def\tkzDefCentroid(#1){% -\begingroup - \xdef\tkz@arg{} - \foreach \X in {#1} - {% - \ifx\tkzutil@empty\tkz@arg% - \xdef\tkz@arg{\X=1} - \else - \xdef\tkz@arg{\tkz@arg,\X=1} - \fi - } - \path[coordinate] (barycentric cs:\tkz@arg) coordinate (tkzPointResult); -\endgroup +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-points.tex} +\makeatletter +%<---------------------------------------------------------------------------> +% init def point +%<---------------------------------------------------------------------------> +% tkzDefPoint +%<---------------------------------------------------------------------------> +% macros complémentaires pour def point +%<---------------------------------------------------------------------------> +\def\tkz@parsecoordinate#1{% +\tkz@getseparator#1,\@nil +\iftkz@polar + \tkz@getfrompolar#1\@nil +\else + \tkz@getfromcart#1\@nil +\fi } - -%<--------------------------------------------------------------------------–> -% milieu de deux points -%<--------------------------------------------------------------------------–> -% possible \coordinate (#3) at ($(#1)!0.5!(#2)$); -%<--------------------------------------------------------------------------–> -% \def\tkzDefMidPoint(#1,#2){% -% \begingroup -% \path (#1) -- (#2) coordinate[pos=.5](tkzPointResult); -% \endgroup -% } -\def\tkzDefMidPoint(#1,#2){% -\begingroup - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#2}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \advance\tkz@bx by\tkz@ax\relax% - \advance\tkz@by by\tkz@ay\relax% - \divide\tkz@bx by2\relax% - \divide\tkz@by by2\relax - \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} -\endgroup +\def\tkz@getseparator#1,#2\@nil{% +\ifx\tkzempty#2\tkzempty% + \tkz@polartrue +\else + \tkz@polarfalse +\fi +} +\def\tkz@getfrompolar#1:#2\@nil{% +\edef\tkz@a{\fpeval{#1}} +\edef\tkz@r{\fpeval{#2}} +\xdef\tkz@polarrad{\tkz@r} +\xdef\tkz@polarangle{\tkz@a} +} +\def\tkz@getfromcart#1,#2\@nil{% +\edef\tkz@x{\fpeval{#1}} +\edef\tkz@y{\fpeval{#2}} +\xdef\tkz@absc{\tkz@x} +\xdef\tkz@ord{\tkz@y} } -\def\tkz@DefMidPoint(#1,#2,#3,#4){% -\begingroup - \tkz@ax#1% - \tkz@ay#2% - \tkz@bx#3% - \tkz@by#4% - \advance\tkz@bx by\tkz@ax\relax% - \advance\tkz@by by\tkz@ay\relax% - \divide\tkz@bx by2\relax% - \divide\tkz@by by2\relax - \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} -\endgroup +%<---------------------------------------------------------------------------> +% options pour point definition +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzPt/.cd, + polar/.is if = tkz@pt@polar, + polar/.default = true, + polar = false } -%<--------------------------------------------------------------------------–> -% Internal Similitude center -% Two circles have two similitude centers namely the internal center of similitude Si and the external similitude center Se. -%<--------------------------------------------------------------------------–> -\def\tkzDefIntSimilitudeCenter(#1,#2)(#3,#4){% -\begingroup - \path[coordinate](barycentric cs:#1=#4,#3=#2)coordinate (tkzPointResult); -\endgroup +%<---------------------------------------------------------------------------> +% tkz@ptStar +%<---------------------------------------------------------------------------> +\def\tkz@ptStar[#1](#2,#3)#{% +\pgfkeys{/tkzPt/.cd, polar = false} +\pgfqkeys{/tkzPt}{#1} +\iftkz@pt@polar% + \edef\tkz@x{\fpeval{#3*cosd(#2)}} + \edef\tkz@y{\fpeval{#3*sind(#2)}} +\else + \edef\tkz@x{\fpeval{#2}} + \edef\tkz@y{\fpeval{#3}} +\fi +\edef\tkzpt@xa{\fpeval{(\tkz@x-\tkz@init@xorigine)/\tkz@init@xstep}} +\edef\tkzpt@ya{\fpeval{(\tkz@y-\tkz@init@yorigine)/\tkz@init@ystep}} +\tkz@node } -\let\tkzIntSimilitudeCenter\tkzDefIntSimilitudeCenter -%<--------------------------------------------------------------------------–> -% External Similitude center -%<--------------------------------------------------------------------------–> -\def\tkzDefExtSimilitudeCenter(#1,#2)(#3,#4){% -\begingroup - \path[coordinate](barycentric cs:#1=-#4,#3=#2) coordinate(tkzPointResult); -\endgroup -} -\let\tkzExtSimilitudeCenter\tkzDefExtSimilitudeCenter -%<--------------------------------------------------------------------------–> -% triangle center -%<--------------------------------------------------------------------------–> +%<---------------------------------------------------------------------------> +% la macro defpoint les coordonnées cartésiennes ou polaires sont traitées +% afin de pouvoir être adaptées avec les unités choisies +%<---------------------------------------------------------------------------> +\def\tkzDefPoint{\pgfutil@ifnextchar[{\tkz@DefPoint}{\tkz@DefPoint[]}} -\def\tkz@numtc{0} -\pgfkeys{/tkzDefTriangleCenter/.cd, - ortho/.code = \def\tkz@numtc{0}, - centroid/.code = \def\tkz@numtc{1}, - median/.code = \def\tkz@numtc{1}, - circum/.code = \def\tkz@numtc{2}, - in/.code = \def\tkz@numtc{3}, - ex/.code = \def\tkz@numtc{4}, - euler/.code = \def\tkz@numtc{5}, - symmedian/.code = \def\tkz@numtc{6}, - lemoine/.code = \def\tkz@numtc{6}, - grebe/.code = \def\tkz@numtc{6}, - spieker/.code = \def\tkz@numtc{7}, - gergonne/.code = \def\tkz@numtc{8}, - nagel/.code = \def\tkz@numtc{9}, - mittenpunkt/.code = \def\tkz@numtc{10}, - feuerbach/.code = \def\tkz@numtc{11}, - circum -} -\def\tkzDefTriangleCenter{\pgfutil@ifnextchar[{\tkz@DefTriangleCenter}{\tkz@DefTriangleCenter[]}} -\def\tkz@DefTriangleCenter[#1](#2){% -\begingroup -\pgfqkeys{/tkzDefTriangleCenter}{#1} -\ifcase\tkz@numtc% - \tkzOrthoCenter(#2) - \or% 1 - \tkzCentroid(#2) - \or% 2 - \tkzCircumCenter(#2) - \or% 3 - \tkzInCenter(#2) - \or% 4 - \tkzExCenter(#2) - \or% 5 - \tkzEulerCenter(#2) - \or% 6 - \tkzSymmedianCenter(#2) - \or% 7 - \tkzSpiekerCenter(#2) - \or% 8 - \tkzGergonneCenter(#2) - \or%9 - \tkzNagelCenter(#2) - \or%10 - \tkzMittenpunktCenter(#2) - \or%11 - \tkzFeuerbachCenter(#2) - \fi -\endgroup +\def\tkz@DefPoint[#1](#2)#{% +\tkz@parsecoordinate{#2} +\iftkz@polar + \tkz@ptStar[polar](\tkz@polarangle,\tkz@polarrad){tkz@coord@temp} +\else + \tkz@ptStar[](#2){tkz@coord@temp} +\fi +\tkz@DefPointEnd[#1] +}% +\def\tkz@DefPointEnd[#1]#2{\coordinate[#1] (#2) at (tkz@coord@temp);} +%<---------------------------------------------------------------------------> +% tkzDefPoints +%<---------------------------------------------------------------------------> +\def\tkzDefPoints{\pgfutil@ifnextchar[{\tkz@DefPoints}{\tkz@DefPoints[]}} +\def\tkz@DefPoints[#1]#2{% + \begingroup + \def\tkz@parenthesis@for@err{(}% + \def\tkz@maybe@parenthesis{#2}% + \ifx\tkz@maybe@parenthesis\tkz@parenthesis@for@err + \PackageError{tkz-base}{Syntax error use {} instead of ()}{You need to use {} instead of ()}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\tkz@absorb@bad@arg}% + {\foreach \ptx/\pty/\name in {#2}{\tkzDefPoint[#1](\ptx,\pty){\name}}% + \endgroup}% } -%<--------------------------------------------------------------------------–> -% OrthoCenter -%<--------------------------------------------------------------------------–> -\def\tkzOrthoCenter(#1,#2,#3){% H orthocentre -\begingroup - \pgfinterruptboundingbox - \tkzUProjection(#1,#2)(#3) - \pgfnodealias{ort@pta}{tkzPointResult} - \tkzUProjection(#1,#3)(#2) - \pgfnodealias{ort@ptb}{tkzPointResult} - \tkzInterLL(#2,ort@ptb)(#3,ort@pta) - \endpgfinterruptboundingbox -\endgroup +\def\tkz@absorb@bad@arg#1){\endgroup} +%<---------------------------------------------------------------------------> +\def\tkz@node#1{ \pgfinterruptboundingbox +\path[coordinate](\tkzpt@xa,\tkzpt@ya) coordinate(#1); + \endpgfinterruptboundingbox} +% \def\tkz@drawnode#1{\path[coordinate](\tkzpt@xa,\tkzpt@ya) coordinate(#1); +% \tkz@DrawPt{#1} +% } +%<---------------------------------------------------------------------------> +% tkzSetUpPoint définit la forme d'un point +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzsetuppt/.cd, + size/.store in = \tkz@pt@size, + color/.store in = \tkz@pt@color, + fill/.store in = \tkz@pt@fill, + shape/.store in = \tkz@pt@shape, + size = \tkz@euc@pointsize, + color = \tkz@euc@pointcolor, + fill = \tkz@euc@pointcolor, + shape = \tkz@euc@pointshape, + /tkzsetuppt/.search also = {/tikz}, + } +\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{% + \tkz@SetUpPoint[]}} +\def\tkz@SetUpPoint[#1]{% +\pgfqkeys{/tkzsetuppt}{#1} +% redefine point style with new values +\tikzset{point style/.style={draw = \tkz@pt@color, + inner sep = 0pt, + shape = \tkz@pt@shape, + minimum size = \tkz@pt@size, + fill = \tkz@pt@fill}} +}% end setup +%<---------------------------------------------------------------------------> +% Draw Point +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzdrawpt/.cd, + size/.code = {\tikzset{point style/.append style={minimum size = #1}}}, + size = \tkz@euc@pointsize, + /tkzdrawpt/.search also = {/tikz}, } -\let\tkzDefOrthoCenter\tkzOrthoCenter -%<--------------------------------------------------------------------------–> -% GravityCenter modif 3.03 -%<--------------------------------------------------------------------------–> -\def\tkzCentroid(#1,#2,#3){% +%<-------------------------------------------------------------------------- +\def\tkzDrawPoint{\pgfutil@ifnextchar[{\tkz@DrawPoint}{\tkz@DrawPoint[]}} +\def\tkz@DrawPoint[#1](#2){% \begingroup - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#2}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \pgf@process{\pgfpointanchor{#3}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \advance\tkz@cx by\tkz@ax\relax% - \advance\tkz@cy by\tkz@ay\relax% - \advance\tkz@cx by\tkz@bx\relax% - \advance\tkz@cy by\tkz@by\relax% - \divide\tkz@cx by3\relax% - \divide\tkz@cy by3\relax - \pgfinterruptboundingbox - \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@cx}{\tkz@cy}} - \endpgfinterruptboundingbox -\endgroup -} -\let\tkzBaryCenter\tkzCentroid - -%<--------------------------------------------------------------------------–> -% CircumCenter -%<--------------------------------------------------------------------------–> -\def\tkzCircumCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefMediatorLine(#1,#2) - \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \tkzDefMediatorLine(#1,#3) - \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% - \tkz@dx\pgf@x% - \tkz@dy\pgf@y% - \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)(\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% -\endpgfinterruptboundingbox -\endgroup -} -\let\tkzDefCircumCenter\tkzCircumCenter -%<--------------------------------------------------------------------------–> -% InCenter -%<--------------------------------------------------------------------------–> -\def\tkzInCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefBisectorLine(#3,#1,#2) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \tkzDefBisectorLine(#3,#2,#1) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@dx\pgf@x% - \tkz@dy\pgf@y% - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#2}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% - (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% - \endpgfinterruptboundingbox -\endgroup -} -\let\tkzDefInCenter\tkzInCenter -%<--------------------------------------------------------------------------–> -% ExCenter -%<--------------------------------------------------------------------------–> -\def\tkzExCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefBisectorOutLine(#2,#1,#3) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \tkzDefBisectorOutLine(#2,#3,#1) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@dx\pgf@x% - \tkz@dy\pgf@y% - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#3}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% - (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% - \endpgfinterruptboundingbox -\endgroup -} -\let\tkzDefExCenter\tkzExCenter -%<--------------------------------------------------------------------------–> -% EulerCenter neuf points -%<--------------------------------------------------------------------------–> -\def\tkzEulerCenter(#1,#2,#3){% -% mileu de orthocentre et centre cercle circonscrit -% passe par les midpoints par les pieds des hauteurs -\begingroup -\pgfinterruptboundingbox - \tkzDefMidPoint(#1,#2) - \pgfnodealias{eu@mic}{tkzPointResult} - \tkzDefMidPoint(#1,#3) - \pgfnodealias{eu@mib}{tkzPointResult} - \tkzDefMidPoint(#2,#3) - \pgfnodealias{eu@mia}{tkzPointResult} - \tkzCircumCenter(eu@mia,eu@mib,eu@mic) -\endpgfinterruptboundingbox + \pgfqkeys{/tkzdrawpt}{#1} + \node[point style,/tkzdrawpt/.cd,#1] at (#2) {};%2016 \endgroup } -\let\tkzNinePointCenter\tkzEulerCenter -\let\tkzDefEulerCenter\tkzEulerCenter -%<--------------------------------------------------------------------------–> -%Symmedian center Lemoine point Grebe point K -%<--------------------------------------------------------------------------–> -\def\tkzSymmedianCenter(#1,#2,#3){% +%<---------------------------------------------------------------------------> +\def\tkzDrawPoints{\pgfutil@ifnextchar[{\tkz@drawpts}{\tkz@drawpts[]}} +%<---------------------------------------------------------------------------> +\def\tkz@drawpts[#1](#2){% \begingroup -\pgfinterruptboundingbox - \tkzDefMidPoint(#2,#3) - \pgfnodealias{eu@mic}{tkzPointResult} - \tkzDefMidPoint(#1,#3) - \pgfnodealias{eu@mib}{tkzPointResult} - \tkzUProjection(#2,#3)(#1) - \pgfnodealias{ort@pta}{tkzPointResult} - \tkzDefMidPoint(#1,ort@pta) - \pgfnodealias{eu@mid}{tkzPointResult} - \tkzUProjection(#1,#3)(#2) - \pgfnodealias{ort@ptb}{tkzPointResult} - \tkzDefMidPoint(#2,ort@ptb) - \pgfnodealias{eu@mie}{tkzPointResult} - \tkzInterLL(eu@mic,eu@mid)(eu@mib,eu@mie) -\endpgfinterruptboundingbox -\endgroup + \pgfqkeys{/tkzdrawpt}{#1} + \foreach \point in {#2}{\node[point style,/tkzdrawpt/.cd,#1] at (\point) {};} %2016 +\endgroup } -\let\tkzLemoinePoint\tkzSymmedianCenter -\let\tkzGrebePoint\tkzSymmedianCenter -\let\tkzDefLemoinePoint\tkzLemoinePoint -%<--------------------------------------------------------------------------–> -% Spieker center -%<--------------------------------------------------------------------------–> -\def\tkzSpiekerCenter(#1,#2,#3){% -\begingroup -% we need to get the midpoints -\pgfcoordinate{tkz@m3}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#2}{center}}}}% -\pgfcoordinate{tkz@m2}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#3}{center}}}}% -\pgfcoordinate{tkz@m1}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}% - {\pgfpointanchor{#3}{center}}}}% -\tkzInCenter(tkz@m1,tkz@m2,tkz@m3) -\endgroup -} -\let\tkzDefSpiekerCenter\tkzSpiekerCenter -%<--------------------------------------------------------------------------–> -% Gergonne center Ge -%<--------------------------------------------------------------------------–> -\def\tkzGergonneCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzInCenter(#1,#2,#3) - \pgfnodealias{tkz@ptin}{tkzPointResult} - \tkzUProjection(#2,#3)(tkz@ptin) - \pgfnodealias{tkz@oca}{tkzPointResult} - \tkzUProjection(#1,#3)(tkz@ptin) - \pgfnodealias{tkz@ocb}{tkzPointResult} - \tkzInterLL(#1,tkz@oca)(#2,tkz@ocb) -\endpgfinterruptboundingbox -\endgroup +%<---------------------------------------------------------------------------> +% +%<---------------------------------------------------------------------------> +\def\tkzRenamePoint(#1)#2{\coordinate (#2) at (#1);} +\def\tkz@RenamePointEnd[#1]#2{\coordinate[#1] (#2) at (\tkz@ax,\tkz@ay);} +\def\tkzGetPoint#1{\coordinate (#1) at (tkzPointResult);} +\def\tkzGetPoints#1#2{\coordinate (#1) at (tkzFirstPointResult); + \coordinate (#2) at (tkzSecondPointResult);} +\def\tkzGetFirstPoint#1{\coordinate (#1) at (tkzFirstPointResult);} +\def\tkzGetSecondPoint#1{\coordinate (#1) at (tkzSecondPointResult);} +\def\tkzDefShiftPointCoord[#1](#2)#3{% + \begin{scope}[shift={(#1)}] + \coordinate (#3) at (#2); + \end{scope} + }% +%<---------------------------------------------------------------------------> +% tkzDefShiftPoint +%<---------------------------------------------------------------------------> +\def\tkzDefShiftPoint[#1](#2)#3{% + \tkz@@extractxy{#1} + \tkz@ax\pgf@x % + \tkz@ay\pgf@y % +\begin{scope}[shift={(\tkz@ax,\tkz@ay)}] + \coordinate (#3) at (#2); +\end{scope} } -\let\tkzDefGergonneCenter\tkzGergonneCenter -%<--------------------------------------------------------------------------–> -% Nagel center Na -%<--------------------------------------------------------------------------–> -% INa = 3 IG. Nagel point % correction 02/02/20 -\def\tkzNagelCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefExcentralTriangle(#1,#2,#3){tkz@a,tkz@b,tkz@c} - \tkzUProjection(#2,#3)(tkz@a) - \pgfnodealias{tkz@tgta}{tkzPointResult} - \tkzUProjection(#1,#2)(tkz@c) - \pgfnodealias{tkz@tgtc}{tkzPointResult} - \tkzInterLL(#1,tkz@tgta)(#3,tkz@tgtc) -\endpgfinterruptboundingbox -\endgroup +%<--------------------------------------------------------------------------> +% tkzLabelPoint Affichage des LABELS pour un point +%<--------------------------------------------------------------------------> +\def\tkzLabelPoint{\pgfutil@ifnextchar[{\tkz@LabelPoint}{\tkz@LabelPoint[]}} +\def\tkz@LabelPoint[#1](#2)#3{% + \node[label style,#1] at (#2) {#3};}% +%<---------------------------------------------------------------------------> + +\def\tkzLabelPoints{\pgfutil@ifnextchar[{\tkz@LabelPoints}{\tkz@LabelPoints[]}}% +\def\tkz@LabelPoints[#1](#2){% + \foreach \point in {#2}{ + \node[label style,#1] at (\point) {$\point$};} +}% +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzsetuppt/.cd, + size/.store in = \tkz@pt@size, + color/.store in = \tkz@pt@color, + fill/.store in = \tkz@pt@fill, + shape/.store in = \tkz@pt@shape, + size = \tkz@euc@pointsize, + color = \tkz@euc@pointcolor, + fill = \tkz@euc@pointcolor, + shape = \tkz@euc@pointshape, + /tkzsetuppt/.search also = {/tikz}, + } +\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{% + \tkz@SetUpPoint[]}} +\def\tkz@SetUpPoint[#1]{% +\pgfqkeys{/tkzsetuppt}{#1} +% redefine point style with new values +\tikzset{point style/.style={draw = \tkz@pt@color, + inner sep = 0pt, + shape = \tkz@pt@shape, + minimum size = \tkz@pt@size, + fill = \tkz@pt@fill}} +}% end setup +%<---------------------------------------------------------------------------> +% +%<---------------------------------------------------------------------------> +% \pgfkeys{/tkzsetuplabel/.cd, +% /tkzsetuplabel/.search also = {/tikz}, +% } +\def\tkzSetUpLabel{\pgfutil@ifnextchar[{\tkz@SetUpLabel}{% + \tkz@SetUpLabel[]}} +\def\tkz@SetUpLabel[#1]{% +%\pgfqkeys{/tkzsetuplabel}{#1} +% redefine point style with new values +\tikzset{label style/.style={#1}} +}% end setup +%<---------------------------------------------------------------------------> + +\pgfkeys{/tkzautolab/.cd, + center/.store in = \tkz@center, + dist/.store in = \tkz@dist, + dist = 0.15, + /tkzautolab/.search also = {/tikz}, } -\let\tkzDefNagelCenter\tkzNagelCenter -%<--------------------------------------------------------------------------–> -% Mittenpunkt -%<--------------------------------------------------------------------------–> -\def\tkzMittenpunktCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzExCenter(#2,#3,#1) - \pgfnodealias{tkz@a}{tkzPointResult} - \tkzExCenter(#3,#1,#2) - \pgfnodealias{tkz@b}{tkzPointResult} - \pgfcoordinate{tkz@ma}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}}}% - \pgfcoordinate{tkz@mb}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}}}% - \tkzInterLL(tkz@a,tkz@ma)(tkz@b,tkz@mb) - \endpgfinterruptboundingbox +\def\tkzAutoLabelPoints{\pgfutil@ifnextchar[{\tkz@AutoLabelPoints}{\tkz@AutoLabelPoints[]}}% +\def\tkz@AutoLabelPoints[#1](#2){% +\begingroup +\pgfqkeys{/tkzautolab}{#1} + \foreach \point in {#2}{ + \path (\tkz@center) -- ($ (\point) + \tkz@dist*($(\point)-(\tkz@center)$) $) node[/tkzautolab/.cd,#1]{$\point$};} \endgroup +}% +%<---------------------------------------------------------------------------> +% PointShowCoord +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzprcoord/.cd, + xlabel/.store in = \tkz@xlabel, + ylabel/.store in = \tkz@ylabel, + xstyle/.code = {\tikzset{xcoord style/.append style={#1}}}, + ystyle/.code = {\tikzset{ycoord style/.append style={#1}}}, + noxdraw/.is if = tkz@coord@noxdraw, + noxdraw/.default = true, + noydraw/.is if = tkz@coord@noydraw, + noydraw/.default = true, + xlabel = {}, + ylabel = {}, + xstyle = {}, + ystyle = {}, + noxdraw = false, + noydraw = false, + /tkzprcoord/.search also = {/tikz}, } -\let\tkzDefMittenpunktCenter\tkzMittenpunktCenter -\let\tkzDefMiddlespoint\tkzMittenpunktCenter -%<--------------------------------------------------------------------------–> -% Feuerbach point -%<--------------------------------------------------------------------------–> -\def\tkzFeuerbachCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzEulerCenter(#1,#2,#3) - \pgfnodealias{tkz@euler}{tkzPointResult} - \tkzInCenter(#1,#2,#3) - \pgfnodealias{tkz@in}{tkzPointResult} - \tkzUProjection(#2,#3)(tkzPointResult) - \tkzInterLC(tkz@in,tkz@euler)(tkz@in,tkzPointResult)\tkzGetFirstPoint{tkz@fe} - \tkzRenamePoint(tkz@fe){tkzPointResult} - \endpgfinterruptboundingbox +\def\tkzPointShowCoord{\pgfutil@ifnextchar[{\tkz@PointShowCoord}{\tkz@PointShowCoord[]}} +\def\tkz@PointShowCoord[#1](#2){% +\begingroup +\pgfqkeys{/tkzprcoord}{#1} +% 2019 for showcoord + \iftkznodedefined{tkz@xline}{}{% + \path (0,0) --(1,0) node(tkz@xline){}; + \path (0,0) --(0,1) node(tkz@yline){}; + } +\iftkz@coord@noxdraw\else\draw[arrow coord style,/tkzprcoord/.cd,#1] (#2)--(#2 |- tkz@xline);\fi +\iftkz@coord@noydraw\else\draw[arrow coord style,/tkzprcoord/.cd,#1] (#2)--(#2 -| tkz@yline);\fi +\ifx\tkzutil@empty\tkz@xlabel +\else +\path (#2)--(#2 |- tkz@xline) + node[xcoord style] {\tkz@xlabel}; +\fi +\ifx\tkzutil@empty\tkz@ylabel +\else + \path (#2)--(#2 -| tkz@yline) + node[ycoord style] {\tkz@ylabel}; +\fi \endgroup } -\let\tkzDefFeuerbachCenter\tkzFeuerbachCenter -%<--------------------------------------------------------------------------–> -% Orthogonal center -%<--------------------------------------------------------------------------–> -\def\tkzOrthogonalCenter(#1,#2){% +\let\tkzShowPointCoord\tkzPointShowCoord +%<---------------------------------------------------------------------------> +% Coordonnées d'un point +% result in #2x et #2y #1 est le point et on récupère ses coordonnées +% usage soit A un point \tkzGetPointCoord(A){V} alors \Vx = xA et \Vy = yA +% en cm +% tkzGetPointCoord avec [#1] cm ou bien pt ?? todo +%<---------------------------------------------------------------------------> +\def\tkzGetPointCoord(#1)#2{% \begingroup -\pgfinterruptboundingbox - \tkz@VecK[\tkz@koeff/(1+\tkz@koeff)](#1,#2) - \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2) - \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) -\endpgfinterruptboundingbox + \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} + \pgfmathparse{\pgf@sys@tonumber{\pgf@x}/28.45274} + \global\let\tkzresultx\pgfmathresult + \global\expandafter\edef\csname #2x\endcsname{\tkzresultx}% + \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} + \pgfmathparse{\pgf@sys@tonumber{\pgf@y}/28.45274} + \global\let\tkzresulty\pgfmathresult + \global\expandafter\edef\csname #2y\endcsname{\tkzresulty} \endgroup +} +\def\tkz@@extractxy#1{% +\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} +\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} } -%<--------------------------------------------------------------------------–> -% End Triangle center -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% Projection center of excircles -%<--------------------------------------------------------------------------–> -\def\tkzDefProjExcenter{\pgfutil@ifnextchar[{% - \tkz@DefProjExcenter}{% - \tkz@DefProjExcenter[]} - } -\def\tkz@DefProjExcenter[#1](#2,#3,#4)(#5)#6{ -\begingroup - \SetUpPTTR{#1} - \foreach \name [count=\i] in {#5} {% - \global\expandafter\edef\csname tkz@pt\i\endcsname{\name} - } - \foreach \name [count=\i] in {#6} {% - \global\expandafter\edef\csname tkz@ppt\i\endcsname{\name} - } -\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) -\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) -\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) -\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) -\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) -\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) -\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt1\endcsname) -\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt2\endcsname) -\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt3\endcsname) -\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} -\endgroup -} -%<--------------------------------------------------------------------------–> -% Point on circle -%<--------------------------------------------------------------------------–> -\pgfkeys{/tkzptcircle/.cd, - angle/.store in = \tkz@angle, - angle = 0 , - center/.store in = \tkz@center, - radius/.store in = \tkz@radius -} -\def\tkzDefPointOnCircle{\pgfutil@ifnextchar[{\tkz@DefPointOnCircle}{\tkz@DefPointOnCircle[]}} -\def\tkz@DefPointOnCircle[#1]{% -\begingroup -\pgfqkeys{/tkzptcircle}{#1} -\path (\tkz@center) --++(\tkz@angle:\tkz@radius) coordinate(tkzPointResult); -\endgroup -} -%<--------------------------------------------------------------------------–> -% Point on line -%<--------------------------------------------------------------------------–> -\def\tkzDefPointOnLine{\pgfutil@ifnextchar[{\tkz@DefPointOnLine}{\tkz@DefPointOnLine[]}} -\def\tkz@DefPointOnLine[#1](#2,#3){% -\begingroup -\path (#2) to [#1] coordinate (tkzPointResult) (#3); -\endgroup -} - +\let\tkzGetPointxy\tkzGetPointCoord \makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-polygons.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-polygons.tex index 32353d145f..71305cd9a7 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-polygons.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-polygons.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-polygons.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,13 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-polygons.tex} -% bug in regular polygon side 2020/03/18 + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-polygons.tex} +% bug in regular polygon side 2020/03/09 \makeatletter %<--------------------------------------------------------------------------–> % Polygon @@ -25,9 +23,9 @@ %<--------------------------------------------------------------------------–> \def\tkzDefSquare(#1,#2){ \begingroup - \tkzURotateAngle(#2,-90)(#1) + \tkzURotateAngle(#2,-90)(#1) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzURotateAngle(#1, 90)(#2) + \tkzURotateAngle(#1, 90)(#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } @@ -39,11 +37,21 @@ \tkzDefPointWith[colinear= at #3](#2,#1) \endgroup } +%<--------------------- rectangle ---------------------------------–> +% +%<--------------------------------------------------------------------------–> + +\def\tkzDefRectangle{\pgfutil@ifnextchar[{\tkz@DefRectangle}% + {\tkz@DefRectangle[]}} +\def\tkz@DefRectangle[#1](#2,#3){% +\begingroup + \path[#1](#2) -| coordinate (tkzFirstPointResult) (#3) -| coordinate (tkzSecondPointResult) (#2); +\endgroup +} %<-------------------------- gold rectangle -------------------------------–> % %<--------------------------------------------------------------------------–> - \def\tkzDefGoldRectangle(#1,#2){ \begingroup \tkzDefPointWith[K=-\tkzInvPhi](#2,#1) @@ -52,18 +60,16 @@ \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } -\def\tkzDrawGoldRectangle{\pgfutil@ifnextchar[{\tkz@DrawGoldRectangle}{% - \tkz@DrawGoldRectangle[]}} - +\let\tkzDefGoldenRectangle\tkzDefGoldRectangle %<---------------------------- Regular Polygon -------------------------–> \def\tkz@numregpol{0} \pgfkeys{/defregpoly/.cd, - name/.store in = \tkz@regpolname, - sides/.store in = \tkz@regpolsides, - center/.code = \def\tkz@numregpol{0}, - side/.code = \def\tkz@numregpol{1}, - name/.default = P, - sides/.default = 5, + name/.store in = \tkz@regpolname, + sides/.store in = \tkz@regpolsides, + center/.code = \def\tkz@numregpol{0}, + side/.code = \def\tkz@numregpol{1}, + name/.default = P, + sides/.default = 5, center } \def\tkzDefRegPolygon{\pgfutil@ifnextchar[{\tkz@DefRegPolygon}{\tkz@DefRegPolygon[]}} @@ -94,7 +100,7 @@ \pgfmathsetmacro{\tkz@regangleside}{(180-\tkz@regangle)/2} \tkzDefMidPoint(#1,#2) \pgfnodealias{tkz@tempPt}{tkzPointResult} -\tkzCalcLength[cm](tkz@tempPt,#1) \tkzGetLength{tkz@len} +\tkz@@CalcLengthcm(tkz@tempPt,#1){tkz@len} \pgfmathsetmacro{\tkz@inscriberadius}{% \tkz@len*tan(90*(\tkz@regpolsides-2)/\tkz@regpolsides)} \tkzDefPointWith[orthogonal normed,K=\tkz@inscriberadius](tkz@tempPt,#2) @@ -104,16 +110,6 @@ \endgroup } -%<---------------------------- CLIP --------------------------------–> -% -%<--------------------------------------------------------------------------–> -\def\tkzClipPolygon(#1,#2){% -\path[clip] (#1) - \foreach \pt in {#1,#2}{--(\pt)}--cycle; -} - \def\tkzClipOutPolygon(#1,#2){\clip[tkzreverseclip] (#1) - \foreach \pt in {#1,#2}{--(\pt)}--cycle; -} \makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-protractor.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-protractor.tex index dcc5a1081d..7c1c1cb9ea 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-protractor.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-protractor.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-protractor.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,14 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} - \typeout{2020/03/18 3.06c tkz-obj-eu-protractor.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-protractor.tex} \makeatletter %<--------------------------------------------------------------------------–> % !!! idea from Y. Combe !!! @@ -75,7 +73,7 @@ \draw [>=stealth',->, thick,black] (0:2) arc(0:-32:2); \draw [>=stealth',->, thick,black] (0:1.5) arc(0:-32:1.5); } -\global\let\tkz@@Protractor\FullProtractor + \pgfkeys{ protractor/.cd, lw/.code = {\def\cmdMO@Rap@lw{#1}}, @@ -83,29 +81,28 @@ rotate/.code = {\def\cmdMO@Rap@rotate{#1}}, scale/.code = {\def\cmdMO@Rap@scale{#1}}, return/.is if = tkz@RappReturn, - return/.default = true, - /protractor/.search also={/tikz} + return/.code = \tkz@RappReturnfalse, + /protractor/.search also={/tikz}, + lw = 0.4pt, + scale=1, + shift={(0,0)}, + rotate=0 } - \def\tkzProtractor{\pgfutil@ifnextchar[{\tkz@Protractor}{\tkz@Protractor[]}} \def\tkz@Protractor[#1](#2,#3){% - \pgfkeys{% - /protractor/.cd, - shift={(0,0)}, - rotate=0, - lw=0.4pt, - scale =1, - return=false - } +\tkz@RappReturntrue \pgfqkeys{/protractor}{#1} \tkz@@extractxy{#2} \global\tkz@ax\pgf@x \global\tkz@ay\pgf@y \tkzFindSlopeAngle(#2,#3) \tkzGetAngle{cmdMO@Rap@rotate}% + \global\let\tkz@@Protractor\FullProtractor% \iftkz@RappReturn \global\let\tkz@@Protractor\FullProtractorReturn + \else + \global\let\tkz@@Protractor\FullProtractor \fi \pgfmathsetlengthmacro{\MO@lw}{\cmdMO@Rap@lw * \cmdMO@Rap@scale} \begin{scope}[shift = {(\tkz@ax,\tkz@ay)},% diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-sectors.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-sectors.tex index 3d178a2586..010af2ade7 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-sectors.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-sectors.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-sectors.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,24 +7,21 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-sectors.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-sectors.tex} \makeatletter %<----------------------- Sectors ------------------------------–> -\tikzset{sstyle/.style={#1}} \gdef\tkz@nums{0} \pgfkeys{/drawsector/.cd, - towards/.code = {\def\tkz@nums{0}}, - rotate/.code = {\def\tkz@nums{1}}, - R/.code = {\def\tkz@nums{2}}, - R with nodes/.code = {\def\tkz@nums{3}}, - towards, + towards/.code = {\def\tkz@nums{0}}, + rotate/.code = {\def\tkz@nums{1}}, + R/.code = {\def\tkz@nums{2}}, + R with nodes/.code = {\def\tkz@nums{3}}, + towards, /drawsector/.search also = {/tikz}, } @@ -63,8 +60,8 @@ \edef\tkz@SecondAngle{\pgfmathresult}% \fi \fi - \draw[shift = {(#2)},/drawsector/.cd,#1]% - (#2) --(\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3)--cycle; + \draw[shift = {(#2)},/drawsector/.cd,#1]% + (#2) --(\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3)--cycle; \endgroup } % revoir il y a plus simple que ce shift !!! %<--------------------------------------------------------------------------–> @@ -74,10 +71,10 @@ \tkz@DrawSectorN[]}} \def\tkz@DrawSectorN[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,% + \tkz@DrawSectorRAngles[#1](#2,\tkz@radius)(\tkz@FirstAngle,% \tkz@SecondAngle) \endgroup } @@ -88,15 +85,15 @@ \tkz@DrawSectorRotate[]}} \def\tkz@DrawSectorRotate[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstA} \pgfmathadd{\tkz@FirstA}{#4} - \edef\tkz@SecondA{\pgfmathresult} + \edef\tkz@SecondA{\pgfmathresult} \pgfmathgreaterthan{#4}{0} \ifdim\pgfmathresult pt=1 pt\relax% - \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstA,\tkz@SecondA) + \tkz@DrawSectorRAngles[#1](#2,\tkz@radius)(\tkz@FirstA,\tkz@SecondA) \else - \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@SecondA,\tkz@FirstA) + \tkz@DrawSectorRAngles[#1](#2,\tkz@radius)(\tkz@SecondA,\tkz@FirstA) \fi \endgroup } @@ -107,7 +104,7 @@ \tkz@DrawSectorAngles[]}} \def\tkz@DrawSectorAngles[#1](#2,#3)(#4,#5){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#2,#3){tkz@radius} \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(#4,#5) \endgroup } @@ -115,28 +112,16 @@ % \tkzDrawSectorRwithNodesAngles(O,A,B)(ang1,ang2) %<--------------------------------------------------------------------------–> \def\tkzDrawSectorRwithNodesAngles{\pgfutil@ifnextchar[{% - \tkz@DrawSectorRwithNodesAngles}{% - \tkz@DrawSectorRwithNodesAngles[]}} + \tkz@DrawSectorRwithNodesAngles}{% + \tkz@DrawSectorRwithNodesAngles[]}} \def\tkz@DrawSectorRwithNodesAngles[#1](#2,#3,#4)(#5,#6){% \begingroup - \tkzCalcLength(#3,#4)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#3,#4){tkz@radius} \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(#5,#6) \endgroup } % %<--------------------------------------------------------------------------–> -% % \tkzDrawSectorRwithNodes(O,A,B)(C,D) center O radius AB from C to D -% %<--------------------------------------------------------------------------–> -% \def\tkzDrawSectorRwithNodes{\pgfutil@ifnextchar[{% -% \tkz@DrawSectorRwithNodes}{% -% \tkz@DrawSectorRwithNodes[]}} -% \def\tkz@DrawSectorRwithNodes[#1](#2,#3,#4)(#5,#6){% -% \begingroup -% \tkzCalcLength(#3,#4){tkz@rad} -% \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@FirstAngle} -% \tkzFindSlopeAngle(#2,#6)\tkzGetAngle{tkz@SecondAngle} -% \tkz@DrawSectorRAngles[#1](#2,\tkz@rad)(\tkz@FirstAngle,\tkz@SecondAngle) -% \endgroup -% } + %<--------------------------------------------------------------------------–> % \tkzDrawSectorR(O, rad)(A,B) %<--------------------------------------------------------------------------–> @@ -150,18 +135,16 @@ \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> % Fill %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \gdef\tkz@nums{0} \pgfkeys{/@fillsector/.cd, - towards/.code = {\def\tkz@nums{0}}, - rotate/.code = {\def\tkz@nums{1}}, - R/.code = {\def\tkz@nums{2}}, - R with nodes/.code = {\def\tkz@nums{3}}, - towards, - /@fillsector/.search also={/tikz}, + towards/.code = {\def\tkz@nums{0}}, + rotate/.code = {\def\tkz@nums{1}}, + R/.code = {\def\tkz@nums{2}}, + R with nodes/.code = {\def\tkz@nums{3}}, + towards, + /@fillsector/.search also={/tikz}, } \def\tkzFillSector{\pgfutil@ifnextchar[{\tkz@FillSector}{\tkz@FillSector[]}} @@ -200,9 +183,9 @@ \pgfmathadd{\tkz@SecondAngle}{360} \edef\tkz@SecondAngle{\pgfmathresult}% \fi\fi - \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \pgfmathsubtract{\tkz@FirstAngle}{0} \edef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \pgfmathadd{\tkz@SecondAngle}{0} \edef\tkz@SecondAngle{\pgfmathresult} \path[shift = {(#2)},/@fillsector/.cd,fill=\tkz@fillcolor,#1] (#2) -- % (\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3)--cycle; @@ -214,7 +197,7 @@ \def\tkzFillSectorN{\pgfutil@ifnextchar[{\tkz@FillSectorN}{\tkz@FillSectorN[]}} \def\tkz@FillSectorN[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} \tkz@FillSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,% @@ -228,7 +211,7 @@ \tkz@FillSectorRotate[]}} \def\tkz@FillSectorRotate[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstA} \pgfmathadd{\tkz@FirstA}{#4} \edef\tkz@SecondA{\pgfmathresult} @@ -247,7 +230,7 @@ \tkz@FillSectorAngles[]}} \def\tkz@FillSectorAngles[#1](#2,#3)(#4,#5){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#2,#3){tkz@radius} \tkz@FillSectorRAngles[#1](#2,\tkz@radius pt)(#4,#5) \endgroup } @@ -293,7 +276,7 @@ %<--------------------------------------------------------------------------–> \def\tkz@ClipSectorRotate(#1,#2)(#3){% \begingroup - \tkzCalcLength(#1,#2)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#1,#2){tkz@radius} \tkzFindSlopeAngle(#1,#2)\tkzGetAngle{tkz@FirstA} \pgfmathadd{\tkz@FirstA}{#3} \edef\tkz@SecondA{\pgfmathresult} @@ -308,10 +291,9 @@ %<--------------------------------------------------------------------------–> % %<--------------------------------------------------------------------------–> - \def\tkz@ClipSectorN(#1,#2)(#3){% \begingroup - \tkzCalcLength(#1,#2)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#1,#2){tkz@radius} \tkzFindSlopeAngle(#1,#2)\tkzGetAngle{tkz@FirstAngle} \tkzFindSlopeAngle(#1,#3)\tkzGetAngle{tkz@SecondAngle} \tkz@ClipSectorRAngles(#1,\tkz@radius pt)(\tkz@FirstAngle,\tkz@SecondAngle) @@ -321,16 +303,15 @@ %<--------------------------------------------------------------------------–> \def\tkz@numcs{0} \pgfkeys{/clipsector/.cd, - towards/.code = {\def\tkz@numcs{0}}, - rotate/.code = {\def\tkz@numcs{1}}, - R/.code = {\def\tkz@numcs{2}}, + towards/.code = {\def\tkz@numcs{0}}, + rotate/.code = {\def\tkz@numcs{1}}, + R/.code = {\def\tkz@numcs{2}}, } %<--------------------------------------------------------------------------–> \def\tkzClipSector{\pgfutil@ifnextchar[{\tkz@ClipSector}{% \tkz@ClipSector[]}} \def\tkz@ClipSector[#1](#2,#3)(#4){% -\begingroup \pgfkeys{/clipsector/.cd} \pgfqkeys{/clipsector}{#1} \ifcase\tkz@numcs% @@ -340,7 +321,6 @@ \or% 2 \tkz@ClipSectorRAngles(#2,#3)(#4) \fi -\endgroup } \makeatother -\endinput
\ No newline at end of file +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-show.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-show.tex index 281eee5d9c..61b7d69c07 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-show.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-show.tex @@ -1,5 +1,5 @@ %tkz-obj-eu-show.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,14 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-show.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-show.tex} \makeatletter %<--------------------------------------------------------------------------–> % finding specific points in a triangle @@ -26,8 +24,8 @@ from/.store in = {\tkz@frompoint}, dist/.store in = {\tkz@equ@dist}, show/.is if = tkz@equi@show, - dist = 2, - show = false, + dist = 2, + show = false, /tkzEquiPt/.search also={/tikz} } @@ -43,8 +41,8 @@ \tkzVecKNorm[-\tkz@equ@dist](tkzEQpoint,#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \iftkz@equi@show - \tkzCompass[#1](\tkz@frompoint,tkzFirstPointResult) - \tkzCompass[#1](\tkz@frompoint,tkzSecondPointResult) + \tkzCompass[compass style,#1](\tkz@frompoint,tkzFirstPointResult) + \tkzCompass[compass style,#1](\tkz@frompoint,tkzSecondPointResult) \fi \endgroup } @@ -58,15 +56,15 @@ \def\tkz@through{#1}}, orthogonal/.code args = {through #1} {\global\def\tkz@numsh{1}% \global\def\tkz@through{#1}}, - parallel/.code args = {through #1} {\global\def\tkz@numsh{2}% + parallel/.code args = {through #1} {\global\def\tkz@numsh{2}% \global\def\tkz@through{#1}}, - bisector/.code = \global\def\tkz@numsh{3}, - K/.code = \def\tkz@koeff{#1}, - length/.code = \def\tkz@show@length{#1}, - ratio/.code = \def\tkz@show@ratio{#1}, - gap/.code = \def\tkz@show@gap{#1}, - size/.code = \def\tkz@show@size{#1}, - /show/.unknown/.code = {\let\searchname=\pgfkeyscurrentname + bisector/.code = \global\def\tkz@numsh{3}, + K/.code = \def\tkz@koeff{#1}, + length/.code = \def\tkz@show@length{#1}, + ratio/.code = \def\tkz@show@ratio{#1}, + gap/.code = \def\tkz@show@gap{#1}, + size/.code = \def\tkz@show@size{#1}, + /show/.unknown/.code = {\let\searchname=\pgfkeyscurrentname \pgfkeysalso{\searchname/.try=#1, /tkzcompass/\searchname/.retry=#1, /tikz/\searchname/.retry=#1}% @@ -76,10 +74,10 @@ \def\tkz@ShowLine[#1](#2){% \begingroup \pgfqkeys{/show}{ K = 1, - gap = 2, - ratio = .5, - length = 1, - size = 1 + gap = 2, + ratio = .5, + length = 1, + size = 1 } \pgfqkeys{/show}{#1} \ifcase\tkz@numsh% @@ -100,8 +98,8 @@ \def\tkz@ShowMediatorLine[#1](#2,#3){% \begingroup \pgfkeys{show/.cd, gap = 2, - ratio = .5, - length = 1 + ratio = .5, + length = 1 } \pgfkeys{show/.cd,#1} \path (#2) -- (#3) coordinate[pos=.5](tkzmidpoint); @@ -117,10 +115,10 @@ \pgfnodealias{MED@1}{tkzPointResult} \tkz@VecKNorm[\tkz@show@gap](tkzmidpoint,MED@tmp2) \pgfnodealias{MED@2}{tkzPointResult} - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@1) - \tkzCompass[#1](#3,MED@1) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@2) - \tkzCompass[#1](#3,MED@2) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@1) + \tkzCompass[compass style,#1](#3,MED@1) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@2) + \tkzCompass[compass style,#1](#3,MED@2) \endgroup } \def\tkzShowLLLine{\pgfutil@ifnextchar[{\tkz@ShowLLLine}{\tkz@ShowLLLine[]}} @@ -130,8 +128,8 @@ \pgfkeys{show/.cd,#1} \tkz@VecKCoLinear[1](#2,#3,#4) \pgfnodealias{tkz@lltmp}{tkzPointResult} - \tkzCompass[#1](#4,tkz@lltmp) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) + \tkzCompass[compass style,#1](#4,tkz@lltmp) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) \endgroup } @@ -155,8 +153,7 @@ \pgfnodealias{tkzPointCo}{tkzPointResult} \tkzInterLL(#2,#3)(#4,tkzPointCo) \pgfnodealias{tkzPOpoint}{tkzPointResult} - \tkzCalcLength(#4,tkzPOpoint) - \tkzGetLength{tkz@mathLen} + \tkz@@CalcLength(#4,tkzPOpoint){tkz@mathLen} \tkz@VecKNorm[1](#2,#3) \pgfnodealias{PO@tmp}{tkzPointResult} \tkz@VecKCoLinear[1](#2,PO@tmp,tkzPOpoint) @@ -176,10 +173,10 @@ \fi \tkz@VecKCoLinear[-\tkz@show@gap](PO@tmp1,tkzPOpoint,tkzPOpoint) \pgfnodealias{PO@3}{tkzPointResult} - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@1) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@2) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](PO@1,PO@3) - \tkzCompass[#1,length=\tkz@show@length](PO@2,PO@3) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@1) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@2) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](PO@1,PO@3) + \tkzCompass[compass style,#1,length=\tkz@show@length](PO@2,PO@3) \endgroup } %<-------------------------------------------------------------------------–> @@ -190,9 +187,10 @@ \def\tkz@ShowBisectorLine[#1](#2,#3,#4){% \begingroup \pgfkeys{show/.cd, gap = 2, - ratio =. 5, - length = 1, - size = 1} + ratio =. 5, + length = 1, + size = 1 + } \pgfkeys{show/.cd,#1} \tkzVecKNorm(#3,#2) \pgfnodealias{tkz@pt1}{tkzPointResult} @@ -212,10 +210,10 @@ \pgfnodealias{BI@2}{tkzPointResult} \tkzVecK[\tkz@show@gap](#3,tkzBisPoint) \pgfnodealias{tkzBisPoint}{tkzPointResult} - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@1) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@2) - \tkzCompass[#1,length=\tkz@show@length](BI@1,tkzBisPoint) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](BI@2,tkzBisPoint) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@1) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@2) + \tkzCompass[compass style,#1,length=\tkz@show@length](BI@1,tkzBisPoint) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](BI@2,tkzBisPoint) \endgroup } %<--------------------------------------------------------------------------–> @@ -269,22 +267,20 @@ translation/.code args={from #1 to #2}{% \or% 3 \tkzShowTranslation[#1](\tkzfrom,\tkzto)(#2) \fi - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowTranslation{\pgfutil@ifnextchar[{\tkz@ShowTranslation}{% \tkz@ShowTranslation[]}} \def\tkz@ShowTranslation[#1](#2,#3)(#4){% \begingroup \tkz@VecKCoLinear[1](#2,#3,#4) \pgfnodealias{tkz@lltmp}{tkzPointResult} -\tkzCompass[#1](#4,tkz@lltmp) -\tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) +\tkzCompass[compass style,#1](#4,tkz@lltmp) +\tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) \endgroup} %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowSymOrth{\pgfutil@ifnextchar[{\tkz@ShowSymOrth}{% \tkz@ShowSymOrth[]}} \def\tkz@ShowSymOrth[#1](#2,#3)(#4){% @@ -298,14 +294,13 @@ translation/.code args={from #1 to #2}{% \pgfnodealias{tkzPointofSym}{tkzPointResult} \tkz@VecK[2](#4,tkzPointofSym) \pgfnodealias{tkz@pointtsf}{tkzPointResult} - \tkzCompass[#1](#2,#4) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,#4) - \tkzCompass[#1](#2,tkz@pointtsf) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@pointtsf) + \tkzCompass[compass style,#1](#2,#4) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,#4) + \tkzCompass[compass style,#1](#2,tkz@pointtsf) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@pointtsf) \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowCSym{\pgfutil@ifnextchar[{\tkz@ShowCSym}{\tkz@ShowCSym[]}} \def\tkz@ShowCSym[#1](#2)(#3){% @@ -315,12 +310,11 @@ translation/.code args={from #1 to #2}{% \tkz@ax=\pgf@x% \tkz@ay=\pgf@y% \path[coordinate](#2)--++(-\tkz@ax,-\tkz@ay) coordinate (tkz@pointtsf); - \tkzCompass[#1](#2,tkz@pointtsf) - \tkzCompass[#1](#2,#3) + \tkzCompass[compass style,#1](#2,tkz@pointtsf) + \tkzCompass[compass style,#1](#2,#3) \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowProjection{\pgfutil@ifnextchar[{\tkz@ShowProjection}{% \tkz@ShowProjection[]}} \def\tkz@ShowProjection[#1](#2,#3)(#4){% @@ -342,12 +336,11 @@ translation/.code args={from #1 to #2}{% \pgfnodealias{SO@2}{tkzPointResult} \tkz@VecKNorm[-\tkz@show@gap](tkz@pointtsf,#4) \pgfnodealias{SO@3}{tkzPointResult} - \tkzCompass[#1](#4,SO@1) - \tkzCompass[#1](#4,SO@2) - \tkzCompass[#1](SO@1,SO@3) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](SO@2,SO@3) + \tkzCompass[compass style,#1](#4,SO@1) + \tkzCompass[compass style,#1](#4,SO@2) + \tkzCompass[compass style,#1](SO@1,SO@3) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](SO@2,SO@3) \endgroup } -%<-------------------------------------------------------------------------–> \makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-triangles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-triangles.tex index 41332b9f6e..f60491ac38 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-triangles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-triangles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-triangles.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-triangles.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-triangles.tex} \makeatletter %<--------------------------------------------------------------------------–> % Triangle Equilateral @@ -27,6 +24,16 @@ \endgroup } %<--------------------------------------------------------------------------–> +% Triangle Isosceles Right +%<--------------------------------------------------------------------------–> +\def\tkzDefIsoscelesRightTriangle(#1,#2){ +\begingroup + \tkzURotateAngle(#1,45)(#2) + \pgfnodealias{tkz@a}{tkzPointResult} + \tkzUHomo(#1,\tkzSqrTwobyTwo)(tkz@a) +\endgroup +} +%<--------------------------------------------------------------------------–> \def\tkzDrawEquilateral{\pgfutil@ifnextchar[{\tkz@Equilateral}{% \tkz@Equilateral[]}} @@ -37,12 +44,24 @@ \tkzDrawPolygon[#1](#2,#3,tkzPointResult) \endgroup } + +%<--------------------------------------------------------------------------–> + +\def\tkzDefIsoscelesRightTriangle{\pgfutil@ifnextchar[{\tkz@DefIsoscelesRightTriangle}{% + \tkz@DefIsoscelesRightTriangle[]}} + +\def\tkz@DefIsoscelesRightTriangle[#1](#2,#3){% +\begingroup + \tkzURotateAngle(#2,45)(#3) + \pgfnodealias{tkz@a}{tkzPointResult} + \tkzUHomo(#2,\tkzSqrTwobyTwo)(tkz@a) + \tkzDrawPolygon[#1](#2,#3,tkzPointResult) +\endgroup +} %<--------------------------------------------------------------------------–> % Triangle OneTwo %<--------------------------------------------------------------------------–> -\def\tkzPhi{1.618034} -\def\tkzInvPhi{0.618034} -\def\tkzSqrtPhi{1.27202} + \def\tkzDefTwoOne(#1,#2){ \begingroup @@ -56,7 +75,7 @@ } \def\tkzDefSchoolTriangle(#1,#2){ \begingroup - \tkzDefPointWith[K=-1](#2,#1) + \tkzDefPointWith[K=-1](#2,#1) \pgfnodealias{tkz@a}{tkzPointResult} \tkzURotateAngle(#1,30)(#2) \tkzInterLL(#1,tkzPointResult)(#2,tkz@a) @@ -106,12 +125,13 @@ school/.code = \def\tkz@numtr{3}, golden/.code = \def\tkz@numtr{4}, sublime/.code = \def\tkz@numtr{4}, - euclide/.code = \def\tkz@numtr{5}, + euclid/.code = \def\tkz@numtr{5}, gold/.code = \def\tkz@numtr{6}, cheops/.code = \def\tkz@numtr{7}, two angles/.code args = {#1 and #2} { \def\tkz@numtr{8}% \def\tkz@alpha{#1}% \def\tkz@beta{#2}}, + isosceles right/.code = \def\tkz@numtr{9}, equilateral } @@ -138,6 +158,8 @@ \tkzDefCheopsTriangle(#2,#3) \or% 8 \tkzDefTwoAnglesTriangle(#2,#3) + \or% 9 + \tkzDefIsoscelesRightTriangle(#2,#3) \fi \endgroup } @@ -162,7 +184,7 @@ feuerbach/.code = \def\tkz@numtspc{6}, euler/.code = \def\tkz@numtspc{7}, tangential/.code = \def\tkz@numtspc{8}, - symmedian/.code = \def\tkz@numtspc{9}, + symmedial/.code = \def\tkz@numtspc{9}, name/.store in = \tkz@pttr@name, name = {}, centroid, @@ -191,7 +213,7 @@ \or% 8 \tkzDefTangentialTriangle(#2){#3} \or% 8 - \tkzDefSymmedianTriangle(#2){#3} + \tkzDefSymmedialTriangle(#2){#3} \fi \endgroup } @@ -201,10 +223,8 @@ \def\SetUpPTTR#1{\pgfqkeys{/setuppttr}{#1}} \pgfkeys{/setuppttr/.cd, name/.store in = \tkz@pttr@name, - name = {} + name = {} } -\def\tkz@recuplast(#1,#2){\def\tkz@last{#1}} -\def\tkz@stop{\tkz@stop} %<--------------------------------------------------------------------------– % InCentral %<--------------------------------------------------------------------------– @@ -214,9 +234,8 @@ \tkz@recuplast(#3) \tkzDefBisectorLine(#2,#1,\tkz@last) \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefIncentralTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefIncentralTriangle{\pgfutil@ifnextchar[{% @@ -241,9 +260,8 @@ \def\tkz@tmp{#5}% \tkz@recuplast(#3) \tkzDefExCircle(#2,#1,\tkz@last) - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefExcentralTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefExcentralTriangle{\pgfutil@ifnextchar[{% @@ -264,9 +282,8 @@ \def\tkz@tmp{#5}% \tkz@recuplast(#3) \tkzUProjection(#2,\tkz@last)(tkz@pt) - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefIntouchTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefIntouchTriangle{\pgfutil@ifnextchar[{% @@ -295,7 +312,10 @@ \foreach \name [count=\i] in {#5} {% \global\expandafter\edef\csname tkz@point\i\endcsname{\name} } + \begingroup + \def\tkz@pttr@name{} \tkzDefExcentralTriangle(#2,#3,#4){tkz@a,tkz@b,tkz@c} + \endgroup \tkzUProjection(#3,#4)(tkz@a) \pgfnodealias{\tkz@pttr@name\csname tkz@point1\endcsname}{tkzPointResult} \tkzUProjection(#2,#3)(tkz@c) @@ -322,11 +342,11 @@ \pgfnodealias{tkz@c}{tkzPointResult} \tkzGetLength{tkz@rc} \tkzDefExCircle(#4,#2,#3) \pgfnodealias{tkz@a}{tkzPointResult} \tkzGetLength{tkz@ra} - \tkzInterLC[R](#3,tkz@b)(tkz@b,\tkz@rb pt) + \tkzInterLC[R](#3,tkz@b)(tkz@b,\tkz@rb) \tkzGetFirstPoint{\tkz@pttr@name\csname tkz@point2\endcsname} - \tkzInterLC[R](#4,tkz@c)(tkz@c,\tkz@rc pt) + \tkzInterLC[R](#4,tkz@c)(tkz@c,\tkz@rc) \tkzGetFirstPoint{\tkz@pttr@name\csname tkz@point3\endcsname} - \tkzInterLC[R](#2,tkz@a)(tkz@a,\tkz@ra pt) + \tkzInterLC[R](#2,tkz@a)(tkz@a,\tkz@ra) \tkzGetFirstPoint{\tkz@pttr@name\csname tkz@point1\endcsname} \endgroup } @@ -337,13 +357,12 @@ \def\@DefCentroidTriangle(#1,#2,#3)(#4,#5){% \def\tkz@tmp{#5}% \tkz@recuplast(#3) - \pgfcoordinate{#4}{% + \pgfcoordinate{\tkz@pttr@name#4}{% \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}% + \pgfpointadd{\pgfpointanchor{#2}{center}}% {\pgfpointanchor{\tkz@last}{center}}} }% \ifx\tkz@tmp\tkz@stop\else\@DefCentroidTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefCentroidTriangle{\pgfutil@ifnextchar[{\tkz@DefCentroidTriangle} {\tkz@DefCentroidTriangle[]}} @@ -361,12 +380,9 @@ \def\@DefOrthicTriangle(#1,#2,#3)(#4,#5){% \def\tkz@tmp{#5}% \tkz@recuplast(#3) - \pgfinterruptboundingbox \tkzUProjection(#2,\tkz@last)(#1) - \endpgfinterruptboundingbox - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefOrthicTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefOrthicTriangle{\pgfutil@ifnextchar[{\tkz@DefOrthicTriangle} @@ -432,25 +448,24 @@ %<--------------------------------------------------------------------------– % tkzDefSymmedianLine %<--------------------------------------------------------------------------– -\def\@DefSymmedianTriangle(#1,#2,#3)(#4,#5){% - \def\tkz@tmp{#5}% - \tkz@recuplast(#3) - \tkzDefSymmedianLine(#2,#1,\tkz@last) - \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) - \pgfnodealias{#4}{tkzPointResult} - \ifx\tkz@tmp\tkz@stop\else\@DefSymmedianTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} +\def\@DefSymmedialTriangle(#1,#2,#3)(#4,#5){% + \def\tkz@tmp{#5}% + \tkz@recuplast(#3) + \tkzDefSymmedianLine(#2,#1,\tkz@last) + \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} + \ifx\tkz@tmp\tkz@stop\else\@DefSymmedialTriangle(#2,#3)(#5)\fi } -\def\tkzDefSymmedianTriangle{\pgfutil@ifnextchar[{% - \tkz@DefSymmedianTriangle}{% - \tkz@DefSymmedianTriangle[]}} +\def\tkzDefSymmedialTriangle{\pgfutil@ifnextchar[{% + \tkz@DefSymmedialTriangle}{% + \tkz@DefSymmedialTriangle[]}} -\def\tkz@DefSymmedianTriangle[#1](#2)#3{% +\def\tkz@DefSymmedialTriangle[#1](#2)#3{% \begingroup \SetUpPTTR{#1} \pgfinterruptboundingbox - \@DefSymmedianTriangle(#2,#2)(#3,\tkz@stop) + \@DefSymmedialTriangle(#2,#2)(#3,\tkz@stop) \endpgfinterruptboundingbox \endgroup } diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-BB.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-BB.tex new file mode 100644 index 0000000000..d9ee2931c6 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-BB.tex @@ -0,0 +1,30 @@ +% tkz-tools-eu-BB.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-BB.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +\def\tkzShowBB{\pgfutil@ifnextchar[{\tkz@ShowBB}{\tkz@ShowBB[]}} +\def\tkz@ShowBB[#1]{% + \draw[#1] (current bounding box.south west) rectangle + (current bounding box.north east); +} +%<--------------------------------------------------------------------------–> +\def\tkzClipBB{% +\clip (current bounding box.south west) rectangle + (current bounding box.north east); +} +%<--------------------------------------------------------------------------–> +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-angles.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-angles.tex index 32dfc82e65..d9636c2d83 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-angles.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-angles.tex @@ -1,5 +1,5 @@ % tkz-tools-angles.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,14 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% -% This work has the LPPL maintenance status “maintained”. -% +% This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-tools-angles.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-angles.tex} \makeatletter %<--------------------------------------------------------------------------–> %<--------------------------------------------------------------------------–> @@ -35,8 +33,8 @@ \else \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathadd{\tkz@SecondAngle}{360} - \xdef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{360} + \xdef\tkz@SecondAngle{\pgfmathresult}% \fi \fi \endgroup @@ -47,9 +45,9 @@ %<--------------------------------------------------------------------------–> \def\tkzFindSlopeAngle(#1,#2){% \begingroup - \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{% + \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{% \pgfpointanchor{#2}{center}} - \global\let\tkzAngleResult\pgfmathresult + \global\let\tkzAngleResult\pgfmathresult \endgroup } %<--------------------------------------------------------------------------–> @@ -57,18 +55,18 @@ %<--------------------------------------------------------------------------–> \def\tkzFindAngle(#1,#2,#3){% new code 2016 \begingroup - \tkzFindSlopeAngle(#2,#1)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@SecondAngle} - \tkzNormalizeAngle(\tkz@FirstAngle,\tkz@SecondAngle) - \edef\tkz@Angle{\fpeval{\tkz@SecondAngle-\tkz@FirstAngle}} - \global\let\tkzAngleResult\tkz@Angle + \tkzFindSlopeAngle(#2,#1)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@SecondAngle} + \tkzNormalizeAngle(\tkz@FirstAngle,\tkz@SecondAngle) + \edef\tkz@Angle{\fpeval{\tkz@SecondAngle-\tkz@FirstAngle}} + \global\let\tkzAngleResult\tkz@Angle \endgroup } %<--------------------------------------------------------------------------–> % Find angle %<--------------------------------------------------------------------------–> \def\tkzGetAngle#1{% - \global\expandafter\edef\csname #1\endcsname{\tkzAngleResult} + \global\expandafter\edef\csname #1\endcsname{\tkzAngleResult} } \makeatother \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-base.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-base.tex new file mode 100644 index 0000000000..44b984ab6c --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-base.tex @@ -0,0 +1,89 @@ +% tkz-tools-eu-base.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-base.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +\global\let\tkz@tmp@xa\tkz@init@xmin% modif 2016 +\global\let\tkz@tmp@xb\tkz@init@xmax% modif 2016 +\global\let\tkz@tmp@ya\tkz@init@ymin% modif 2016 +\global\let\tkz@tmp@yb\tkz@init@ymax% modif 2016 +%<--------------------------------------------------------------------------–> +\pgfkeys{ + /tkzInit/.cd, + xmin/.store in = \tkz@init@xmin, + xmax/.store in = \tkz@init@xmax, + xstep/.store in = \tkz@init@xstep, + ymin/.store in = \tkz@init@ymin, + ymax/.store in = \tkz@init@ymax, + ystep/.store in = \tkz@init@ystep, + NO/.is if = tkz@init@NO, + NO/.default = true, + xmin = 0, + xmax = 10, + xstep = 1, + ymin = 0, + ymax = 10, + ystep = 1, + NO = false + } + +\def\tkzInit{\pgfutil@ifnextchar[{\tkz@Init}{\tkz@Init[]}} +\def\tkz@Init[#1]{% + \pgfqkeys{/tkzInit}{#1} + \ifx\tkzfctloaded\undefined + \else + \tkz@tkzf@fct=0 % only if tkz-fct loaded + \fi + \xdef\tkz@init@xorigine{0} + \xdef\tkz@init@yorigine{0} + \edef\@xsgmin{\fpeval{sign(\tkz@init@xmin)}} + \edef\@xsgmax{\fpeval{sign(\tkz@init@xmax)}} + \edef\@ysgmin{\fpeval{sign(\tkz@init@ymin)}} + \edef\@ysgmax{\fpeval{sign(\tkz@init@ymax)}} + \let\tkz@tmp@xa\tkz@init@xmin %modif 2016 + \let\tkz@tmp@xb\tkz@init@xmax %modif 2016 + \let\tkz@tmp@ya\tkz@init@ymin %modif 2016 + \let\tkz@tmp@yb\tkz@init@ymax %modif 2016 + \tkz@init@NOfalse + \ifx\@xsgmin\@xsgmax \tkz@init@NOtrue \fi + \ifx\@ysgmin\@ysgmax \tkz@init@NOtrue \fi + \iftkz@init@NO% + \ifx\@xsgmin\@xsgmax + \edef\tkz@init@xmax{\fpeval{\tkz@init@xmax-\tkz@init@xmin}} + \edef\tkz@init@xorigine{\tkz@init@xmin} + \edef\tkz@init@xmin{0} + \fi + \ifx\@ysgmin\@ysgmax + \edef\tkz@init@ymax{\fpeval{\tkz@init@ymax-\tkz@init@ymin}} + \edef\tkz@init@yorigine{\tkz@init@ymin} + \edef\tkz@init@ymin{0} + \fi + \fi + \edef\tkz@xa{\fpeval{\tkz@init@xmin/\tkz@init@xstep}} + \edef\tkz@xb{\fpeval{\tkz@init@xmax/\tkz@init@xstep}} + \edef\tkz@ya{\fpeval{\tkz@init@ymin/\tkz@init@ystep}} + \edef\tkz@yb{\fpeval{\tkz@init@ymax/\tkz@init@ystep}} + \tkz@getdecimal{\tkz@init@xstep} % amélioration nb dec et integer + \xdef\tkz@init@xdec{\number\c@pgfmath@countb} + \tkz@getdecimal{\tkz@init@ystep} + \xdef\tkz@init@ydec{\number\c@pgfmath@countb} +}% +\def\tkzAddName{\pgfutil@ifnextchar[{\tkz@AddName}{\tkz@AddName[]}} +\def\tkz@AddName[#1]#2{% +\node[above left,#1] at (\pgf@path@lastx,\pgf@path@lasty){#2}; +}% +%<--------------------------------------------------------------------------–> +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-colors.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-colors.tex new file mode 100644 index 0000000000..a105f51f93 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-colors.tex @@ -0,0 +1,57 @@ +% tkz-tools-eu-colors +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-colors} +\makeatletter + +%<------ Initialisation of the colors with tkzSetUpColors -----------------> +% Première macro SetUpColors %%%%%%%%%%%%%%%%%%%%% +%Possible +\pgfkeys{/tkzsucolor/.is family} +\def\setupcolorkeys#1{% + \pgfkeys{/tkzsucolor,#1}} +\setupcolorkeys{ + background/.estore in = \setupcolor@background, + text/.estore in = \setupcolor@text, + @initial/.style = {background=white,text=black}, + @apply/.code = {\pagecolor{\setupcolor@background}% + \color{\setupcolor@text}% + }, +} +\def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{\tkz@SetUpColors[]}} +\def\tkz@SetUpColors[#1]{\setupcolorkeys{@initial,#1,@apply}} + +%<------ Initialisation of all colors -----------------> +\pgfkeys{/tkzsupallcol/.cd, + background/.store in = \tkz@suac@bkc, + text/.store in = \tkz@suac@txt, + background = \tkz@backgroundcolor,% see tkz-euclide.cfg + text = \tkz@textcolor% idem + } +\def\tkzSetUpAllColors{\pgfutil@ifnextchar[{\tkz@SetUpAllColors}{% + \tkz@SetUpAllColors[]}} +\def\tkz@SetUpAllColors[#1]{% + \pgfqkeys{/tkzsupallcol}{#1} % now we redine the based colors + \def\tkz@fillcolor{\tkz@suac@bkc} + \def\tkz@mainlinecolor{\tkz@suac@txt} + \def\tkz@textcolor{\tkz@suac@txt} + \def\tkz@otherlinecolor{\tkz@suac@txt!50} + \def\tkz@sua@color{\tkz@suac@txt} + \tkzSetUpAxis[color=\tkz@suac@txt] + \tkzSetUpGrid[color=\tkz@suac@txt] + \pagecolor{\tkz@suac@bkc} + \color{\tkz@suac@txt} +} +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-intersections.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-intersections.tex index d0517fdee7..9448b707a7 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-intersections.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-intersections.tex @@ -1,5 +1,5 @@ % tkz-tools-intersections.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -12,9 +12,10 @@ % % The Current Maintainer of this work is Alain Matthes. % utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-tools-intersections.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-intersections.tex} \makeatletter %<--------------------------------------------------------------------------–> % intersection de deux lignes @@ -125,8 +126,8 @@ %<---------- test ------------------------------------------------------–> \def\tkzTestInterLC(#1,#2)(#3,#4){% \tkz@Projection(#1,#2)(#3){tkz@pth}% distance centre à la ligne -\tkz@@CalcLength(#3,tkz@pth){tkz@mathLen}% -\tkzCalcLength(#3,#4) +\tkz@@CalcLength(#3,tkz@pth){tkz@mathLen}% +\tkz@@CalcLength(#3,#4){tkzLengthResult} \ifdim\tkz@mathLen pt>\tkzLengthResult pt\relax% \def\tkzflagLC{-1} \else @@ -136,10 +137,10 @@ %<--------------------------------------------------------------------------–> \def\tkz@numlc{0} \pgfkeys{/linecircle/.cd, - node/.code = \def\tkz@numlc{0}, - R/.code = \def\tkz@numlc{1}, - with nodes/.code = \def\tkz@numlc{2}, - node + node/.code = \def\tkz@numlc{0}, + R/.code = \def\tkz@numlc{1}, + with nodes/.code = \def\tkz@numlc{2}, + node } %<--------------------------------------------------------------------------–> \def\tkzInterLC{\pgfutil@ifnextchar[{\tkz@InterLC}{\tkz@InterLC[]}} @@ -148,16 +149,16 @@ \pgfqkeys{/linecircle}{#1} \pgfinterruptboundingbox \ifcase\tkz@numlc% - % first case 0 - \tkzCalcLength(#4,#5) - \tkzInterLCR(#2,#3)(#4,\tkzLengthResult pt){tkzFirstPointResult}% - {tkzSecondPointResult} + % first case 0 + \tkz@@CalcLength(#4,#5){tkzLengthResult} + \tkzInterLCR(#2,#3)(#4,\tkzLengthResult pt){tkzFirstPointResult}% + {tkzSecondPointResult} \or% 1 - \tkzInterLCR(#2,#3)(#4,#5){tkzFirstPointResult} - {tkzSecondPointResult}% + \tkzInterLCR(#2,#3)(#4,#5 cm){tkzFirstPointResult} + {tkzSecondPointResult}% \or% 2 \tkzInterLCWithNodes(#2,#3)(#4,#5){tkzFirstPointResult}% - {tkzSecondPointResult}% + {tkzSecondPointResult}% \fi \endpgfinterruptboundingbox \endgroup @@ -183,11 +184,11 @@ \tkz@ay=\pgf@y\relax% \advance\tkz@bx by\tkz@ax\relax% \advance\tkz@by by\tkz@ay\relax% - \pgfcoordinate{#6}{\pgfqpoint{\tkz@bx}{\tkz@by}} + \pgfcoordinate{#6}{\pgfqpoint{\tkz@bx}{\tkz@by}} \tkzCSym(#3)(#6){#5} \else - \edef\pgfmathresult{\fpeval{\tkz@mathLen/\tkz@radi}} - % \edef\tkz@angle{\fpeval{acosd(\pgfmathresult)}} + \edef\pgfmathresult{\fpeval{\tkz@mathLen/\tkz@radi}} + % \edef\tkz@angle{\fpeval{acosd(\pgfmathresult)}} \pgfmathacos@{\pgfmathresult}% \let\tkz@angle\pgfmathresult% \pgfpointdiff{\pgfpointanchor{#3}{center}}% @@ -207,11 +208,11 @@ \pgfmathrotatepointaround{\pgfpoint{\tkz@bx}{\tkz@by}}% {\pgfpoint{\tkz@ax}{\tkz@ay}}% {\tkz@angle} - \pgfcoordinate{#5}{\pgfqpoint{\pgf@x}{\pgf@y}} + \pgfcoordinate{#5}{\pgfqpoint{\pgf@x}{\pgf@y}} \pgfmathrotatepointaround{\pgfpoint{\tkz@bx}{\tkz@by}}% {\pgfpoint{\tkz@ax}{\tkz@ay}}% {-\tkz@angle} - \pgfcoordinate{#6}{\pgfqpoint{\pgf@x}{\pgf@y}} + \pgfcoordinate{#6}{\pgfqpoint{\pgf@x}{\pgf@y}} \fi \endgroup @@ -222,7 +223,7 @@ %<--------------------------------------------------------------------------–> % \def\tkzInterLC(#1,#2)(#3,#4)#5#6{% % \begingroup -% \tkzCalcLength(#3,#4)\tkzGetLength{tkz@rad} +% \tkz@@CalcLength(#3,#4){tkz@rad} % \tkzInterLCR(#1,#2)(#3,\tkz@rad pt){#5}{#6} % \endgroup % } @@ -231,7 +232,7 @@ %<--------------------------------------------------------------------------–> \def\tkzInterLCWithNodes(#1,#2)(#3,#4,#5)#6#7{% \begingroup - \tkzCalcLength(#4,#5)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#4,#5){tkz@radius} \tkzInterLCR(#1,#2)(#3,\tkz@radius pt){#6}{#7} \endgroup } @@ -255,10 +256,10 @@ with nodes/.code = {\global\def\tkz@numcc{2}} \ifcase\tkz@numcc% % first case 0 \tkz@save@length - \tkzCalcLength(#2,#3) \tkzGetLength{tkz@rayA} - \tkzCalcLength(#4,#5) \tkzGetLength{tkz@rayB} + \tkz@@CalcLengthcm(#2,#3){tkz@rayA} + \tkz@@CalcLengthcm(#4,#5){tkz@rayB} \tkz@restore@length - \tkzInterCCR(#2,\tkz@rayA pt)(#4,\tkz@rayB pt){tkzFirstPointResult}{% + \tkzInterCCR(#2,\tkz@rayA)(#4,\tkz@rayB){tkzFirstPointResult}{% tkzSecondPointResult} \or% 1 \tkzInterCCR(#2,#3)(#4,#5){tkzFirstPointResult}{tkzSecondPointResult}% @@ -350,7 +351,7 @@ with nodes/.code = {\global\def\tkz@numcc{2}} \begingroup \pgfinterruptboundingbox \tkz@save@length -\tkzCalcLength(#1,#3)\tkzGetLength{tkz@dd} +\tkz@@CalcLength(#1,#3){tkz@dd} \tkz@restore@length \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} @@ -360,8 +361,8 @@ with nodes/.code = {\global\def\tkz@numcc{2}} \pgfextracty{\pgf@y}{\pgfpointanchor{#3}{center}} \tkz@bx\pgf@x % \tkz@by\pgf@y % -\tkz@cx#2 % -\tkz@cy#4 % +\tkz@cx#2cm % +\tkz@cy#4cm % \edef\tkz@aa{\fpeval{((\tkz@cx+\tkz@cy)/(2*\tkz@dd))*(\tkz@cx-\tkz@cy)+\tkz@dd/2}} \edef\tkz@xx{\fpeval{\tkz@ax+\tkz@aa/\tkz@dd*(\tkz@bx - \tkz@ax)}} \edef\tkz@yy{\fpeval{\tkz@ay+\tkz@aa/\tkz@dd*(\tkz@by - \tkz@ay)}} @@ -382,8 +383,8 @@ with nodes/.code = {\global\def\tkz@numcc{2}} % #2 node #3 node #4 node #5 node % \def\tkzInterCC(#1,#2)(#3,#4)#5#6{% % \begingroup -% \tkzCalcLength(#1,#2)\tkzGetLength{tkz@rayA} -% \tkzCalcLength(#3,#4)\tkzGetLength{tkz@rayB} +% \tkz@@CalcLength(#1,#2){tkz@rayA} +% \tkz@@CalcLength(#3,#4){tkz@rayB} % \tkzInterCCR(#1,\tkz@rayA pt)(#3,\tkz@rayB pt){#5}{#6} % \endgroup % } @@ -393,9 +394,9 @@ with nodes/.code = {\global\def\tkz@numcc{2}} % la première variante devrait être #2 #3 avec #4 #5 \def\tkzInterCCWithNodes(#1,#2,#3)(#4,#5,#6)#7#8{% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@rayA} - \tkzCalcLength(#5,#6)\tkzGetLength{tkz@rayB} - \tkzInterCCR(#1,\tkz@rayA pt)(#4,\tkz@rayB pt){#7}{#8} + \tkz@@CalcLengthcm(#2,#3){tkz@rayA} + \tkz@@CalcLengthcm(#5,#6){tkz@rayB} + \tkzInterCCR(#1,\tkz@rayA)(#4,\tkz@rayB){#7}{#8} \endgroup } \makeatother diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-math.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-math.tex index fbd34cb84c..e7f41593a0 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-math.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-math.tex @@ -1,5 +1,5 @@ -% tkz-tools-math.tex -% Copyright 2020 Alain Matthes +% tkz-tools-eu-math.tex +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,16 +7,22 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-tools-math.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-math.tex} \makeatletter %<--------------------------------------------------------------------------> +% \tkzpointnormalised# +% tkzCalcLength +% \tkzGetLength +% \tkzpttocm +% \tkzcmtopt +% \tkzFindSlope +% option xfp + % \tkzpointnormalised normalise un point A-->A' tq ||v(OA')=1|| % équivalent de \pgfpointnormalised avec fp % example @@ -41,28 +47,28 @@ } %<--------------------------------------------------------------------------> % restaure and save length -\def\tkz@save@length{% -\global\let\tkz@temp@length\tkzLengthResult}% -\def\tkz@restore@length{% - \global\let\tkzLengthResult\tkz@temp@length }% +\def\tkz@save@length{\global\let\tkz@temp@length\tkzLengthResult}% +\def\tkz@restore@length{\global\let\tkzLengthResult\tkz@temp@length }% %<--------------------------------------------------------------------------> % \tkzCalcLength Distance entre deux points en pt ou en cm avec xfp % \veclen mais avec fp -% option cm le résultat est en cm sinon en pt +% option cm le résultat est en cm sinon en pt %<--------------------------------------------------------------------------> +%\newif\iftkzLengthIncm \iftkzLengthIncmtrue \pgfkeys{tkzcalclen/.cd, cm/.is if = tkzLengthIncm, - cm/.default = true} + cm/.default = true, + cm = true} \def\tkzCalcLength{\pgfutil@ifnextchar[{\tkz@CalcLength}{\tkz@CalcLength[]}} \def\tkz@CalcLength[#1](#2,#3){% -\pgfkeys{tkzcalclen/.cd, cm = false} +%\pgfkeys{tkzcalclen/.cd, cm = true} \pgfqkeys{/tkzcalclen}{#1}% \begingroup \tkz@@CalcLength(#2,#3){tkzLengthResult} \iftkzLengthIncm - \pgfmathparse{\tkz@xfpMathLen pt/1cm} - \edef\tkz@xfpMathLen{\fpeval{round(\pgfmathresult,5)}} + \pgfmathparse{\tkzLengthResult pt/1cm} + \edef\tkz@xfpMathLen{\fpeval{round(\pgfmathresult,5)}} \global\let\tkzLengthResult\tkz@xfpMathLen \fi \endgroup @@ -74,6 +80,15 @@ \edef\tkz@xfpMathLen{\fpeval{round(\tkz@xfpMathLen,5)}} \global\expandafter\edef\csname #3\endcsname{\tkz@xfpMathLen} } +\def\tkz@@CalcLengthcm(#1,#2)#3{% +\pgfpointdiff{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#2}{center}}% +\edef\tkz@xfpMathLen{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} +\edef\tkz@xfpMathLen{\fpeval{round(\tkz@xfpMathLen,5)}} +\pgfmathparse{\tkz@xfpMathLen pt/1cm} +\edef\tkz@xfpMathLen{\fpeval{round(\pgfmathresult,5)}} +\global\expandafter\edef\csname #3\endcsname{\tkz@xfpMathLen} +} %<--------------------------------------------------------------------------> \def\tkzGetLength#1{% \global\expandafter\edef\csname #1\endcsname{\tkzLengthResult}} @@ -93,25 +108,13 @@ %<-------------------------------------------------------------------------- \def\tkzcmtopt(#1)#2{% \begingroup - \pgfmathparse{#1/1pt} + \pgfmathparse{#1*1cm} \edef\tkz@mathresult{\fpeval{round(\pgfmathresult,5)}} \global\let\tkz@mathresult\tkz@mathresult \global\expandafter\edef\csname #2\endcsname{\tkz@mathresult}% \endgroup }% -%<--------------------------------------------------------------------------> -% Slope -%<--------------------------------------------------------------------------> -\def\tkzFindSlope{\tkz@FindSlope} -\def\tkz@FindSlope(#1,#2)#3{% -\begingroup - \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#2}{center}}} - \edef\tkz@Slope{\fpeval{\pgfmath@tonumber{\pgf@y}/\pgfmath@tonumber{\pgf@x}}} - \edef\tkz@Slope{\fpeval{round(\tkz@Slope,5)}} - \global\expandafter\edef\csname #3\endcsname{\tkz@Slope}% -\endgroup -} + % Schrodinger's cat idea 03/01/20 \tikzset{xfp/.code={% \pgfmathdeclarefunction*{veclen}{2}{% diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-modules.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-modules.tex new file mode 100644 index 0000000000..349ce0d631 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-modules.tex @@ -0,0 +1,67 @@ +% tkz-tools-modules +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-utilities.tex} +\makeatletter +%<------------- % chargement des modules ----------------------------------> +\def\tkz@obj@all{angles,arcs,compass,defcircles,deflines,defpoints,defpointsby,defpointsrnd,defpointswith,polygons,protractor,sectors,show,triangles}% +\def\tkz@obj@txt{all} +\def\usetkzobj{\pgfutil@ifnextchar[{\use@usetkzobj}{\use@@usetkzobj}}%} +\def\use@usetkzobj[#1]{\use@@usetkzobj{#1}} +\def\use@@usetkzobj#1{% + \def\tkz@list{#1} + \ifx\tkz@obj@txt\tkz@list \edef\tkz@list{\tkz@obj@all}% + \else + \edef\tkz@list{#1}% + \fi + \pgfutil@for\tkz@temp:=\tkz@list\do{% + \expandafter\ifx\csname tkz@library@\tkz@temp @loaded\endcsname\relax% + \expandafter\global\expandafter\let\csname tkz@library@\tkz@temp @loaded\endcsname=\pgfutil@empty% + \expandafter\edef\csname tkz@obj@#1@atcode\endcsname{\the\catcode`\@} + \expandafter\edef\csname tkz@obj@#1@barcode\endcsname{\the\catcode`\|} + \catcode`\@=11 + \catcode`\|=12 + \input tkz-obj-\tkz@temp.tex + \catcode`\@=\csname tkz@obj@#1@atcode\endcsname + \catcode`\|=\csname tkz@obj@#1@barcode\endcsname + \fi% + }% +}% +%<---------------------------------------------------------–> +\def\tkz@tool@all{math-xfp} +\def\tkz@tool@txt{all} + +\def\usetkztool{\pgfutil@ifnextchar[{\use@usetkztool}{\use@@usetkztool}}%} +\def\use@usetkztool[#1]{\use@@usetkztool{#1}} +\def\use@@usetkztool#1{% + \def\tkz@list{#1} + \ifx\tkz@tool@txt\tkz@list \edef\tkz@list{\tkz@tool@all}% + \else + \edef\tkz@list{#1}% + \fi + \pgfutil@for\tkz@temp:=\tkz@list\do{% + \expandafter\ifx\csname tkz@library@\tkz@temp @loaded\endcsname\relax% + \expandafter\global\expandafter\let\csname tkz@library@\tkz@temp @loaded\endcsname=\pgfutil@empty% + \expandafter\edef\csname tkz@tool@#1@atcode\endcsname{\the\catcode`\@} + \expandafter\edef\csname tkz@tool@#1@barcode\endcsname{\the\catcode`\|} + \catcode`\@=11 + \catcode`\|=12 + \input tkz-tools-\tkz@temp.tex + \catcode`\@=\csname tkz@tool@#1@atcode\endcsname + \catcode`\|=\csname tkz@tool@#1@barcode\endcsname + \fi% + }% +}% +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-text.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-text.tex new file mode 100644 index 0000000000..6744585be4 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-text.tex @@ -0,0 +1,88 @@ +% tkz-tools-eu-text.tex +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-text.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% tkzText +%<--------------------------------------------------------------------------–> +\def\tkz@parsenode#1{% +\tkz@getvirg#1,\@nil +\iftkz@node +\else + \tkz@getfromcart#1\@nil +\fi +} +\def\tkz@getvirg#1,#2\@nil{% +\ifx\tkzempty#2\tkzempty% + \tkz@nodetrue +\else + \tkz@nodefalse +\fi +} +\def\tkzText{\pgfutil@ifnextchar[{\tkz@Text}{\tkz@Text[]}} +\def\tkz@Text[#1](#2)#3{% + \begingroup + \tkz@parsenode{#2} + \iftkz@node + \node[#1] at (#2){#3}; + \else + \edef\tkzpt@xa{\fpeval{(\tkz@absc-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkzpt@ya{\fpeval{(\tkz@ord-\tkz@init@yorigine)/\tkz@init@ystep}} + \node[#1] at (\tkzpt@xa,\tkzpt@ya){#3};% + \fi +\endgroup +}% +% %<--------------------------------------------------------------------------–> +% % légende +% %<--------------------------------------------------------------------------–> +\pgfkeys{/tkzlegend/.cd, + line/.is if = tkz@legend@line, + line/.default = true, + line = false, + /tkzlegend/.search also = {/tikz}, +} +\def\tkzLegend{\pgfutil@ifnextchar[{\tkz@Legend}{\tkz@Legend[]}} +\def\tkz@Legend[#1](#2,#3)#4{% +\pgfqkeys{/tkzlegend}{#1} +\begingroup + \c@pgfmath@counta=0 % + \edef\tkzpt@xa{\fpeval{(#2-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkzpt@ya{\fpeval{(#3-\tkz@init@yorigine)/\tkz@init@ystep}} + \node[/tkzlegend/.cd,#1] at (\tkzpt@xa,\tkzpt@ya) {% +\begin{tikzpicture} + \foreach \motif/\size/\col/\mtext in {#4}{% + \iftkz@legend@line + \draw[color = \col, + line width = \size, + style = \motif, + text = \tkz@mainlinecolor]% + (0cm ,\the\c@pgfmath@counta ex)--% + (\tkz@legend@line@len,\the\c@pgfmath@counta ex) + \else + \draw plot[mark size = \size,% + mark = \motif,% + mark options = {color=\col}]% + coordinates{(0 ex,\the\c@pgfmath@counta ex)}% + \fi + node[right=1ex] {\mtext}; + \global\advance\c@pgfmath@counta by 3 % + }% + +\end{tikzpicture}% +};% +\endgroup +} +\makeatother +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-utilities.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-utilities.tex new file mode 100644 index 0000000000..f85acf6142 --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-tools-eu-utilities.tex @@ -0,0 +1,172 @@ +% tkz-tools-eu-utilities +% Copyright 2022 Alain Matthes +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% This work has the LPPL maintenance status “maintained”. +% The Current Maintainer of this work is Alain Matthes. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-utilities.tex} +\makeatletter +\pgfkeys{/tkzClip/.cd, +space/.store in = {\tkz@CLI@space}, +space = {}} + +\def\tkzClip{\pgfutil@ifnextchar[{\tkz@Clip}{\tkz@Clip[]}} +\def\tkz@Clip[#1]{% + +\pgfqkeys{/tkzClip}{#1} +\ifx\tkzutil@empty\tkz@CLI@space + \clip (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb); + \else + \edef\tkz@xxa{\fpeval{\tkz@xa-\tkz@CLI@space}} + \edef\tkz@yya{\fpeval{\tkz@ya-\tkz@CLI@space}} + \edef\tkz@xxb{\fpeval{\tkz@xb+\tkz@CLI@space}} % correction bug 2020 + \edef\tkz@yyb{\fpeval{\tkz@yb+\tkz@CLI@space}} + \clip (\tkz@xxa,\tkz@yya) rectangle (\tkz@xxb,\tkz@yyb); +\fi +} + +% for testing results +\def\extractxy#1{% +\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} +\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} +\typeout{#1 \the\pgf@x,\the\pgf@y} +} +%<-------------- some tools -------------------------------------------------> +\def\tkzutil@empty{} +\def\tkzutil@firstofone#1{#1} +\def\tkzutil@firstoftwo#1#2{#1} +\def\tkzutil@secondoftwo#1#2{#2} +%<--------------------------------------------------------------------------–> +\long\def\tkzutil@ifundefined#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\tkzutil@firstoftwo + \else + \expandafter\tkzutil@secondoftwo + \fi} +%<--------------------------------------------------------------------------–> +\long\def\iftkznodedefined#1#2#3{% + \tkzutil@ifundefined{pgf@sh@ns@#1}{#3}{#2}% +} +%<--------------------------------------------------------------------------–> +\gdef\tkzActivOff{% + \edef\tkzTwoPtCode{\the\catcode`\:} + \edef\tkzPtExCode{\the\catcode`\!} + \edef\tkzPtVirCode{\the\catcode`\;} + \catcode`\:=12 \catcode`\!=12 \catcode`\;=12 + }% +\gdef\tkzActivOn{% + \catcode`\:=\tkzTwoPtCode\relax + \catcode`\!=\tkzPtExCode\relax + \catcode`\;=\tkzPtVirCode\relax +}% +%<--------------------------------------------------------------------------–> +% Pour savoir le nombre de décimales d'un nombre +% le nombre dans #1 et le résultat dans \c@pgfmath@countb +%<--------------------------------------------------------------------------–> +\newcommand\tkz@getdecimal[1]{\expandafter\@getdecimal#1.\@nil} +\def\@getdecimal#1.#2\@nil{% + \ifx\empty#2\empty + % Si #2 est vide, c'est qu'il n'y avait pas de point + % dans la chaîne initiale + \c@pgfmath@countb0 % + \gdef\tkz@decpart{}% + \else + % sinon c'est la chaîne qui suit le point décimal... + \CountToken{#2}% + % ... y compris le point en trop ajouté par \tkz@getdecimal :-) + \advance\c@pgfmath@countb by-1 % + \@@getdecimal#2\@nil + \fi +} +\def\@@getdecimal#1.\@nil{\gdef\tkz@decpart{#1}} +%<---------------------------------------------------------–> +% code from JCC modifi +\newcommand\CountToken[1]{% + \c@pgfmath@countb0 % + \expandafter\C@untToken#1\@nil +%modifi ajout du expandafter +} +\newcommand\C@untToken{% + \afterassignment\C@untT@ken\let\CurrT@ken= +} +\newcommand\C@untT@ken{% + \ifx\CurrT@ken\@nil \else + \advance\c@pgfmath@countb by1 % + \expandafter\C@untToken + \fi +} +%<---------------------------------------------------------–> +\def\tkz@recuplast(#1,#2){\def\tkz@last{#1}} +\def\tkz@stop{\tkz@stop} +% end code from JCC +%<---------------------------------------------------------–> +% Tools +%<---------------------------------------------------------–> +%<–––––––– code from TeX in Practice ––––––––> +\def\SubStringConditional #1#2{% + TT\fi + \edef\@MainString{#1}% + \edef\@SubStringConditionalTemp{{#1}{#2}}% + \expandafter\@SubStringConditional\@SubStringConditionalTemp +} +\def\@SubStringConditional #1#2{% + \def\@TestSubS ##1#2##2\\{% + \def\@TestTemp{##1}% + }% + \@TestSubS #1#2\\ + \ifx\@MainString\@TestTemp + \tkz@TestSubStringfalse + \else + \tkz@TestSubStringtrue + \fi + \iftkz@TestSubString +} +\def\RecursionMacroEnd #1#2#3{% + #1\relax + \def\@RecursionMacroEndNext{#2}% + \else + \def\@RecursionMacroEndNext{#3}% + \fi + \@RecursionMacroEndNext +} +\def\ReplaceSubStrings #1#2#3#4{% + \def\@ReplaceResult{#1}% + \edef\@ReplaceMain{#2}% + \edef\@ReplaceSub{#3}% + \edef\@ReplaceSubRep{#4}% + \@ReplaceSubStrings +} +\def\@ReplaceSubStrings{% + \RecursionMacroEnd + {\if\SubStringConditional{\@ReplaceMain}{\@ReplaceSub}}% + {\@ReplaceSubStringsDo}{\expandafter\edef\@ReplaceResult{\@ReplaceMain}}% +} +\def\@ReplaceSubStringsDoX{% + \def\@ReplaceSubStringsDoA ##1% +}% +\def\@ReplaceSubStringsDo{% + \expandafter\@ReplaceSubStringsDoX \@ReplaceSub + ##2\@EndReplaceSubStrings{% + \edef\@ReplaceMain{##1\@ReplaceSubRep ##2}% + }% + \expandafter\@ReplaceSubStringsDoA\@ReplaceMain + \@EndReplaceSubStrings + \@ReplaceSubStrings +} +%<---------------------------------------------------------–> +\def\DisabledNumprint{% + \let\tkz@numprint\numprint + \let\numprint\relax + } +\def\EnabledNumprint{\let\numprint\tkz@numprint} +%<---------------------------------------------------------–> +\makeatother +\endinput
\ No newline at end of file |