This tutorial gives an insight into the start of a new application used to treat polyhedral surfaces in R3. To convert existing Wavefront `obj` files to polymake application surface format we included a simple obj2surf script.

## A very simple example: the 3-cube

A polyhedral surface consist of its combinatorial structure given by the FACETS and a GEOMETRIC_REALIZATION. So a file of a cube contains at least the following:

FACETS {0 4 6 2} {7 5 1 3} {5 4 0 1} {2 6 7 3} {0 2 3 1} {6 4 5 7} GEOMETRIC_REALIZATION -1 -1 -1 1 -1 -1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 1

The application polytope deals with the simplest kind of polyhedral surfaces, that is, polyhedral 3-spheres. To convert a polytope to a surface use the client poly2surf:

> poly2surf my_surf.surf my_poly.poly

To verify that this really was a sphere you may calculate its EULER_CHARACTERISTIC and GENUS

> polymake my_surf.surf EULER_CHARACTERISTIC GENUS EULER_CHARACTERISTIC 2 GENUS 0

## A simple example: A quad surface

The following example is an equivelar surface as described by McMullen, Schulz, and Wills, and later by Joswig & Schröder contained in the Schlegel diagram of neighborly cubical polytopes. The graph of the surface is the graph of a five dimensional cube. We may calculate the GENUS of the surface and have a look at the MORSE_MATCHING_CRITICAL_FACE_VECTOR. We observe that the MORSE_MATCHING is optimal, since it has exactly one critical node, 2×GENUS critical edges, and one critical two dimensional cell:

> polymake quad_surf.surf GENUS MORSE_MATCHING_CRITICAL_FACE_VECTOR GENUS 5 MORSE_MATCHING_CRITICAL_FACE_VECTOR 1 10 1

To verify that this really is an equivelar surface of type `(4,q)`, that is, all polygons are quadrilaterals and all vertices have the same degree, we ask `polymake` for the POLYGON_SIZES and VERTEX_SIZES:

> polymake quad_surf.surf POLYGON_SIZES VERTEX_SIZES POLYGON_SIZES { (4 40) } VERTEX_SIZES { (5 32) }

We see that all 40 polygons are quadrilaterals and all the vertices have degree five. Similarly to the application topaz there are several visualization methods related to the MORSE_MATCHING. The corresponding `polymake` commands are:

> polymake quad_surf.surf "VISUAL(FacetStyle => 'transparency .5')->MORSE_MATCHING->FACES(MORSE_MATCHING_CRITICAL_FACES)" > polymake quad_surf.surf "VISUAL_FACE_LATTICE->MORSE_MATCHING->FACES(MORSE_MATCHING_CRITICAL_FACES)"