scpolytope.h File Reference Detailed DescriptionSimplified version of a polytope associated with a chart. To see the full version check cpolytope.h.
Definition in file scpolytope.h.
Macro Definition Documentation
The sampling radius for each chart polytope be adjusted taking into account the acceptance/rejection when sampling on each polytope. In this way the sampling area is adjusted to the actual span of the polytope and the rejection is reduced. The effect of this adjustment is probably minor, especially for problems that are solved fast (i.e., problems where few samples are drawn from each chart). The ratio at which the sampling radius is adjusted is defined in MOV_AVG_UP and MOV_AVG_DOWN. Definition at line 31 of file scpolytope.h. Referenced by main().
Initial space for faces. Extended as much as necessary. Definition at line 38 of file scpolytope.h. Referenced by DefineSPolytope(). Function Documentation
Defines an empty chart simplified polytope.
Definition at line 21 of file scpolytope.c. References Tscpolytope::face, Tscpolytope::ID, Tscpolytope::k, Tscpolytope::lsr, Tscpolytope::maxFaces, Tscpolytope::msr, Tscpolytope::nFaces, Tscpolytope::r, SPolytopeMaxVolume(), Tscpolytope::sr, and Tscpolytope::v. Referenced by InitChartInt(), and Polytope2SPolytope().
Defines a box.
Definition at line 43 of file scpolytope.c. References Tscpolytope::face, Tscpolytope::ID, INIT_NUM_FACES, Tscpolytope::maxFaces, and NEW. Referenced by CutSPolytopeWithFace(), and Polytope2SPolytope().
Copies the data defining the simple polytope from one chart to another.
Definition at line 54 of file scpolytope.c. References Tscpolytope::face, Tscpolytope::ID, Tscpolytope::k, Tscpolytope::lsr, Tscpolytope::maxFaces, Tscpolytope::msr, NEW, Tscpolytope::nFaces, Tscpolytope::r, Tscpolytope::sr, and Tscpolytope::v. Referenced by CopyChart().
Reduces a polytope bounding chart cropping it with a plane defined by the intersection of the chart ball with a ball centered at t with radious r. This ball is an approximation in the chart plane of the ball bounding another chart.
Definition at line 186 of file scpolytope.c. References CutSPolytopeWithFace(), Tscpolytope::k, Norm(), and Tscpolytope::r. Referenced by ForceChartCut(), and IntersectChartsInt().
This is the generic function cutting a simple polytope by a plane that can come from the intersection of two balls or from anywhere else. The plane is given in the form
where the are given in t, the are the variables in the tangent space, and is the dimension of this space. We simply add the face to the set of faces implicitly defining the polytope.
Definition at line 199 of file scpolytope.c. References DefineSPolytope(), Tscpolytope::face, Tscpolytope::ID, Tscpolytope::k, Tscpolytope::maxFaces, MEM_DUP, MEM_EXPAND, NEW, Tscpolytope::nFaces, NO_UINT, and Tscpolytope::v. Referenced by AddBorderConstraint(), CutSPolytope(), and Polytope2SPolytope().
Decides wheter or not a point in inside the simple polytope bounding a chart.
Definition at line 88 of file scpolytope.c. References Tscpolytope::face, GeneralDotProduct(), Tscpolytope::k, Tscpolytope::msr, and Norm(). Referenced by DetermineSPolytopeNeighbour(), InsideChartPolytope(), RandomPointInSPolytope(), SPolytopeRandomPointOnBoundary(), and SPolytopeVolume().
This function returns the neighbouring chart including a point in the polytope radious but outside the polytope. For points outside the chart ball or inside the polytope this function returns NO_UINT.
Definition at line 105 of file scpolytope.c. References Tscpolytope::face, FALSE, GeneralDotProduct(), Tscpolytope::ID, InsideSPolytope(), Tscpolytope::k, NEW, Tscpolytope::nFaces, NO_UINT, Norm(), Tscpolytope::r, and ScaleVector(). Referenced by DetermineChartNeighbour().
Ensures that a polytope includes a given point possibly modifying the faces.
Definition at line 170 of file scpolytope.c. References Tscpolytope::face, GeneralDotProduct(), Tscpolytope::k, Tscpolytope::nFaces, and Tscpolytope::v. Referenced by EnlargeChart().
Returns the radious of the ball included in the initial polytope.
Definition at line 229 of file scpolytope.c. References Tscpolytope::r.
Simple convex polytopes have an enclosing ball. This function returns the side of a box fully enclosing ths enclosing ball. This is basically used for plotting purposes.
Definition at line 234 of file scpolytope.c. References Tscpolytope::sr.
Returns the dimensionality of the space where the simple polytope is defined.
Definition at line 239 of file scpolytope.c. References Tscpolytope::k. Referenced by SPolytope2Polytope().
Returns the number of faces of a simple chart polytope.
Definition at line 244 of file scpolytope.c. References Tscpolytope::nFaces. Referenced by SPolytope2Polytope().
Returns the coeficients defining the face for a simple polytope associated to a chart. If n is above the number of faces of the polytope, nothing is changed in f.
Definition at line 249 of file scpolytope.c. References Tscpolytope::face, and Tscpolytope::k. Referenced by SPolytope2Polytope().
Returns a random point uniformly distributed in the boundary of the hypersphere defined in the tangent space. After sampling the point we check if it is actually inside the polytope. Charts that are basically sorounded by neighbours and only have a small portion of its ball in the border or expansion of the manifold could be arbitrarily hard to sample.
Definition at line 255 of file scpolytope.c. References InsideSPolytope(), Tscpolytope::k, and randomOnBall(). Referenced by RandomPointOnBoundary().
Drawns a random point inside the polytope with uniform distribution. Rejection sampling is used so for some degenerate polytopes it can take long.
Definition at line 262 of file scpolytope.c. References InsideSPolytope(), Tscpolytope::k, Tscpolytope::lsr, Tscpolytope::msr, Tscpolytope::nFaces, randomInBall(), Tscpolytope::sr, and TRUE. Referenced by ChartVolume(), and RandomPointInChart().
Returns the current sampling radius.
Definition at line 281 of file scpolytope.c. References Tscpolytope::sr. Referenced by GetChartSamplingRadius().
Increases the sampling radius after a succesful sampling or a succesful branch extension. The aim here is to try to reach further, if possible. When extending the sampling radious we keep track of the maximum sampling radius ever. All samples belonging to the polytope can not be further than this maximum from the center.
Definition at line 286 of file scpolytope.c. References MOV_AVG_UP, Tscpolytope::msr, and Tscpolytope::sr. Referenced by IncreaseChartSamplingRadius().
Decreases the sampling radious after an unsuceessful sampling or a collisiong when trying the create a new branch. When decresing the sampling radius we take care of not reducing it below a given threshold so that it is always significantly larger than the radius r. Definition at line 295 of file scpolytope.c. References Tscpolytope::lsr, MOV_AVG_DOWN, and Tscpolytope::sr. Referenced by DecreaseChartSamplingRadius().
Upper bound of the volume of the polytope. This is basically the area that RandomPointInSPolytope uses to drawn random samples.
Definition at line 304 of file scpolytope.c. References BallVolume(), Tscpolytope::k, and Tscpolytope::sr. Referenced by ChartVolume(), and InitEmptySPolytope().
Volume of the simple polytope considering the neighbouring relations (i.e., initial volume or maximum volume)
Definition at line 309 of file scpolytope.c. References BallVolume(), InsideSPolytope(), Tscpolytope::k, NEW, randomInBall(), Tscpolytope::sr, and Tscpolytope::v. Referenced by ChartMaxVolume().
Returns the number of neighbours of a polytope. Note that a simple polytope can consider as neighbours charts that where neighbours but are not neighbours any more.
Definition at line 332 of file scpolytope.c. References Tscpolytope::nFaces. Referenced by ChartNumNeighbours().
Returns the identifier of one of the neighbours of a polytope. Note that a simple polytope can consider as neighbours charts that where neighbours but are not neighbours any more.
Definition at line 337 of file scpolytope.c. References Tscpolytope::ID, and NO_UINT. Referenced by ChartNeighbourID(), and SPolytope2Polytope().
Computes the approximated memory used by the polytope (in bytes).
Definition at line 345 of file scpolytope.c. References Tscpolytope::k, and Tscpolytope::nFaces. Referenced by ChartMemSize().
Saves the information about the chart simple polytope (if any) to a given file.
Definition at line 355 of file scpolytope.c. References Tscpolytope::face, Tscpolytope::ID, Tscpolytope::k, Tscpolytope::lsr, Tscpolytope::maxFaces, Tscpolytope::msr, Tscpolytope::nFaces, Tscpolytope::r, Tscpolytope::sr, and Tscpolytope::v. Referenced by SaveChart().
Initializes the information about the chart polytope (if any) from a given file.
Definition at line 381 of file scpolytope.c. References Tscpolytope::face, Tscpolytope::ID, Tscpolytope::k, Tscpolytope::lsr, Tscpolytope::maxFaces, Tscpolytope::msr, NEW, Tscpolytope::nFaces, Tscpolytope::r, Tscpolytope::sr, and Tscpolytope::v. Referenced by LoadChart().
Deletes the structure allocated by DefineSPolytope.
Definition at line 415 of file scpolytope.c. References Tscpolytope::face, Tscpolytope::ID, Tscpolytope::maxFaces, and Tscpolytope::nFaces. Referenced by DeleteChart(). |
Follow us!