# Movie BYU Format

by Ken Chin-Purcell <ken@msc.edu>

Minnesota Supercomputer Center

Posted to comp.graphics on 9 Jan 92.

## File Format

The Movie BYU format is an ascii file format for unstructured collections of
polygons. Integers are written using a FORTRAN I/O format of 10I8. Floating
point numbers are written using a FORTRAN I/O format of 6E12.5.
BYU geometry is described using verticies, connectivity, and parts. A vertex
is a point location, and is specified by x, y and z coordinates. The order
that the verticies appear in the file determines vertex indecies, with the
first vertex being number one, the next vertex number two, and so forth. A
polygon is specified as a list of vertecies. In the file format the last
vertex index for each polygon is negated. A part is composed of a
consecutive set of polygons, such as polygons 121 thru 233.

The geometry file has four sections. The first section is one line long, and
specifies array dimensions. The second section describes the part
boundaries. The third section contains x-y-z coordinates for all of the
vertecies. The fourth section is the connectivity array, a list of vertex
indecies that describe the polygons.

The first section contains four integers in the following order: the number
of parts, the number vertecies, the number of polygons, and the number of
entries in the connectivity array.

The next section contains two integers for every part: the starting polygon
number and the ending polygon number.

The third section lists three floating point numbers for every vertex: the
x, y and z coordinates.

The last section is a list of integers describing connectivity. For each
polygon the vertex numbers are listed, with the last vertex negated.

The scalar file is simply a list of floating points numbers, one per vertex.

## Example File

Geometry file for a unit cube:

1 8 6 24
1 6
0.00000e+00 0.00000e+00 0.00000e+00 1.00000e+00 0.00000e+00 0.00000e+00
1.00000e+00 1.00000e+00 0.00000e+00 0.00000e+00 1.00000e+00 0.00000e+00
0.00000e+00 0.00000e+00 1.00000e+00 1.00000e+00 0.00000e+00 1.00000e+00
1.00000e+00 1.00000e+00 1.00000e+00 0.00000e+00 1.00000e+00 1.00000e+00
1 4 3 -2 5 6 7 -8 1 2
6 -5 2 3 7 -6 3 4 8 -7
4 1 5 -8

A sample scalar file for this cube:

0.00000e+00 1.00000e+00 2.00000e+00 3.00000e+00 4.00000e+00 5.00000e+00
6.00000e+00 7.00000e+00