summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex
blob: 4a25afdfe562143c56cb3b5ff6bf88eae4c1475e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
\newpage
\section{Classe \Iclass{Regular Polygon}} % (fold)

\subsection{regular\_polygon attributes} % (fold)
\label{sub:regular_polygon_attributes}

\begin{mybox}
Creation | RP.IA = regular_polygon : new (z.I,z.A,6)|
\end{mybox}

\bgroup
\catcode`_=12
\small
\captionof{table}{Regular\_polygon attributes.}
\begin{tabular}{ll}
\toprule
\textbf{Attributes}     & \textbf{Application}  \\
\Iattr{square}{center}  & |z.I = RP.IA.center|  \\
\Iattr{square}{table}   & array containing all vertex affixes  \\
\Iattr{square}{through} & first vertex  \\
\Iattr{square}{circle}  & defines the circle with center I passing through A \\
\Iattr{square}{type}    & |RP.IA.type= 'regular\_polygon'|   \\
\Iattr{square}{side}    & |s = RP.IA.side| ; s = length of side\\
\Iattr{square}{exradius}&  |S.AB.exradius| ; radius of the circumscribed circle \\
\Iattr{square}{inradius}&  |S.AB.inxradius| ; radius of the inscribed circle   \\
\Iattr{square}{proj}    &  |RP.IA.proj| ; projection of the center on one side   \\
\Iattr{square}{angle}   &  |RP.IA.angle| ; angle formed by the center and 2 consecutive vertices   \\
\bottomrule %
\end{tabular}
\egroup

\subsubsection{Pentagon} % (fold)
\label{ssub:pentagon}
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
z.O     = point:    new (0,0)
z.I     = point:    new (1,3)
z.A     = point:    new (2,0)
RP.five  = regular_polygon : new (z.I,z.A,5)
RP.five : name ("P_")
C.ins  = circle: radius (z.I,RP.five.inradius) 
z.H = RP.five.proj
\end{tkzelements}
\begin{tikzpicture}
\def\nb{\tkzUseLua{RP.five.nb}}
\tkzGetNodes
\tkzDrawCircles(I,A I,H)
\tkzDrawPolygon(P_1,P_...,P_\nb)
\tkzDrawPoints[red](P_1,P_...,P_\nb,H,I)
\tkzLabelPoints[red](I,A,H)
\end{tikzpicture}
\end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
   \begin{tkzelements}
      z.O      = point:    new (0,0)
      z.I      = point:    new (1,3)
      z.A      = point:    new (2,0)
      RP.five    = regular_polygon : new (z.I,z.A,5)
      RP.five : name ("P_")
      C.ins  = circle : radius ( z.I , RP.five.inradius ) 
      z.H = RP.five.proj
   \end{tkzelements}
   \hspace{\fill}
   \begin{tikzpicture}
   \def\nb{\tkzUseLua{RP.five.nb}}
   \tkzGetNodes
   \tkzDrawCircles(I,A I,H)
   \tkzDrawPolygon(P_1,P_...,P_\nb)
   \tkzDrawPoints[red](P_1,P_...,P_\nb,H,I)
   \tkzLabelPoints[red](I,A,H)
   \end{tikzpicture}
\end{minipage}
% subsubsection pentagon (end)
% subsection regular_polygon_attributes (end)

\subsection{regular\_polygon methods} % (fold)
\label{sub:regular_polygon_methods}

\bgroup
\catcode`_=12
\small
\captionof{table}{Circle methods.}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Comments}    \\
\midrule   \\
\Imeth{regular\_polygon}{new(O,A,n)} &|RP.five    = regular_polygon : new (z.I,z.A,5)| ; I center A first vertex 5 sides \\
\midrule 
\textbf{Circle} &\\
\midrule 
\Imeth{regular\_polygon}{incircle ()} & |C.IH = RP.five : incircle ()|\\
\midrule 
\textbf{Points} &\\
\midrule 
\Imeth{regular\_polygon}{name (string)} & see\ref{ssub:pentagon} \\
\bottomrule %
\end{tabular}
\egroup

% subsection regular_polygon_methods (end)