<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\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}      &amp; \textbf{Application}  \\
\Iattr{regular}{center}  &amp; |z.I = RP.IA.center|  \\
\Iattr{regular}{vertices}   &amp; array containing all vertex affixes  \\
\Iattr{regular}{through} &amp; first vertex  \\
\Iattr{regular}{circle}  &amp; defines the circle with center I passing through A \\
\Iattr{regular}{type}    &amp; |RP.IA.type= 'regular\_polygon'|   \\
\Iattr{regular}{side}    &amp; |s = RP.IA.side| ; s = length of side\\
\Iattr{regular}{circumradius}&amp;  |S.AB.circumradius| ; radius of the circumscribed circle \\
\Iattr{regular}{inradius}&amp;  |S.AB.inxradius| ; radius of the inscribed circle   \\
\Iattr{regular}{proj}    &amp;  |RP.IA.proj| ; projection of the center on one side   \\
\Iattr{regular}{angle}   &amp;  |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} &amp; \textbf{Comments}    \\
\midrule   \\
\Imeth{regular\_polygon}{new(O,A,n)} &amp;|RP.five    = regular_polygon : new (z.I,z.A,5)| ; I center A first vertex 5 sides \\
\midrule 
\textbf{Circle} &amp;\\
\midrule 
\Imeth{regular\_polygon}{incircle ()} &amp; |C.IH = RP.five : incircle ()|\\
\midrule 
\textbf{Points} &amp;\\
\midrule 
\Imeth{regular\_polygon}{name (string)} &amp; [\ref{ssub:pentagon}] \\
\bottomrule %
\end{tabular}
\egroup

% subsection regular_polygon_methods (end)

</pre></body></html>