Vision and Mobile Robotics Laboratory | Software
|
|
Home | Members | Projects | Publications | Software | Videos | Internal |
Surface meshes are described by a list of 3-D points and triangular faces between the points that create a piecewise linear representation of a surface. Mesh Toolbox reads and writes triangular surface meshes as VRML version 1.0 indexed facesets. The 3-D position of vertices (as expressed in the Coordinate3 node), the connectivity of the mesh (as expressed by the IndexedFaceSet node), and the color of the mesh (as expressed in the diffuse color node) can change from mesh to mesh; the rest of the mesh and the order of the nodes must remain as presented below. The VRML file below represents a red mesh with two triagular faces and four vertices. For more information about the VRML format, the "Open Inventor Mentor" (in the Online books section of most SGI's) can be consulted. This convention for meshes does not assume that the faces in the mesh are oriented; the ShapeHints node insures that both sides of the mesh are displayed.
#VRML V1.0 ascii
Material {
diffuseColor [1 0 0]
}
ShapeHints {
vertexOrdering COUNTERCLOCKWISE
shapeType UNKNOWN_SHAPE_TYPE
}
Coordinate3 { point [
0.0 0.0 0.0,
2.0 0.0 0.0,
2.0 2.0 1.0,
0.0 2.0 1.0
]
}
IndexedFaceSet { coordIndex [
0,1,2,-1,
1,2,3-1
]
}
Surface meshes have the suffix '.wrl'.
On an SGI, ivview can be used to view VRML meshes. On other platforms, other VRML viewers (Cosmoplayer, vrweb,...) can be used.
Rigid transformations are used in Mesh Toolbox when registuring meshes and integrating them into complete surfaces. MeshToolbox stores rigid transformations in a file as a list of six floats. First the translation components (tx,ty,tz) are listed, then the fixed angles (rx,ry,rz) in degrees are listed. For example:
4.0 3.0 -2.0 10.1 33.4 -29.0
is a translation by (4.0,3.0,-2.0) followed by a rotation of (10.1 33.4 -29.0). For more on tranformation matrices see the book by John Craig, "Introduction to Robotics".
Transformation matrices have the suffix .'trans'.
Projection matrices are used in Mesh Toolbox for texture mapping images onto surface meshes and storing the sensor origin. Mesh Toolbox stores 3 row by 4 column projection matrices as a list of 12 floats. First the top row is listed then the middle row and then the bottom row. A file the looks like
1.0
0.0
0.0
0.0
0.0
1.0
0.0
0.0
0.0
0.0
1.0
0.0
contains the identity projection matrix. For more on projection matrices see "Three Dimensional Computer Vision" by Olivier Faugeras. If a sensor does not normally use a projection matrix (e.g., the Perceptron Laser range finder which has a spherical coordinate system), a dummy projection matrix used to encode the sensor origin in world coordinates can still be created. Suppose the sensor origin is (sx,sy,sz) in world coordinates, then the appropriate projection matrix is
1.0
0.0
0.0
sx
0.0
1.0
0.0
sy
0.0
0.0
1.0
sz
Projection matrices for each view are required for IntegrateMeshes.
Projection matrics have the suffix '.pa'.