summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-05 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2022-01-05 03:00:57 +0000
commitc03c0d515f1bfbd111d40e78805db4696e080fb8 (patch)
tree4d72d1df66079b3937776da41a78d71189719dad /macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex
parent1903b598f8dda613f5c584bb18ccfd2fd8c278bb (diff)
CTAN sync 202201050300
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-presentation.tex650
1 files changed, 338 insertions, 312 deletions
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