#include <ImplicitizeCurveAlgo.h>
Public Member Functions | |
ImplicitizeCurveAlgo () | |
Default constructor. | |
ImplicitizeCurveAlgo (int deg) | |
Constructor. | |
ImplicitizeCurveAlgo (const SplineCurve &curve, int deg) | |
Constructor. | |
void | useSplineCurve (const SplineCurve &curve) |
Load the spline curve to be implicitized. | |
void | setDegree (int deg) |
Choose the degree of the implicit representation. | |
void | setTolerance (double tol) |
Set the tolerance. | |
void | perform () |
Perform the implicitization. | |
void | getResultData (BernsteinTriangularPoly &implicit, BaryCoordSystem2D &bc, double &sigma_min) |
Get the result of the implicitization. |
Input: A curve of type SplineCurve, and the degree that is chosen for the implicit representation.
Output: A barycentric coordinate system, and the Bernstein polynomial that represents the implicit curve.
The algorithm first defines a barycentric coordinate system in terms of a triangle that is slightly larger than the bounding box of the spline curve. It then computes the Bernstein polynomial representing the implicit curve. If the chosen degree is too low to produce the exact result, an approximate implicit curve is produced. If the degree is too high, the resulting polynomial will be reducible and contain the exact implicitization as a factor. If the input curve consists of multiple segments, the output polynomial will be a product of the separate implicit curves, or an approximation of it.
Definition at line 69 of file ImplicitizeCurveAlgo.h.
Go::ImplicitizeCurveAlgo::ImplicitizeCurveAlgo | ( | int | deg | ) | [inline, explicit] |
Constructor.
deg | degree of the implicit representation |
Definition at line 75 of file ImplicitizeCurveAlgo.h.
Go::ImplicitizeCurveAlgo::ImplicitizeCurveAlgo | ( | const SplineCurve & | curve, | |
int | deg | |||
) | [inline] |
Constructor.
curve | spline curve to be implicitized | |
deg | degree of the implicit representation |
Definition at line 79 of file ImplicitizeCurveAlgo.h.
void Go::ImplicitizeCurveAlgo::useSplineCurve | ( | const SplineCurve & | curve | ) | [inline] |
Load the spline curve to be implicitized.
curve | curve on SplineCurve form |
Definition at line 84 of file ImplicitizeCurveAlgo.h.
void Go::ImplicitizeCurveAlgo::setDegree | ( | int | deg | ) | [inline] |
Choose the degree of the implicit representation.
deg | degree |
Definition at line 89 of file ImplicitizeCurveAlgo.h.
void Go::ImplicitizeCurveAlgo::setTolerance | ( | double | tol | ) | [inline] |
Set the tolerance.
tol | tolerance; default value is 3.0e-15 |
Definition at line 94 of file ImplicitizeCurveAlgo.h.
void Go::ImplicitizeCurveAlgo::perform | ( | ) |
Perform the implicitization.
This function runs the implicitization algorithm.
void Go::ImplicitizeCurveAlgo::getResultData | ( | BernsteinTriangularPoly & | implicit, | |
BaryCoordSystem2D & | bc, | |||
double & | sigma_min | |||
) | [inline] |
Get the result of the implicitization.
implicit | a BernsteinTriangularPoly representing the implicit curve | |
bc | the barycentric coordinate system in which the BernsteinTriangularPoly is defined |
Definition at line 106 of file ImplicitizeCurveAlgo.h.