obj_to_tri_surface_test


obj_to_tri_surface_test, an Octave code which calls obj_to_tri_surface(), which reads data from an OBJ file describing a polygonal mesh of a 3D surface, and converts it to a pair of arrays describing a triangular mesh or TRI_SURFACE.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Related Data and Programs:

obj_to_tri_surface, an Octave code which reads an OBJ file and extracts the surface mesh data as a tri_surface dataset.

Source Code:

CESSNA is a Cessna airplane. The OBJ version is drawn using 3745 nodes and 3897 faces. The faces range in order from 3 (triangles) up to 42! OBJ_TO_TRI_SURFACE converts this to 3745 nodes and 7446 triangles before writing it out as a TRI_SURFACE file.

CUBE is a cube using 12 triangular faces and 36 nodes.

HUMANOID is a humanoid shape. The OBJ version is drawn using 64 nodes and 48 quadrilaterals. OBJ_TO_TRI_SURFACE converts this to 64 nodes and 96 triangles before writing it out as a TRI_SURFACE file.

SHUTTLE is the space shuttle. The OBJ version is drawn using 310 nodes and 393 faces, with 170 triangles and 223 quadrilaterals. OBJ_TO_TRI_SURFACE converts this to 310 nodes and 616 triangles before writing it out as a TRI_SURFACE file.


Last revised on 15 June 2023.