Virtual Processing of mathematical models

by Anna Matveeva

PlyFile

This is a Python module, which provides a simple facility for reading and writing ASCII and binary PLY files. (via documentation )

It begins with a header as seen here:
PlyFile Meaning
ply identifies the file as a plyfile
format ascii 1.0
format binary little endian 1.0
format binary big endian 1.0
chooses the encoding of the file
comment allows for commenting on the plyfile
element vertex describes vertices as a tupel of coordinates
property varibale x, y, z coordinate tupel for the vertex
element face describes object faces as a tupel
end_head ends the header of the plyfile

This is better explained with an example. This is a tetrahedron:

tetrahedron plyFile Meaning
ply identifies the file as a plyfile
format ascii 1.0
chooses the encoding of the file
element vertex 4 tetrahedron has 4 vertices
property float x
property float y
property float z
coordinates
property list uchar int vertex_indices definition of the faces
property uchar red
property uchar green
property uchar blue
introducing color
end_head ends the header of the plyfile

With the following body-content that comes after the header

simple tetrahedron
This is the same simple tetrahedron designed on GeoGebra

This can either be the body in the plyFile or, as a comparison, the same tetrahedron defined in Python.

body of a plyFile describing a tetrahedron Python Code to generate tetraherdron

Both of these generate the same tetrahedron as seen previously.