summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex184
1 files changed, 131 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex b/Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex
index fe50b39e2cf..d63e31fdea0 100644
--- a/Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex
+++ b/Master/texmf-dist/doc/latex/tkz-euclide/latex/TKZdoc-euclide-polygons.tex
@@ -1,25 +1,21 @@
\section{Definition of polygons}
-
\subsection{Defining the points of a square} \label{def_square}
- 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}}
+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}.\\
-We can rename them with \tkzcname{tkzGetPoints}
+We can rename them with \tkzcname{tkzGetPoints}.
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
Arguments & example & explication \\
\midrule
-\TAline{\parg{pt1,pt2}}{\tkzcname{tkzDefSquare}\parg{A,B}}{The square is defined in the direct direction}
-\bottomrule
- \end{tabular}
+\TAline{\parg{pt1,pt2}}{\tkzcname{tkzDefSquare}\parg{A,B}}{The square is defined in the direct direction.}
+\end{tabular}
\end{NewMacroBox}
\subsubsection{Using \tkzcname{tkzDefSquare} with two points}
-
Note the inversion of the first two points and the result.
\begin{tkzexample}[latex=4cm,small]
@@ -34,7 +30,7 @@ Note the inversion of the first two points and the result.
\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]
@@ -74,11 +70,11 @@ Note the inversion of the first two points and the result.
\subsection{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}}
+\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}
+\begin{tabular}{lll}%
\toprule
arguments & default & definition \\
\midrule
@@ -143,26 +139,24 @@ Explanation of the definition of a parallelogram
\subsection{Drawing a square}
-
- \begin{NewMacroBox}{tkzDrawSquare}{\oarg{local options}\parg{pt1,pt2}}
+\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}
+\begin{tabular}{lll}%
\toprule
arguments & example & explication \\
\midrule
\TAline{\parg{pt1,pt2}}{|\tkzcname{tkzDrawSquare}|\parg{A,B}}{|\tkzcname{tkzGetPoints\{C\}\{D\}}|}
\bottomrule
- \end{tabular}
+\end{tabular}
\medskip
- \begin{tabular}{lll}
- options & example & explication \\
- \midrule
- \TOline{Options TikZ}{|red,line width=1pt|}{}
- \bottomrule
- \end{tabular}
+\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.}
@@ -188,37 +182,33 @@ arguments & example & explication \\
\end{tkzexample}
\subsection{The golden rectangle}
- \begin{NewMacroBox}{tkzDefGoldRectangle}{\parg{point,point}}
+ \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{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
arguments & example & explication \\
\midrule
-\TAline{\parg{pt1,pt2}}{\parg{A,B}}{Si C et D sont créés alors $AB/BC=\Phi$}
+\TAline{\parg{pt1,pt2}}{\parg{A,B}}{If C and D are created then $AB/BC=\Phi$.}
\end{tabular}
\end{NewMacroBox}
\begin{NewMacroBox}{tkzDrawGoldRectangle}{\oarg{local options}\parg{point,point}}
-\begin{tabular}{lll}
+\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}
+\end{tabular}
\medskip
- \begin{tabular}{lll}
- options & example & explication \\
- \midrule
- \TOline{Options TikZ}{|red,line width=1pt|}{}
- \bottomrule
- \end{tabular}
-
+\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]
\begin{tikzpicture}[scale=.6]
\tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B}
@@ -230,11 +220,10 @@ arguments & example & explication \\
\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{NewMacroBox}{tkzDrawPolygon}{\oarg{local options}\parg{liste de points}}
-Just give a list of points and the macro plots the polygon using the \TIKZ\ options present.
-
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
arguments & example & explication \\
\midrule
@@ -242,7 +231,7 @@ arguments & example & explication \\
\end{tabular}
\medskip
-\begin{tabular}{lll}
+\begin{tabular}{lll}%
\toprule
options & default & example \\
\midrule
@@ -250,7 +239,7 @@ options & default & example \\
\end{tabular}
\end{NewMacroBox}
-\subsubsection{Draw a polygon 1}
+\subsubsection{\tkzcname{tkzDrawPolygon}}
\begin{tkzexample}[latex=7cm, small]
\begin{tikzpicture} [rotate=18,scale=1.5]
@@ -262,21 +251,62 @@ options & default & example \\
\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)
+\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}
+
\subsection{Clip a polygon}
- \begin{NewMacroBox}{tkzClipPolygon}{\oarg{local options}\parg{points list}}
+ \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}
+\begin{tabular}{lll}%
\toprule
-options & example & explication \\
+arguments & example & explication \\
\midrule
\TAline{\parg{pt1,pt2}}{\parg{A,B}}{}
%\bottomrule
\end{tabular}
\end{NewMacroBox}
-\subsubsection{Simple Example}
+
+\subsubsection{\tkzcname{tkzClipPolygon}}
\begin{tkzexample}[latex=7 cm,small]
\begin{tikzpicture}[scale=1.25]
\tkzInit[xmin=0,xmax=4,ymin=0,ymax=3]
@@ -290,7 +320,7 @@ options & example & explication \\
\end{tikzpicture}
\end{tkzexample}
-\subsubsection{Example Sangaku in a square}
+\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}
@@ -315,20 +345,20 @@ options & example & explication \\
\end{tkzexample}
\subsection{Color a polygon}
- \begin{NewMacroBox}{tkzFillPolygon}{\oarg{local options}\parg{points list}}
+ \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}
+\begin{tabular}{lll}%
\toprule
-options & example & explication \\
+arguments & example & explication \\
\midrule
\TAline{\parg{pt1,pt2,\dots}}{\parg{A,B,\dots}}{}
%\bottomrule
\end{tabular}
\end{NewMacroBox}
-\subsubsection{Color a polygon}
+\subsubsection{\tkzcname{tkzFillPolygon}}
\begin{tkzexample}[latex=7cm, small]
\begin{tikzpicture}[scale=0.7]
\tkzInit[xmin=-3,xmax=6,ymin=-1,ymax=6]
@@ -348,4 +378,52 @@ options & example & explication \\
\tkzLabelAngle[pos = 1.5](A,O,B){$\alpha$}
\end{tikzpicture}
\end{tkzexample}
+
+\subsection{Regular polygon}
+ \begin{NewMacroBox}{tkzDefRegPolygon}{\oarg{local options}\parg{pt1,pt2}}%
+From the number of sides, depending on the options, this macro determines a regular polygon according to its center or one side.
+
+\begin{tabular}{lll}%
+\toprule
+arguments & example & explication \\
+\midrule
+\TAline{\parg{pt1,pt2}}{\parg{O,A}}{with option "center", $O$ is the center of the polygon.}
+\TAline{\parg{pt1,pt2}}{\parg{A,B}}{with option "side", $[AB]$ is a side.}
+ \end{tabular}
+
+\medskip
+\begin{tabular}{lll}%
+\toprule
+options & default & example \\
+\midrule
+\TOline{name}{P}{The vertices are named $P1$,$P2$,\dots}
+\TOline{sides}{5}{number of sides.}
+\TOline{center}{center}{The first point is the center.}
+\TOline{side}{center}{The two points are vertices.}
+\TOline{Options TikZ}{...}{}
+\end{tabular}
+\end{NewMacroBox}
+
+\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}
+ \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{tkzexample}
+
+\subsubsection{Option \tkzname{side}}
+\begin{tkzexample}[latex=7cm, small]
+\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{tkzexample}
\endinput \ No newline at end of file