\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)

