3.30 polout2d – Polygon geometry export in two-column format

The polout2d routine exports the geometric data of a polygon to an external file in a standard two-column ASCII format (e.g., \(x,y\) coordinates). This lightweight format is compatible with visualization tools such as Gnuplot [16]. The file is written to the current working directory. Its name consists of the prefix pol, the identifier ifile formatted as five digits with leading zeros, and the extension .out. For example, \(\texttt{ifile} = 1\) produces pol00001.out. Use identifiers in the range \(0 \le \texttt{ifile} \le 99999\).

Fortran:

call polout2d(ifile,ipv,ntv,vertp)

C:

polout2d(&ifile,ipv,&ntv,vertp);

Python:

voft.polout2d(ifile,ipv,ntv,vertp)

Arguments:

ifile

IN

I_P

scalar representing the integer identifier used to name the output file (e.g., pol00001.out)

ipv

IN

I_P

array of length nv storing the vertex indices defining the polygon

ntv

IN

I_P

total number of vertices in the polygon

vertp

IN

W_P

array of dimensions \(({nv},2)\) storing the \(x,y\)-coordinates of each vertex

Note: The file contains three header lines beginning with \(\#\), followed by the vertex coordinates in the order specified by the first ntv entries of ipv. The first vertex is repeated at the end to close the polygon, giving \(\texttt{ntv} + 1\) coordinate rows. Coordinates are written in two columns with six decimal places.