GEOMVIEW
Last update: 13.11.01
Le logiciel GEOMVIEW
GEOMVIEW is an interactive program for viewing and manipulating
geometric objects, wtitten by staff members of the Geometry Center at 'geom.umn.edu'.
See also the GEOMVIEW
home page.

OOGL File Formats
Conventions:
The objects you can load into GEOMVIEW are called OOGL objects.
OOGL stands for "Object Oriented Graphics Library"; it is the
library upon GEOMVIEW is built.
Examples of most file types live in GEOMVIEW's 'data/geom' directory.
GEOMVIEW uses normal vectors to determine how an object is shaded. The
direction of the normal is significant in this calculation.
When normals are supplied with an object, the direction of the normal
is determines by the given data.
When normals are not supplied with the object, GEOMVIEW computes normal
vectors automatically; in this case normals point toward the side from
which the vertices appear in counterclockwise order.
Object File Formats: (
HTML-tutorial)
- QUAD
- MESH
- Bezier Surfaces
- OFF
The convetional suffix for OFF file is 'off'.
Syntax:
[C][N][4]OFF # header keyword (optional)
NVertices NFaces NEdges # NEdges not used or checked
x[0] y[0] z[0] # Verices, possibly with colors
# and/or normal if COFF or NOFF
...
x[NVertices-1] y[NVertices-1] z[NVertices-1]
# Faces
# Nv = # vertices on this face
# v[0] ... v[Nv-1]: vertex indices
# in range 0..NVertices-1
Nv v[0] v[1] ... v[Nv-1] colorspec
...
# colorspec continues past v[Nv-1]
# to end-of-line, may be 0 to 4 numbers
# nothing: defalut
# J integer: color map index
# 3 or 4 integers: RGB[A] values 0..255
# 3 or 4 floats: RGB[A] values 0..1
OFF files (object file format) represents collections of planar
polygons with possibly shared vertices, a convienient way to describe
polyhedra. The polygons may be concave but there is no provision
for polygons cantaining holes.
An OFF file may begin with the kayword OFF; it's recommened but
optional, as many existing files lack this keyword.
Three ASCII intergers follow: NVertices NFaces NEdges.
These are the number of vertices, faces, and edges respectively.
Current software does not use or check NEdges. It needn't be correct
but must be present.
The vertex coordinates follow: dimension * Nvertices floating point
values. They're implicitly numbered 0 through Nvertices-1. dimension
is either 3 (default) or 4 (specified by the key character 4 directly
before OFF in the keyword).
Following these are the face descriptions, typically written with one
line per face. Each has the form
N Vert1 Vert2 ... VertN [color]
Here N ist the number of vertices on this face, and Vert1 through VertN are
indices into the list of vertices (in range 0..NVertices-1).
The optional color may take several forms. Line breaks
are significant here: the color descritption begins after VertN and
ends with the end of the line (or the next # comment). A color
may be:
nothing: the default color
one integer: index into "the" colormap
three or four integers: RGB and possibly alpha values in the range
0..255
three or four floating-point numbers: RGB and possibly alpha values
in the range 0..1
The meaning of "default color" varies. If no face of the object has
a color, al inherit the environment's default material color. If
some but not all faces have colors, the default is gray (R,G,B,A=0.666).
Example (with color) :
OFF
25 50 0
1.300000 0.000000 0.000000
0.401722 1.236373 0.000000
-1.051722 0.764121 0.000000
-1.051722 -0.764121 0.000000
0.401722 -1.236373 0.000000
1.092705 0.000000 0.285317
0.337664 1.039224 0.285317
-0.884017 0.642276 0.285317
-0.884017 -0.642276 0.285317
0.337664 -1.039224 0.285317
0.757295 0.000000 0.176336
0.234017 0.720230 0.176336
-0.612664 0.445127 0.176336
-0.612664 -0.445127 0.176336
0.234017 -0.720230 0.176336
0.757295 0.000000 -0.176336
0.234017 0.720230 -0.176336
-0.612664 0.445127 -0.176336
-0.612664 -0.445127 -0.176336
0.234017 -0.720230 -0.176336
1.092705 0.000000 -0.285317
0.337664 1.039224 -0.285317
-0.884017 0.642276 -0.285317
-0.884017 -0.642276 -0.285317
0.337664 -1.039224 -0.285317
3 19 20 24 0.653607 0.032241 0.587214
3 18 24 23 0.653607 0.032241 0.587214
3 18 19 24 0.653607 0.032241 0.587214
3 17 23 22 0.653607 0.032241 0.587214
3 17 18 23 0.653607 0.032241 0.587214
3 16 22 21 0.653607 0.032241 0.587214
3 16 17 22 0.653607 0.032241 0.587214
3 15 20 19 0.653607 0.032241 0.587214
3 15 21 20 0.653607 0.032241 0.587214
3 15 16 21 0.653607 0.032241 0.587214
3 14 15 19 0.653607 0.032241 0.587214
3 13 19 18 0.653607 0.032241 0.587214
3 13 14 19 0.653607 0.032241 0.587214
3 12 18 17 0.653607 0.032241 0.587214
3 12 13 18 0.653607 0.032241 0.587214
3 11 17 16 0.653607 0.032241 0.587214
3 11 12 17 0.653607 0.032241 0.587214
3 10 15 14 0.653607 0.032241 0.587214
3 10 16 15 0.653607 0.032241 0.587214
3 10 11 16 0.653607 0.032241 0.587214
3 9 10 14 0.653607 0.032241 0.587214
3 8 14 13 0.653607 0.032241 0.587214
3 8 9 14 0.653607 0.032241 0.587214
3 7 13 12 0.653607 0.032241 0.587214
3 7 8 13 0.653607 0.032241 0.587214
3 6 12 11 0.653607 0.032241 0.587214
3 6 7 12 0.653607 0.032241 0.587214
3 5 10 9 0.653607 0.032241 0.587214
3 5 11 10 0.653607 0.032241 0.587214
3 5 6 11 0.653607 0.032241 0.587214
3 4 23 24 0.653607 0.032241 0.587214
3 4 5 9 0.653607 0.032241 0.587214
3 3 22 23 0.653607 0.032241 0.587214
3 3 9 8 0.653607 0.032241 0.587214
3 3 4 9 0.653607 0.032241 0.587214
3 3 23 4 0.653607 0.032241 0.587214
3 2 21 22 0.653607 0.032241 0.587214
3 2 8 7 0.653607 0.032241 0.587214
3 2 3 8 0.653607 0.032241 0.587214
3 2 22 3 0.653607 0.032241 0.587214
3 1 20 21 0.653607 0.032241 0.587214
3 1 7 6 0.653607 0.032241 0.587214
3 1 2 7 0.653607 0.032241 0.587214
3 1 21 2 0.653607 0.032241 0.587214
3 0 24 20 0.653607 0.032241 0.587214
3 0 4 24 0.653607 0.032241 0.587214
3 0 5 4 0.653607 0.032241 0.587214
3 0 6 5 0.653607 0.032241 0.587214
3 0 1 6 0.653607 0.032241 0.587214
3 0 20 1 0.653607 0.032241 0.587214
Example (without color) :
OFF
25 50 0
1.300000 0.000000 0.000000
0.401722 1.236373 0.000000
-1.051722 0.764121 0.000000
-1.051722 -0.764121 0.000000
0.401722 -1.236373 0.000000
1.092705 0.000000 0.285317
0.337664 1.039224 0.285317
-0.884017 0.642276 0.285317
-0.884017 -0.642276 0.285317
0.337664 -1.039224 0.285317
0.757295 0.000000 0.176336
0.234017 0.720230 0.176336
-0.612664 0.445127 0.176336
-0.612664 -0.445127 0.176336
0.234017 -0.720230 0.176336
0.757295 0.000000 -0.176336
0.234017 0.720230 -0.176336
-0.612664 0.445127 -0.176336
-0.612664 -0.445127 -0.176336
0.234017 -0.720230 -0.176336
1.092705 0.000000 -0.285317
0.337664 1.039224 -0.285317
-0.884017 0.642276 -0.285317
-0.884017 -0.642276 -0.285317
0.337664 -1.039224 -0.285317
3 19 20 24
3 18 24 23
3 18 19 24
3 17 23 22
3 17 18 23
3 16 22 21
3 16 17 22
3 15 20 19
3 15 21 20
3 15 16 21
3 14 15 19
3 13 19 18
3 13 14 19
3 12 18 17
3 12 13 18
3 11 17 16
3 11 12 17
3 10 15 14
3 10 16 15
3 10 11 16
3 9 10 14
3 8 14 13
3 8 9 14
3 7 13 12
3 7 8 13
3 6 12 11
3 6 7 12
3 5 10 9
3 5 11 10
3 5 6 11
3 4 23 24
3 4 5 9
3 3 22 23
3 3 9 8
3 3 4 9
3 3 23 4
3 2 21 22
3 2 8 7
3 2 3 8
3 2 22 3
3 1 20 21
3 1 7 6
3 1 2 7
3 1 21 2
3 0 24 20
3 0 4 24
3 0 5 4
3 0 6 5
3 0 1 6
3 0 20 1
- VECT
- INST
- LIST
- TLIST
- GROUP
- DISCGRP

Return to
Stefanie Hahmann's homepage.