How to define poly.data

The file poly.data provides sample data which will appear in the "Data Selection" area. The following explains how to define data in the file. The file should be stored in the same directory as other applet codes.


The following sysmbols are used in the data file.
##
The line with this mark is a comment line.
&&
Next single line is the name of the data set
&M
Next single line is used in order to multiply the value in vertex section(&V). This is for the convenient use when user just want to copy a data set from other source and the scale is not appropriate.
&V
Next lines are data for a vertex list. One single line represents one vertex, which should contain x, y, z data in this order. There must be at least one space between each data item. The program considers the data as vertex data until it encounters a blank line.
&F
Next sequential lines are data for a face list. One single line represents one face. There must be at least one space between each data item. The program consider the data as face data until it encounters a blank line.

example

## TETRAHEDRON : centered at the orgin and scaled to fit inside a unit sphere

&& 
TETRAHEDRON

&M
45

&V 
0.453608  0.890430  0.037037
0.544331 -0.628540 -0.555555
-0.090722 -0.366647  0.925925
-0.907218  0.104757 -0.407407

&F 
0 2 1
0 1 3
0 3 2
1 2 3

## CUBE : centered at the orgin and scaled to fit inside a unit sphere

&&
CUBE

&M
45

&V
0.577350269 0.577350269 0.577350269
0.577350269 0.577350269 -0.577350269
0.577350269 -0.577350269 0.577350269
0.577350269 -0.577350269 -0.577350269
-0.577350269 0.577350269 0.577350269
-0.577350269 0.577350269 -0.577350269
-0.577350269 -0.577350269 0.577350269
-0.577350269 -0.577350269 -0.577350269

&F
0 2 1
1 2 3
4 0 5
5 0 1
6 4 5
6 5 7
2 6 7
2 7 3
6 2 0 
0 4 6
3 7 1
7 5 1