diff options
author | Karl Berry <karl@freefriends.org> | 2022-07-15 21:46:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-07-15 21:46:25 +0000 |
commit | a37835eecfb8c04bd99ca2420cc72418dec4198b (patch) | |
tree | a1c9effe63509d07db09207df1153ef0ed5ba255 /Master/texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-tools.tex | |
parent | 0c65eda87a3a65cdb4bcf42a2912bd9721816bd7 (diff) |
tkz-euclide (15jul22)
git-svn-id: svn://tug.org/texlive/trunk@63907 c570f23f-e606-0410-a88d-b1316a301751
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 | 240 |
1 files changed, 228 insertions, 12 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 dbc6ea7d207..f91ec9445a3 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 @@ -1,4 +1,4 @@ -\section{Miscellaneous tools} +\section{Miscellaneous tools and mathematical tools} \subsection{Duplicate a segment} This involves constructing a segment on a given half-line of the same length as a given segment. @@ -17,9 +17,11 @@ arguments & example & explanation \\ \end{tabular} \medskip -The macro \tkzcname{tkzDuplicateLength} is identical to this one. +\emph{The macro \tkzcname{tkzDuplicateLength} is identical to this one. } \end{NewMacroBox} +\subsubsection{Use of\tkzcname{tkzDuplicateSegment}} + \begin{tkzexample}[latex=6cm,small] \begin{tikzpicture}[scale=.5] \tkzDefPoints{0/0/A,2/-3/B,2/5/C} @@ -48,7 +50,7 @@ The macro \tkzcname{tkzDuplicateLength} is identical to this one. \tkzDrawLines(A,B B,C A,D) \tkzDrawArc[orange,delta=10](B,D)(I) \tkzDrawPoints(A,B,D,C,M,I) - \tkzLabelPoints(A,B,D,C,M,I) + \tkzLabelPoints[below left](A,B,D,C,M,I) \end{tikzpicture} \end{tkzexample} @@ -73,7 +75,7 @@ The macro \tkzcname{tkzDuplicateLength} is identical to this one. \tkzCompass(B,F) \tkzDrawPolygon[new](A,B,F) \tkzDrawPoints(A,...,H) - \tkzLabelPoints(A,...,H) + \tkzLabelPoints[below left](A,...,H) \end{tikzpicture} \end{tkzexample} @@ -92,7 +94,7 @@ defines the macro \tkzcname{dAB}. \toprule arguments & example & explanation \\ \midrule -\TAline{(pt1,pt2)\{name of macro\}} {\tkzcname{tkzCalcLength}[pt](A,B)}{\tkzcname{dAB} gives $AB$ in pt} +\TAline{(pt1,pt2)\{name of macro\}} {\tkzcname{tkzCalcLength}(A,B)}{\tkzcname{dAB} gives $AB$ in cm} \bottomrule \end{tabular} @@ -127,7 +129,7 @@ Only one option \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) + \tkzLabelPoints[below left](A,B,C,D) \end{tikzpicture} \end{tkzexample} @@ -139,13 +141,13 @@ The macro \tkzcname{tkzDefCircle[radius](A,B)} defines the radius that we retrie \begin{tikzpicture}[scale=.5] \tkzDefPoint(0,0){A} \tkzDefPoint(3,-4){B} - \tkzDefCircle[through](A,B) - \tkzGetLength{rABcm} + \tkzDefMidPoint(A,B) \tkzGetPoint{M} + \tkzCalcLength(M,B)\tkzGetLength{rAB} \tkzDrawCircle(A,B) \tkzDrawPoints(A,B) \tkzLabelPoints(A,B) \tkzDrawSegment[dashed](A,B) - \tkzLabelSegment(A,B){$\pgfmathprintnumber{\rABcm}$} + \tkzLabelSegment(A,B){$\pgfmathprintnumber{\rAB}$} \end{tikzpicture} \end{tkzexample} @@ -183,7 +185,7 @@ arguments & example & explanation \\ \end{tabular} \medskip -\noindent{The result can be used with \tkzcname{len}\tkzname{pt}} +\emph{The result can be used with \tkzcname{len}\ \tkzname{pt}} \end{NewMacroBox} @@ -203,7 +205,7 @@ arguments & example & explanation \\ \end{tabular} \medskip -Stores in two macros the coordinates of a point. If the name of the macro is \tkzname{p}, then \tkzcname{px} and \tkzcname{py} give the coordinates of the chosen point with the cm as unit. +\emph{Stores in two macros the coordinates of a point. If the name of the macro is \tkzname{p}, then \tkzcname{px} and \tkzcname{py} give the coordinates of the chosen point with the cm as unit.} \end{NewMacroBox} \subsubsection{Coordinate transfer with \tkzcname{tkzGetPointCoord}} @@ -249,7 +251,8 @@ arguments & example & explanation \\ \emph{The points have exchanged their coordinates.} \end{NewMacroBox} -\subsubsection{Example} + +\subsubsection{Use of \tkzcname{tkzSwapPoints}} \begin{tkzexample}[width=6cm,small] \begin{tikzpicture} @@ -259,4 +262,217 @@ arguments & example & explanation \\ \tkzLabelPoints(O,A,B) \end{tikzpicture} \end{tkzexample} + +\subsection{Dot Product} +In Euclidean geometry, the dot product of the Cartesian coordinates of two vectors is widely used. + +\begin{NewMacroBox}{tkzDotProduct}{\parg{$pt1$,$pt2$,$pt3$}}% + The dot product of two vectors $\overrightarrow{u} = [a,b]$ and $\overrightarrow{v} = [a',b']$ is defined as: $\overrightarrow{u}\cdot \overrightarrow{v} = aa' + bb'$ + +$\overrightarrow{u} = \overrightarrow{pt1pt2}$ $\overrightarrow{v} = \overrightarrow{pt1pt3}$ + +\begin{tabular}{lll}% +arguments & example & explanation \\ +\midrule +\TAline{(pt1,pt2,pt3)} {\tkzcname{tkzDotProduct}(A,B,C)}{the result is $\overrightarrow{AB}\cdot \overrightarrow{AC}$} +\end{tabular} + +\emph{The result is a number that can be retrieved with \tkzcname{tkzGetResult}.} +\end{NewMacroBox} + +\subsubsection{Simple example} % (fold) +\label{ssub:simple_example} + +\begin{tkzexample}[small,latex=7cm] +\begin{tikzpicture} + \tkzDefPoints{-2/-3/A,4/0/B,1/3/C} + \tkzDefPointBy[projection= onto A--B](C) + \tkzGetPoint{H} + \tkzDrawSegment(C,H) + \tkzMarkRightAngle(C,H,A) + \tkzDrawSegments[vector style](A,B A,C) + \tkzDrawPoints(A,H) \tkzLabelPoints(A,B,H) + \tkzLabelPoints[above](C) + \tkzDotProduct(A,B,C) \tkzGetResult{pabc} + \pgfmathparse{round(10*\pabc)/10} + \let\pabc\pgfmathresult + \node at (1,-3) {% + $\overrightarrow{PA}\cdot \overrightarrow{PB}=\pabc$}; + \tkzDotProduct(A,H,B) \tkzGetResult{phab} + \pgfmathparse{round(10*\phab)/10} + \let\phab\pgfmathresult + \node at (1,-4) {$PA \times PH = \phab $}; +\end{tikzpicture} +\end{tkzexample} +% subsubsection simple_example (end) + + +\subsubsection{Cocyclic points} % (fold) +\label{ssub:cocyclicpts} + +\begin{tkzexample}[small,latex=7cm] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{1/2/O,5/2/B,2/2/P,3/3/Q} + \tkzInterLC[common=B](O,B)(O,B) \tkzGetFirstPoint{A} + \tkzInterLC[common=B](P,Q)(O,B) \tkzGetPoints{C}{D} + \tkzDrawCircle(O,B) + \tkzDrawSegments(A,B C,D) + \tkzDrawPoints(A,B,C,D,P) + \tkzLabelPoints(P) + \tkzLabelPoints[below left](A,C) + \tkzLabelPoints[above right](B,D) + \tkzDotProduct(P,A,B) \tkzGetResult{pab} + \pgfmathparse{round(10*\pab)/10} + \let\pab\pgfmathresult + \tkzDotProduct(P,C,D) \tkzGetResult{pcd} + \pgfmathparse{round(10*\pcd)/10} + \let\pcd\pgfmathresult + \node at (1,-3) {% + $\overrightarrow{PA}\cdot \overrightarrow{PB} = + \overrightarrow{PC}\cdot \overrightarrow{PD}$}; + \node at (1,-4)% + {$\overrightarrow{PA}\cdot \overrightarrow{PB} =\pab$}; + \node at (1,-5){% + $\overrightarrow{PC}\cdot \overrightarrow{PD} =\pcd$}; +\end{tikzpicture} +\end{tkzexample} +% subsubsection cocyclicpts (end) + + +\subsection{Power of a point with respect to a circle} + +\begin{NewMacroBox}{tkzPowerCircle}{\parg{$pt1$}\parg{$pt2$,$pt3$}}% +\begin{tabular}{lll}% +arguments & example & explanation \\ +\midrule +\TAline{(pt1)(pt2,pt3)} {\tkzcname{tkzPowerCircle}(A)(O,M)}{power of $A$ with respect to the circle (O,A)} +\end{tabular} + +\emph{The result is a number that represents the power of a point with respect to a circle.} +\end{NewMacroBox} + +\subsubsection{Power from the radical axis} % (fold) +\label{ssub:power} + +In this example, the radical axis $(EF)$ has been drawn. A point $H$ has been chosen on $(EF)$ and the power of the point $H$ with respect to the circle of center $A$ has been calculated as well as $PS^2$. You can check that the power of $H$ with respect to the circle of center $C$ as well as $HS'^2, HT^2, HT'^2$ give the same result. + +\begin{tkzexample}[small,latex=7cm] +\begin{tikzpicture}[scale=.5] + \tkzDefPoints{-1/0/A,0/5/B,5/-1/C,7/1/D} + \tkzDrawCircles(A,B C,D) + \tkzDefRadicalAxis(A,B)(C,D) \tkzGetPoints{E}{F} + \tkzDrawLine[add=1 and 2](E,F) + \tkzDefPointOnLine[pos=1.5](E,F) \tkzGetPoint{H} + \tkzDefLine[tangent from = H](A,B)\tkzGetPoints{T}{T'} + \tkzDefLine[tangent from = H](C,D)\tkzGetPoints{S}{S'} + \tkzDrawSegments(H,T H,T' H,S H,S') + \tkzDrawPoints(A,B,C,D,E,F,H,T,T',S,S') + \tkzPowerCircle(H)(A,B) \tkzGetResult{pw} + \tkzDotProduct(H,S,S) \tkzGetResult{phtt} + \node {Power $\approx \pw \approx \phtt$}; +\end{tikzpicture} +\end{tkzexample} +% subsubsection power (end) + +\subsection{Radical axis} + +In geometry, the radical axis of two non-concentric circles is the set of points whose power with respect to the circles are equal. Here |\tkzDefRadicalAxis(A,B)(C,D)| gives the radical axis of the two circles $\mathcal{C}(A,B)$ and $\mathcal{C}(C,D)$. + +\begin{NewMacroBox}{tkzDefRadicalAxis}{\parg{$pt1$,$pt2$}\parg{$pt3$,$pt4$}}% +\begin{tabular}{lll}% +arguments & example & explanation \\ +\midrule +\TAline{(pt1,pt2)(pt3,pt4)} {\tkzcname{tkzDefRadicalAxis}(A,B)(C,D)}{Two circles with centers $A$ and $C$} +\midrule +\end{tabular} + + +\emph{The result is two points of the radical axis.} +\end{NewMacroBox} + +\subsubsection{Two circles disjointed} % (fold) +\label{ssub:two_circles_disjointed} + + +\begin{tkzexample}[small,latex=8cm] +\begin{tikzpicture}[scale=.75] + \tkzDefPoints{-1/0/A,0/2/B,4/-1/C,4/0/D} + \tkzDrawCircles(A,B C,D) + \tkzDefRadicalAxis(A,B)(C,D) + \tkzGetPoints{E}{F} + \tkzDrawLine[add=1 and 2](E,F) + \tkzDrawLine[add=.5 and .5](A,C) +\end{tikzpicture} +\end{tkzexample} +% subsubsection two_circles_disjointed (end) + +\subsubsection{Three circles} % (fold) +\label{ssub:threecircles} + + + +\begin{tkzexample}[small,latex=8cm] +\begin{tikzpicture}[scale=.4] + \tkzDefPoints{0/0/A,5/0/a,7/-1/B,3/-1/b,5/-4/C,2/-4/c} + \tkzDrawCircles(A,a B,b C,c) + \tkzDefRadicalAxis(A,a)(B,b) \tkzGetPoints{i}{j} + \tkzDefRadicalAxis(A,a)(C,c) \tkzGetPoints{k}{l} + \tkzDefRadicalAxis(C,c)(B,b) \tkzGetPoints{m}{n} + \tkzDrawLines[new](i,j k,l m,n) +\end{tikzpicture} +\end{tkzexample} +% subsubsection threecircles (end) + +\subsection{\tkzcname{tkzIsLinear}, \tkzcname{tkzIsOrtho}} + \begin{NewMacroBox}{tkzIsLinear}{\parg{$pt1$,$pt2$,$pt3$}}% + \begin{tabular}{lll}% + arguments & example & explanation \\ + \midrule + \TAline{(pt1,pt2,pt3)} {\tkzcname{tkzIsLinear}(A,B,C)}{$A,B,C$ aligned ?} + \midrule + \end{tabular} + + \emph{\tkzcname{tkzIsLinear} allows to test the alignment of the three points $pt1$,$pt2$,$pt3$. } + \end{NewMacroBox} + + \begin{NewMacroBox}{tkzIsOrtho}{\parg{$pt1$,$pt2$,$pt3$}}% + \begin{tabular}{lll}% + arguments & example & explanation \\ + \midrule + \TAline{(pt1,pt2,pt3)} {\tkzcname{tkzIsOrtho}(A,B,C)}{$(AB)\perp (AC)$ ? } + \midrule + \end{tabular} + + \emph{\tkzcname{tkzIsOrtho} allows to test the orthogonality of lines $(pt1pt2)$ and $(pt1pt3)$. } + \end{NewMacroBox} + + \subsubsection{Use of \tkzcname{tkzIsOrtho} and \tkzcname{tkzIsLinear}} + +\begin{tkzexample}[small,latex=7cm] + \begin{tikzpicture} + \tkzDefPoints{1/-2/A,5/0/B} + \tkzDefCircle[diameter](A,B) \tkzGetPoint{O} + \tkzDrawCircle(O,A) + \tkzDefPointBy[rotation= center O angle 60](B) + \tkzGetPoint{C} + \tkzDefPointBy[rotation= center O angle 60](A) + \tkzGetPoint{D} + \tkzDrawCircle(O,A) + \tkzDrawPoints(A,B,C,D,O) + \tkzIsOrtho(C,A,B) + \iftkzOrtho + \tkzDrawPolygon[blue](A,B,C) + \tkzDrawPoints[blue](A,B,C,D) + \else + \tkzDrawPoints[red](A,B,C,D) + \fi + \tkzIsLinear(O,C,D) + \iftkzLinear + \tkzDrawSegment[orange](C,D) + \fi +\end{tikzpicture} + +\end{tkzexample} + + \endinput
\ No newline at end of file |