diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-tools.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-tools.tex | 139 |
1 files changed, 87 insertions, 52 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-tools.tex b/Master/texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-tools.tex index 819b57dc772..d0d36fea4ed 100644 --- a/Master/texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-tools.tex +++ b/Master/texmf-dist/doc/latex/tkz-euclide/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 |