\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}{vertices}   & 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}{circumradius}&  |S.AB.circumradius| ; 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}
\directlua{%
init_elements ()
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
}
\begin{tikzpicture}[scale = .75]
\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}
\directlua{%
   init_elements ()
   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
  }
  
\begin{center}
  \begin{tikzpicture}[scale = .75]
  \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{center}


\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)} & [\ref{ssub:pentagon}] \\
\bottomrule %
\end{tabular}
\egroup

% subsection regular_polygon_methods (end)

