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{Class \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.}\label{regular:att}
\begin{tabular}{ll}
\toprule
\textbf{Attributes} & \textbf{Application} \\
\Iattr{regular}{center} & |z.I = RP.IA.center| \\
\Iattr{regular}{table} & array containing all vertex affixes \\
\Iattr{regular}{through} & first vertex \\
\Iattr{regular}{circle} & defines the circle with center I passing through A \\
\Iattr{regular}{type} & |RP.IA.type= 'regular\_polygon'| \\
\Iattr{regular}{side} & |s = RP.IA.side| ; s = length of side\\
\Iattr{regular}{exradius}& |S.AB.exradius| ; radius of the circumscribed circle \\
\Iattr{regular}{inradius}& |S.AB.inxradius| ; radius of the inscribed circle \\
\Iattr{regular}{proj} & |RP.IA.proj| ; projection of the center on one side \\
\Iattr{regular}{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}{regular\_polygon methods.}\label{regular:met}
\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)} & Refer to\ref{ssub:pentagon} \\
\bottomrule %
\end{tabular}
\egroup
% subsection regular_polygon_methods (end)
|