views:

57

answers:

0

I would like to generate output to display the numeric data of the Half-Edge Structure that is based from an input of polygonal mesh data (in numeric data form).

The concept to read the polygonal model basically is like this:

For the INPUT, the file is in OFF format and include datas like
(a) First part: the number of vertex, number of face, and number of edge.
(b) Second part: line of each vertex,
(c) Last part: line of each polygonial face.

Example: (based from above)
First part:
4 4 6

Second part:
-1.7 0.0 1.0
1.7 0.0 1.0
0.0 0.0 -2.0
0.0 3.0 0.0

Last part:
3 0 1 2
3 0 3 2
3 3 2 1
3 0 2 3

And, the program must be able to generate following data:

(a) Vertices:
1. vertex index (Total number of vertex input)
2. each x-coordinate, y-coordinate, z-coordinate, and half edge
(b) Half-Edges:
1. half edge index (Total number of half edge to be generated from a.2. above)
2. starting vertex, face, next half edge, and adjacent half edge.
(c) Faces:
1. face index (Total number of face as shown on b.2. starting from 0)
2. half edge.

The concept is like that, no need to display visual graphic but need to use algorithm and generate simple Half-Edge Structure data, then read the OUTPUT file by using Notepad, etc.