MFPolytope
[MFChart]

Collaboration diagram for MFPolytope:


Classes

class  MFPolytope
 A polytope, which represents a neighborhood on a manifold. More...

Functions

MFPolytope MFCreateHyperCubeAtOrigin (int d, double halfedge, MFErrorHandler e)
 Creates a d-dimensional hypercube whose faces are orthogonal to one coorindate axis, whose edges are length 2*halfedge, and whose center is at the origin.
MFPolytope MFCreateSimplexAtOrigin (int d, double side, MFErrorHandler e)
 Creates a d-dimensional simplex. The last d-k coordinates of the kth vertex are zero.
void MFSubtractHalfSpaceFromPolytope (MFPolytope P, int side, MFKVector n, double o, MFErrorHandler e)
 Removes a half space from a polytope. The positive (side>0) side is the set of points x that satisfy x.n-o>0.
void MFClipPolytope (MFPolytope P, int index, double *din, int mark, MFErrorHandler e)
 Clips a polytope. index is the label to use for the new face, din[nv] is an array indicating which side of the plane each vertex lies. mark is simply an integer carried along with the face. multifario uses it to determine the polytop which lies opposite the face.
int MFPolytopeDimension (MFPolytope P, MFErrorHandler e)
 returns the embedding dimension of the polytope.
void MFPolytopeVertex (MFPolytope P, int i, MFKVector v, MFErrorHandler e)
 returns the embedding dimension of the polytope.
int MFPolytopeVertexIndex (MFPolytope P, int v, int i, MFErrorHandler e)
 Returns an index (face number) of a vertex.
int MFPolytopeNumberOfVertexIndices (MFPolytope P, int v, MFErrorHandler e)
 Returns the number of indices of a vertex (how many faces it lies on).
double MFPolytopeRadiusOfVertex (MFPolytope P, int v, MFErrorHandler e)
 Returns the distance between a vertex and the origin.
double MFPolytopeLargestRadiusOfVertex (MFPolytope P, MFErrorHandler e)
 Returns the largest distance between a vertex and the origin over all the vertices.
int MFPolytopeNumberOfFaces (MFPolytope P, MFErrorHandler e)
 Returns the number of faces of the polytope.
int MFPolytopeFaceIndex (MFPolytope P, int f, MFErrorHandler e)
 Returns the index of a face.
MFKVector MFPolytopeFaceNormal (MFPolytope P, int f, MFErrorHandler e)
 Returns the nroaml to a face.
double MFPolytopeFaceOrigin (MFPolytope P, int f, MFErrorHandler e)
 Returns the origin of a face (the signed distance from the origin along the normal to the face).
int MFPolytopeNumberOfVerticesOnFace (MFPolytope P, int f, MFErrorHandler e)
 Returns the number of vertices that lie on a face.
int MFPolytopeInterior (MFPolytope P, MFKVector x, MFErrorHandler e)
 Returns TRUE if x is inside the polytope.
MFPolytope MFPolytopeRemoveSmallEdges (MFPolytope P, double epsilon, MFErrorHandler e)
 Returns a new polytope which has no edges shorter than epsilon. This is done by merging the endpoints of such edges.
int MFPolytopeClosestFace (MFPolytope P, MFKVector x, double *d, MFErrorHandler e)
 Finds the closest face to a point.
void MFPolytopeSetVertexMark (MFPolytope P, int v, int mark, MFErrorHandler e)
 Sets the mark associated with a vertex.
void MFRefPolytope (MFPolytope polytope, MFErrorHandler e)
 Adds a reference to a polytope.
void MFFreePolytope (MFPolytope polytope, MFErrorHandler e)
 Frees a reference to a polytope, and deletes the polytope if there are no references left.
void MFWritePolytope (FILE *fid, MFPolytope polytope, MFErrorHandler e)
 Writes a polytope to a file.
MFPolytope MFReadPolytope (FILE *fid, MFAtlas A, MFErrorHandler e)
 Reads a polytope from a file.

Function Documentation

void MFClipPolytope MFPolytope  P,
int  index,
double *  din,
int  mark,
MFErrorHandler  e
 

Clips a polytope. index is the label to use for the new face, din[nv] is an array indicating which side of the plane each vertex lies. mark is simply an integer carried along with the face. multifario uses it to determine the polytop which lies opposite the face.

Parameters:
P The original polytope (will be modified).
index The index used for this new face.
din An array of length at least the number of vertices. Vertices with positive din are kept, negative are removed.
mark A number carried along on the face.
e A place to report errors.

MFPolytope MFCreateHyperCubeAtOrigin int  d,
double  halfedge,
MFErrorHandler  e
 

Creates a d-dimensional hypercube whose faces are orthogonal to one coorindate axis, whose edges are length 2*halfedge, and whose center is at the origin.

Parameters:
d The dimension.
halfedge Half the length of an edge.
e A place to report errors.
Returns:
A new polytope.

MFPolytope MFCreateSimplexAtOrigin int  d,
double  side,
MFErrorHandler  e
 

Creates a d-dimensional simplex. The last d-k coordinates of the kth vertex are zero.

Parameters:
d The dimension.
side The length of an edge.
e A place to report errors.
Returns:
A new polytope.

void MFFreePolytope MFPolytope  polytope,
MFErrorHandler  e
 

Frees a reference to a polytope, and deletes the polytope if there are no references left.

Parameters:
polytope The polytope being unreferenced.
e A place to report errors.
See also:
ReferenceCounting MFRefPolytope

int MFPolytopeClosestFace MFPolytope  P,
MFKVector  x,
double *  d,
MFErrorHandler  e
 

Finds the closest face to a point.

Parameters:
P The polytope.
x The point.
d A pointer to double to set to the distance.
e A place to report errors.
Returns:
The face.

int MFPolytopeDimension MFPolytope  P,
MFErrorHandler  e
 

returns the embedding dimension of the polytope.

Parameters:
P The polytope.
e A place to report errors.
Returns:
The dimension.

int MFPolytopeFaceIndex MFPolytope  P,
int  f,
MFErrorHandler  e
 

Returns the index of a face.

Parameters:
P The polytope.
f Which face.
e A place to report errors.
Returns:
The index of the face.

MFKVector MFPolytopeFaceNormal MFPolytope  P,
int  f,
MFErrorHandler  e
 

Returns the nroaml to a face.

Parameters:
P The polytope.
f Which face.
e A place to report errors.
Returns:
The normal to a face.

double MFPolytopeFaceOrigin MFPolytope  P,
int  f,
MFErrorHandler  e
 

Returns the origin of a face (the signed distance from the origin along the normal to the face).

Parameters:
P The polytope.
f Which face.
e A place to report errors.
Returns:
The origin of the face.

int MFPolytopeInterior MFPolytope  P,
MFKVector  x,
MFErrorHandler  e
 

Returns TRUE if x is inside the polytope.

Parameters:
P The polytope.
x The point.
e A place to report errors.
Returns:
TRUE if the point is interior, FALSE otherwise.

double MFPolytopeLargestRadiusOfVertex MFPolytope  P,
MFErrorHandler  e
 

Returns the largest distance between a vertex and the origin over all the vertices.

Parameters:
P The polytope.
e A place to report errors.
Returns:
The greatest distance from the origin to a vertex.

int MFPolytopeNumberOfFaces MFPolytope  P,
MFErrorHandler  e
 

Returns the number of faces of the polytope.

Parameters:
P The polytope.
e A place to report errors.
Returns:
The number of faces.

int MFPolytopeNumberOfVertexIndices MFPolytope  P,
int  v,
MFErrorHandler  e
 

Returns the number of indices of a vertex (how many faces it lies on).

Parameters:
P The polytope.
v Which vertex.
e A place to report errors.
Returns:
The number of vertices.

int MFPolytopeNumberOfVerticesOnFace MFPolytope  P,
int  f,
MFErrorHandler  e
 

Returns the number of vertices that lie on a face.

Parameters:
P The polytope.
f Which face.
e A place to report errors.
Returns:
The number of vertices on the face.

double MFPolytopeRadiusOfVertex MFPolytope  P,
int  v,
MFErrorHandler  e
 

Returns the distance between a vertex and the origin.

Parameters:
P The polytope.
v Which vertex.
e A place to report errors.
Returns:
The distance from the origin to the vertex.

MFPolytope MFPolytopeRemoveSmallEdges MFPolytope  P,
double  epsilon,
MFErrorHandler  e
 

Returns a new polytope which has no edges shorter than epsilon. This is done by merging the endpoints of such edges.

Parameters:
P The polytope.
epsilon The smallest edge allowed..
e A place to report errors.
Returns:
A new polytope with no short edges.

void MFPolytopeSetVertexMark MFPolytope  P,
int  v,
int  mark,
MFErrorHandler  e
 

Sets the mark associated with a vertex.

Parameters:
P The polytope.
v The vertex.
mark The new vertex mark.
e A place to report errors.
Returns:
The current vertex mark.

void MFPolytopeVertex MFPolytope  P,
int  i,
MFKVector  v,
MFErrorHandler  e
 

returns the embedding dimension of the polytope.

Parameters:
P The polytope.
i Which vertex.
v A place to put the coordinates of the vertex.
e A place to report errors.

int MFPolytopeVertexIndex MFPolytope  P,
int  v,
int  i,
MFErrorHandler  e
 

Returns an index (face number) of a vertex.

Parameters:
P The polytope.
v Which vertex.
i Which index.
e A place to report errors.
Returns:
The index.

MFPolytope MFReadPolytope FILE *  fid,
MFAtlas  A,
MFErrorHandler  e
 

Reads a polytope from a file.

Parameters:
fid The file to write to.
A The Atlas for the polytope.
e A place to report errors.
Returns:
polytope The polytope.

void MFRefPolytope MFPolytope  polytope,
MFErrorHandler  e
 

Adds a reference to a polytope.

Parameters:
polytope The polytope being referenced.
e A place to report errors.
See also:
ReferenceCounting MFFreePolytope

void MFSubtractHalfSpaceFromPolytope MFPolytope  P,
int  side,
MFKVector  n,
double  o,
MFErrorHandler  e
 

Removes a half space from a polytope. The positive (side>0) side is the set of points x that satisfy x.n-o>0.

Parameters:
P The original polytope (will be modified).
side Which side, positive or negative of the hyperplane.
n The normal of the hyperplane.
o The distance from the origin along the normal to the hyperplane.
e A place to report errors.

void MFWritePolytope FILE *  fid,
MFPolytope  polytope,
MFErrorHandler  e
 

Writes a polytope to a file.

Parameters:
fid The file to write to.
polytope The polytope being queried.
e A place to report errors.


Generated on Tue Jan 30 13:40:27 2007 for multifario by  doxygen 1.4.6