Document type of the polygon file

The contents of a polygon file are organized as follows.

            ←impossible to omit   ・・・                    ←possible to omit                    ←possible to omit         ←possible to omit                                  ←possible to omit  <quad id="2" vertex="v1 v2 v3 v4"/> </quad_array> <polyline_array count="2" width=”1”>              ←possible to omit <polyline id="1" vertex="v1 v2 v3 v4 v5 ・・・"/> <polyline id="2" vertex="v1 v2 v3 v4 v5 ・・・"/> </quad_array>

The ‘vertices’ element contains the sequence of vertices and the number of vertices is specified by the ‘count’ attribute. If the value of the ‘id_numbers’ attribute is ‘ignore’, the vertex id is automatically numbered starting from 1. If the ‘id_numbers’ attribute is set to be ‘use’, users can assign arbitrary numbers to each vertex id. In the ‘vertex’ element, x, y and z represent the x, y and z coordinates of the vertex, respectively, and nx, ny and nz represent the x, y and z components of the normal vector at the vertex, respectively. They are assigned real numbers. The color of each vertex is defined according to the RGB color scheme; R, G and B take the real numbers from 0 to 255. The ‘point_array’, ‘line_array’, ‘traiangle_array’, ‘quad_array’ and ‘polyline_array’ elements contain the sequence of polygons such as dots, lines, triangles, quadrangles and polylines, respectively. They can be omitted. The v1, v2, v3, v4 and v5 describe id of the vertices constructing the polygon. For these elements, the ‘transparency’ attribute that is omissible can be used to set the transparency of the image. To specify the size of dots and the width of lines, the ‘point_array’ element has the omissible ‘size’ attribute and ‘line_array’ and ‘polyline_array’ elements have the omissible ‘width’ attribute, respectively. The XML schema file that describes the type definitions and element declarations is published at http://ef-site.hgc.jp/eF-site/schema/polygon12.xsd. A simple example of a polygon is shown below. It represents a colored cube. The file is published at http://ef-site.hgc.jp/eF-site/jV/cube.xml. Before you open this polygon, you should close all files currently loaded to the application to get an appropriate viewpoint for the cube. To do this, you can use [File] – [Close] menu, or execute ‘zap’ in the command line.

<?xml version="1.0"?> <vertices count="24" id_numbers="use"> <vertex id="1" image=" 1  1  1  0  0  1 255   0   0"/> <vertex id="2" image="-1  1  1  0  0  1 255   0   0"/> <vertex id="3" image="-1 -1  1  0  0  1 255   0   0"/> <vertex id="4" image=" 1 -1  1  0  0  1 255   0   0"/> <vertex id="5" image="-1  1 -1  0  0 -1   0 255 255"/> <vertex id="6" image=" 1  1 -1  0  0 -1   0 255 255"/> <vertex id="7" image=" 1 -1 -1  0  0 -1   0 255 255"/> <vertex id="8" image="-1 -1 -1  0  0 -1   0 255 255"/> <vertex id="9" image=" 1  1  1  1  0  0   0 255   0"/> <vertex id="10" image=" 1 -1 1  1  0  0   0 255   0"/> <vertex id="11" image=" 1 -1 -1 1  0  0   0 255   0"/> <vertex id="12" image=" 1 1 -1  1  0  0   0 255   0"/> <vertex id="13" image="-1 1 -1 -1  0  0 255   0 255"/> <vertex id="14" image="-1 -1 -1 -1 0  0 255   0 255"/> <vertex id="15" image="-1 -1 1 -1  0  0 255   0 255"/> <vertex id="16" image="-1 1  1 -1  0  0 255   0 255"/> <vertex id="17" image=" 1 1  1  0  1  0   0   0 255"/> <vertex id="18" image=" 1 1 -1  0  1  0   0   0 255"/> <vertex id="19" image="-1 1 -1  0  1  0   0   0 255"/> <vertex id="20" image="-1 1  1  0  1  0   0   0 255"/> <vertex id="21" image=" 1 -1 -1 0 -1  0 255 255   0"/> <vertex id="22" image=" 1 -1 1  0 -1  0 255 255   0"/> <vertex id="23" image="-1 -1 1  0 -1  0 255 255   0"/> <vertex id="24" image="-1 -1 -1 0 -1  0 255 255   0"/> <quad_array count="6"> <quad id="1" vertex=" 1 2  3  4"/> <quad id="2" vertex=" 5 6  7  8"/> <quad id="3" vertex=" 9 10 11 12"/> <quad id="4" vertex="13 14 15 16"/> <quad id="5" vertex="17 18 19 20"/> <quad id="6" vertex="21 22 23 24"/> </quad_array>