Thursday, May 12, 2005

STL files and Collision Detection

Swift Custom File Formats

The UNC collision detection packages offer speed and flexibility. The file types that are used contain all the sets of vertices and faces that represent the object. The faces for this project will be triangles, although this is not a requirement. The UNC collision detection package SWIFT uses a specialized file format named TRI. All vertices are listed, then the faces are built from references these vertices.

The format for a TRI file is

TRI
nv = number of vertices
nf = number of faces
coordinates = list of the vertex position coordinates as reals.
There are 3*nv coordinates.
face indices = list of the vertex indices given in CCW orientation
for each face. There are 3*nf indices.

[1]

The main difference between STL files and TRI files are the way they represent the triangles. STL files specify coordinates for each vertex in each triangle (face). This is inefficient because in a closed object a vertex can share multiple faces. The vertex is repeated. The TRI file format, among others, lists all possible vertices first. Then, the triangle faces are created by referencing 3 vertices.

Affect

There is a file format TRIS that is similar to an STL file. Techniques on converting STL files will be researched. Currently I have found a program to convert a STL file to an .OBJ file.

For an explanation of why the project needs collision detection, see force-rendering-and-collision.html.

[1] Ehman, Stephan. SWIFT Speedy Walking via Improved Feature Testing. Application Manual. http://www.cs.unc.edu/􀀀 geom/SWIFT/

0 Comments:

Post a Comment

<< Home


Counters