#include <nurbs.hh>
Inheritance diagram for PLib::NurbsCurve::
Public Methods | |
NurbsCurve () | |
NurbsCurve (const NurbsCurve< T, N > &nurb) | |
NurbsCurve (const Vector< HPoint_nD< T, N > > &P1, const Vector< T > &U1, int deg=3) | |
NurbsCurve (const Vector< Point_nD< T, N > > &P1, const Vector< T > &W, const Vector< T > &U1, int deg=3) | |
virtual | ~NurbsCurve () |
int | degree () const |
const Vector< HPoint_nD< T, N > > & | ctrlPnts () const |
const HPoint_nD< T, N > | ctrlPnts (int i) const |
const Vector< T > & | knot () const |
T | knot (int i) const |
void | resize (int n, int Deg) |
virtual void | reset (const Vector< HPoint_nD< T, N > > &P1, const Vector< T > &U1, int deg) |
virtual NurbsCurve & | operator= (const NurbsCurve< T, N > &) |
virtual HPoint_nD< T, N > | operator() (T u) const |
HPoint_nD< T, N > | hpointAt (T u) const |
HPoint_nD< T, N > | hpointAt (T u, int span) const |
void | deriveAtH (T u, int, Vector< HPoint_nD< T, N > > &) const |
void | deriveAt (T u, int, Vector< Point_nD< T, N > > &) const |
void | deriveAtH (T u, int, int, Vector< HPoint_nD< T, N > > &) const |
void | deriveAt (T u, int, int, Vector< Point_nD< T, N > > &) const |
Point_nD< T, N > | derive3D (T u, int d) const |
HPoint_nD< T, N > | derive (T u, int d) const |
Point_nD< T, N > | normal (T u, const Point_nD< T, N > &v) const |
HPoint_nD< T, N > | firstD (T u) const |
HPoint_nD< T, N > | firstD (T u, int span) const |
Point_nD< T, N > | firstDn (T u) const |
Point_nD< T, N > | firstDn (T u, int span) const |
T | basisFun (T u, int i, int p=-1) const |
void | basisFuns (T u, int span, Vector< T > &N) const |
void | dersBasisFuns (int n, T u, int span, Matrix< T > &N) const |
T | minKnot () const |
T | maxKnot () const |
int | findSpan (T u) const |
void | findMultSpan (T u, int &r, int &s) const |
int | findMult (int r) const |
int | findKnot (T u) const |
T | getRemovalBnd (int r, int s) const |
void | removeKnot (int r, int s, int num) |
void | removeKnotsBound (const Vector< T > &ub, Vector< T > &ek, T E) |
int | knotInsertion (T u, int r, NurbsCurve< T, N > &nc) |
void | refineKnotVector (const Vector< T > &X) |
void | refineKnotVectorClosed (const Vector< T > &X) |
void | mergeKnotVector (const Vector< T > &Um) |
void | clamp () |
void | unclamp () |
int | leastSquares (const Vector< Point_nD< T, N > > &Q, int degC, int n) |
int | leastSquares (const Vector< Point_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub) |
int | leastSquaresH (const Vector< HPoint_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub) |
int | leastSquares (const Vector< Point_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub, const Vector< T > &knot) |
int | leastSquaresH (const Vector< HPoint_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub, const Vector< T > &knot) |
int | leastSquaresClosed (const Vector< Point_nD< T, N > > &Q, int degC, int n) |
int | leastSquaresClosed (const Vector< Point_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub) |
int | leastSquaresClosedH (const Vector< HPoint_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub) |
int | leastSquaresClosed (const Vector< Point_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub, const Vector< T > &knot) |
int | leastSquaresClosedH (const Vector< HPoint_nD< T, N > > &Q, int degC, int n, const Vector< T > &ub, const Vector< T > &knot) |
void | globalApproxErrBnd (Vector< Point_nD< T, N > > &Q, int deg, T E) |
void | globalApproxErrBnd (Vector< Point_nD< T, N > > &Q, Vector< T > &ub, int deg, T E) |
void | globalApproxErrBnd2 (Vector< Point_nD< T, N > > &Q, int degC, T E) |
void | globalApproxErrBnd3 (Vector< Point_nD< T, N > > &Q, int degC, T E) |
void | globalApproxErrBnd3 (Vector< Point_nD< T, N > > &Q, const Vector< T > &ub, int degC, T E) |
void | globalInterp (const Vector< Point_nD< T, N > > &Q, int d) |
void | globalInterp (const Vector< Point_nD< T, N > > &Q, const Vector< T > &ub, int d) |
void | globalInterpH (const Vector< HPoint_nD< T, N > > &Q, int d) |
void | globalInterpH (const Vector< HPoint_nD< T, N > > &Q, const Vector< T > &U, int d) |
void | globalInterpH (const Vector< HPoint_nD< T, N > > &Q, const Vector< T > &ub, const Vector< T > &U, int d) |
void | globalInterpClosed (const Vector< Point_nD< T, N > > &Qw, int d) |
void | globalInterpClosed (const Vector< Point_nD< T, N > > &Qw, const Vector< T > &ub, int d) |
void | globalInterpClosedH (const Vector< HPoint_nD< T, N > > &Qw, int d) |
void | globalInterpClosedH (const Vector< HPoint_nD< T, N > > &Qw, const Vector< T > &U, int d) |
void | globalInterpClosedH (const Vector< HPoint_nD< T, N > > &Qw, const Vector< T > &ub, const Vector< T > &U, int d) |
void | globalInterpClosed (const Vector< Point_nD< T, N > > &Qw, const Vector< T > &ub, const Vector< T > &Uc, int d) |
void | globalInterpD (const Vector< Point_nD< T, N > > &Q, const Vector< Point_nD< T, N > > &D, int d, int unitD, T a=1.0) |
void | projectTo (const Point_nD< T, N > &p, T guess, T &u, Point_nD< T, N > &r, T e1=0.001, T e2=0.001, int maxTry=100) const |
T | length (T eps=0.001, int n=100) const |
T | lengthIn (T us, T ue, T eps=0.001, int n=100) const |
T | lengthF (T) const |
T | lengthF (T, int) const |
void | makeCircle (const Point_nD< T, N > &O, const Point_nD< T, N > &X, const Point_nD< T, N > &Y, T r, double as, double ae) |
void | makeCircle (const Point_nD< T, N > &O, T r, double as, double ae) |
void | makeCircle (const Point_nD< T, N > &O, T r) |
void | makeLine (const Point_nD< T, N > &P0, const Point_nD< T, N > &P1, int d) |
virtual void | degreeElevate (int t) |
void | decompose (NurbsCurveArray< T, N > &c) const |
void | decomposeClosed (NurbsCurveArray< T, N > &c) const |
int | splitAt (T u, NurbsCurve< T, N > &cl, NurbsCurve< T, N > &cu) const |
int | mergeOf (const NurbsCurve< T, N > &cl, const NurbsCurve< T, N > &cu) |
void | transform (const MatrixRT< T > &A) |
void | modCP (int i, const HPoint_nD< T, N > &a) |
void | modCPby (int i, const HPoint_nD< T, N > &a) |
virtual void | modKnot (const Vector< T > &knotU) |
int | movePoint (T u, const Point_nD< T, N > &delta) |
int | movePoint (T u, const BasicArray< Point_nD< T, N > > &delta) |
int | movePoint (const BasicArray< T > &ur, const BasicArray< Point_nD< T, N > > &D) |
int | movePoint (const BasicArray< T > &ur, const BasicArray< Point_nD< T, N > > &D, const BasicArray_INT &Dr, const BasicArray_INT &Dk) |
int | movePoint (const BasicArray< T > &ur, const BasicArray< Point_nD< T, N > > &D, const BasicArray_INT &Dr, const BasicArray_INT &Dk, const BasicArray_INT &fixCP) |
int | setTangent (T u, const Point_nD< T, N > &T0) |
int | setTangentAtEnd (const Point_nD< T, N > &T0, const Point_nD< T, N > &T1) |
int | read (const char *) |
int | write (const char *) const |
virtual int | read (ifstream &fin) |
int | write (ofstream &fout) const |
int | writePS (const char *, int cp=0, T magFact=T(-1), T dash=T(5), bool bOpen=true) const |
int | writePSp (const char *, const Vector< Point_nD< T, N > > &, const Vector< Point_nD< T, N > > &, int cp=0, T magFact=0.0, T dash=5.0, bool bOpen=true) const |
int | writeVRML (ostream &fout, T radius, int K, const Color &color, int Nu, int Nv, T u_s, T u_e) const |
int | writeVRML (const char *filename, T radius, int K, const Color &color, int Nu, int Nv, T u_s, T u_e) const |
int | writeVRML (const char *filename, T radius=1, int K=5, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeVRML (ostream &fout, T radius=1, int K=5, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeVRML97 (const char *filename, T radius, int K, const Color &color, int Nu, int Nv, T u_s, T u_e) const |
int | writeVRML97 (ostream &fout, T radius, int K, const Color &color, int Nu, int Nv, T u_s, T u_e) const |
int | writeVRML97 (const char *filename, T radius=1, int K=5, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeVRML97 (ostream &fout, T radius=1, int K=5, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeDisplayLINE (const char *filename, int iNu, const Color &color=blueColor, T fA=1) const |
int | writeDisplayLINE (const char *filename, const Color &color, int iNu, T u_s, T u_e) const |
void | drawImg (Image_UBYTE &Img, unsigned char color=255, T step=0.01) |
void | drawImg (Image_Color &Img, const Color &color, T step=0.01) |
void | drawAaImg (Image_Color &Img, const Color &color, int precision=3, int alpha=1) |
void | drawAaImg (Image_Color &Img, const Color &color, const NurbsCurve< T, 3 > &profile, int precision=3, int alpha=1) |
NurbsSurface< T, 3 > | drawAaImg (Image_Color &Img, const Color &color, const NurbsCurve< T, 3 > &profile, const NurbsCurve< T, 3 > &scaling, int precision=3, int alpha=1) |
BasicList< Point_nD< T, N > > | tesselate (T tolerance, BasicList< T > *uk) const |
Protected Attributes | |
Vector< HPoint_nD< T, N > > | P |
Vector< T > | U |
int | deg_ |
Friends | |
HPoint_nD< T, N > | C (T u, const NurbsCurve< T, N > &nurb) |
Point_nD< T, N > | Cp (T u, const NurbsCurve< T, N > &nurb) |
void | generateCompatibleCurves (NurbsCurveArray< T, N > &ca) |
Related Functions | |
(Note that these are not member functions.) | |
T | chordLengthParam (const Vector< Point_nD< T, N > > &Q, Vector< T > &ub) |
This class is used to represent and manipulate NURBS curve. The curves are composed of points in 4D. They can have any degree and have any number of control points.
|
default constructor.
|
|
A copy constructor.
|
|
Constructor with control points in 4D.
|
|
Constructor with control points in 3D.
|
|
Computes the basis function of the curve.
Computes the i basis function of degree p of the curve at parameter u. You can have more information about this function in the LaTeX version.
|
|
computes the non-zero basis functions of the curve.
Computes the non-zero basis functions and puts the result into N. N has a size of deg+1. To relate N to the basis functions, Basis[span -deg +i] = N[i] for i=0...deg. You can find more information in the LaTeX version.
|
|
clamp a NURBS curve.
A clamped NURBS curve has degree+1 equal knots at both ends of the knot vector.
|
|
Decompose the curve into Bézier segments.
This function decomposes the curve into an array of 4D Bézier segments.
|
|
decompose the closed curve into Bézier segments.
This function decomposes a closed curve into an array of Bézier segments.
|
|
degree elevate a curve a number of times.
For more information, see A5.9 on p 206 of the NURBS book
Reimplemented in PLib::NurbsCurveSP. |
|
Computes the derivative of degree of the curve at parameter u.
For more information on the algorithm used, see A3.2 on p 93 of the NurbsBook.
|
|
Computes the derivative of degree d of the curve at parameter u.
For more information on the algorithm used, see A3.2 on p 93 of the NurbsBook.
|
|
Computes the derivative of the curve at the parameter u.
|
|
Computes the derivative at the parameter u.
Reimplemented from PLib::ParaCurve. |
|
Computes the derivative of degree d of the curve at parameter u.
For more information on the algorithm used, see A3.2 on p 93 of the NurbsBook.
|
|
Computes the derivative of degree d of the curve at parameter u in the homonegeous domain.
For more information on the algorithm used, see A3.2 on p 93 of the NurbsBook.
Reimplemented from PLib::ParaCurve. |
|
Compute the derivatives functions at u of the NURBS curve.
For information on the algorithm, see A2.3 on p72 of the NURBS book. The result is stored in the ders matrix, where ders is of size (n+1,deg+1) and the derivative N'_i(u) = ders(1,i=span-deg+j) where j=0...deg+1.
|
|
Draws an anti-aliased NURBS curve on an image.
This will draw the NURBS by using a brush profile. The drawing is performed by averaging the intensity of the profile at the pixels. This function generates a sweep surface by using the profile given in its argument. The sweep is always performed by following the y-axis of the profile. A scaling function is also used when sweeping. This is used to vary the shape of the profile while it's being swept (see the sweep member function of NurbsSurface<T,N> for more details).
|
|
draws an anti-aliased NURBS curve on an image.
This will draw the NURBS by using a user-defined brush profile. The drawing is performed by averaging the intensity of the profile at the pixels.
|
|
Draws an anti-aliased NURBS curve on an image.
This will draw the NURBS by using a circular brush profile. The drawing is performed by averaging the intensity of the profile at the pixels.
|
|
Draws a NURBS curve on an image.
This will draw very primitively the NURBS curve on an image. The drawing assumes the line is only in the xy plane (the z is not used for now). The algorithm finds the points on the curve at a step parametric intervall between them and join them by a line. No fancy stuff.
|
|
draws a NURBS curve on an image.
This will draw very primitively the NURBS curve on an image. The drawing assumes the line is only in the xy plane (the z is not used for now). The algorithm finds the points on the curve at a step parametric intervall between them and join them by a line. No fancy stuff.
|
|
Finds the knot k for which u is in the range [u_k,u_{k+1}).
|
|
Finds the multiplicity of a knot.
|
|
Finds the multiplicity of a knot at a parametric value.
Finds the index of the knot at parametric value u and returns its multiplicity.
|
|
Determines the knot span index.
Determines the knot span for which their exists non-zero basis functions. The span is the index k for which the parameter u is valid in the [u_k,u_{k+1}] range.
|
|
Computes the first derivative.
Computes the first derivative in the honogenous space with the span given.
|
|
Computes the first derivative Computes the first derivative in the 4D homogenous space.
|
|
Computes the first derivative.
Computes the first derivative in the normal space (3D or 2D).
|
|
Computes the first derivative.
Computes the first derivative in the normal space.
|
|
Get the knot removal error bound for an internal knot.
Get the knot removal error bound for an internal knot r (non-rational). For more information on the algorithm, see A9.8 from the Nurbs book on page 428.
|
|
Approximation of a curve bounded to a certain error.
It is a type II approximation: it starts with a lot of control points then tries to eliminate as much as it can as long as the curve stays within a certain error bound. The method uses least squares fitting along with knot removal techniques. It is the algorithm A9.10 on p 431 of the NURBS book.
|
|
Approximation of a curve bounded to a certain error.
It is a type II approximation: it starts with a lot of control points then tries to eliminate as much as it can as long as the curve stays within a certain error bound. The method uses least squares fitting along with knot removal techniques. It is the algorithm A9.10 on p 431 of the NURBS book.
|
|
Approximation of a curve bounded to a certain error.
The algorithm is quite simplistic but in some cases gives better result than globalApproxErrBnd (when the error allowed is low and the data is very close to each other). This algorithm generates a first degree interpolation of the data points, degree elevates the curve by 1 degree recomputes the error around each points, removes the knots which are within a certain error range then repeats the process until the desired degree is reached.
|
|
Approximation of a curve bounded to a certain error.
The algorithm is quite simplistic but in some cases gives better result than globalApproxErrBnd (when the error allowed is low and the data is very close to each other). This algorithm generates a first degree interpolation of the data points, degree elevates it to the degree requested then removes all the control points which are within the error bound.
|
|
Approximation of a curve bounded to a certain error.
The algorithm is quite simplistic but in some cases gives better result than globalApproxErrBnd (when the error allowed is low and the data is very close to each other). This algorithm generates a first degree interpolation of the data points, degree elevates it to the degree requested then removes all the control points which are within the error bound.
|
|
global curve interpolation with points in 3D.
Global curve interpolation with points in 3D and with the parametric values specified.
|
|
global curve interpolation with points in 3D.
|
|
global curve interpolation with homogenous points.
Global curve interpolation with 4D points, a knot vector defined and the parametric value vector defined.The curve will have C(d-1) continuity at the point u=0 and u=1.
|
|
global curve interpolation with homogenous points.
Global curve interpolation with 4D points, a knot vector defined and the parametric value vector defined.
|
|
global closed curve interpolation with a list of points.
Global curve interpolation with points in 3D. This function will generate a closed curve with C(d-1) continuity between the parameters u=0 and u=1
|
|
global curve interpolation with homogenous points.
Global curve interpolation with 4D points, a knot vector defined and the parametric value vector defined.The curve will have C(d-1) continuity at the point u=0 and u=1.
|
|
global curve interpolation with homogenous points.
Global curve interpolation with 4D points, a knot vector defined and the parametric value vector defined.
|
|
global close curve interpolation with points in homogenous space.
Global curve interpolation with points in homogenouse space with C(d-1) continuity in the wrap-around point.
|
|
global curve interpolation with the 1st derivatives of the points specified.
Global curve interpolation with the 1st degree derivative specified for each of the points to interpolate. This will generate a number of control points 2 times greater than the number of interpolation points. If the derivative specified is of unit length, i.e. the tangent vectors are given, then the derivative at each point will be multiplied by the chord length. A second multiplicative factor can be specified to make the derivative even greater. This second number should be close to 1.0. For more information about the algorithm, refer to section 9.2.4 on page 373 of the NURBS book.
|
|
global curve interpolation with 4D points, a knot vector defined and the parametric value vector defined.
Global curve interpolation with 4D points, a knot vector defined and the parametric value vector defined.
|
|
global curve interpolation with 4D points and a knot vector defined.
Global curve interpolation with 4D points and a knot vector defined.
|
|
global curve interpolation with points in 4D.
Global curve interpolation with points in 4D
|
|
Evaluates the curve in homogenous space at parameter u.
For more details on the algorithm, see A4.1 on page 124 of the Nurbs Book.
Reimplemented from PLib::ParaCurve. |
|
It inserts a knot a number of times.
It inserts the knot u, r times and generates the curve nc. For more information, see A5.1 on page 151 of the NURBS book
|
|
A least squares curve approximation.
This routines generates a curve that approrimates the points in the least square sense, you can find more details in the LaTeX version. For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation.
This routines generates a curve that approrimates the points in the least square sense, you can find more details in the LaTeX version. For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation.
This routines generates a curve that approrimates the points in the least square sense, you can find more details in the LaTeX version. For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation for closed curves.
This routine finds a closed NURBS curve that satisfy a least square criteria. The resulting curve will generally not pass through the input points (except the first point). For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation for closed curves.
This routine finds a closed NURBS curve that satisfy a least square criteria. The resulting curve will generally not pass through the input points (except the first point). For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation for closed curves.
This routine finds a closed NURBS curve that satisfy a least square criteria. The resulting curve will generally not pass through the input points (except the first point). For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation for closed curves.
This routine finds a closed NURBS curve that satisfy a least square criteria. The resulting curve will generally not pass through the input points (except the first point). For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation for closed curves.
This routine finds a closed NURBS curve that satisfy a least square criteria. The resulting curve will generally not pass through the input points (except the first point). For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation.
This routines generates a curve that approrimates the points in the least square sense, you can find more details in the LaTeX version. For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
A least squares curve approximation.
This routines generates a curve that approrimates the points in the least square sense, you can find more details in the LaTeX version. For more details, see section 9.4.1 on page 491 of the NURBS book.
|
|
Computes the length of the curve.
Computes an approximation of the length of the curve using a numerical automatic integrator. That integrator uses a Chebyshev Series Expansion to perform its approximation. This is why you can change the value $n$ which sets the number of elements in the series. The method is simple, integrate between each span. This is necessary in case the tangant of a point at u_i is undefined. Add the result and return this as the approximation.
|
|
length needs to integrate a function over an interval to determine the length of the NURBS curve. Well, this is the function.
|
|
The function used by length length needs to integrate a function over an interval to determine the length of the NURBS curve. Well, this is the function.
|
|
Computes the length of the curve inside [u_s,u_e].
Computes an approximation of the length of the curve using a numerical automatic integrator. The length is computed for the range [u_s,u_e] That integrator uses a Chebyshev Series Expansion to perform its approximation. This is why you can change the value n which sets the number of elements in the series. The method is similar to the one used by length excepted that it needs to check for the range.
|
|
generates a circular curve.
Generates a circle of radius $r$ at origin $O$. The curve is drawn in the $xy$-axis.
|
|
generates a circular curve.
Generates a circular curve of radius $r$ at origin $O$. The curve is drawn in the $xy$-axis.
|
|
generates a circular curve.
Generates parts of a circle, starting at angle as and finishing at ae with a radius r and having the origin located at O. The X and Y vector describe the local x-axis and the local y-axis of the circle. The degrees are specified in radians.
|
|
Generate a straight line.
Generate a straight line going from point P0 to point P1 of degree d.
|
|
Merges the knot vector of a curve with another knot vector.
Will merge the Knot vector U with the one from the curve and it will refine the curve appropriately.
Reimplemented in PLib::NurbsCurveSP. |
|
The curve is the result of mergin two curves.
|
|
Moves a point with some constraint.
This will modify the NURBS curve by respecting a certain number of constraints. u_r specifies the parameters on which the constraints should be applied. The constraint are defined by D_r^{(k)} which requires 3 vectors to fully qualify. D specifies the value of the constraint and D_r and D_k are used to specify on which parameter the constraint is applied and of what degree. A second constraint fixCP consists of specifying which control points can not be moved by the routine. For example, if you want to move the point C(0.5) by (10,0,10) and fix the point C(0.6) on the current curve (a move of (0,0,0)) but change its 1st derivative by (0,20,0). Doing this without modifying control point 4 . Then the following values must be inputed to the routine. u_r = [0.5, 0.6], D = [(10,0,10), (0,0,0), (0,20,0)], D_r = [0, 1, 1], D_k = [0, 0, 1] and fixCP= 4. The values in D should be ordered in respect with r and k. i.e. for D_i=D_{r_i}^{(k_i)}, then i < j implies that r_i < r_j and that either r_i < r_j or k_i < k_j. See section 11.5.1 of the NURBS book for an explanation of the algorithm.
|
|
Moves a point with some constraint.
This will modify the NURBS curve by respecting a certain number of constraints. u_r specifies the parameters on which the constraints should be applied. The constraint are defined by $D_r^{(k)}$ which requires 3 vectors to fully qualify. D specifies the value of the constraint and D_r and D_k are used to specify on which parameter the constraint is applied and of what degree. For example, if you want to move the point C(0.5) by (10,0,10) and fix the point C(0.6) on the current curve (a move of (0,0,0)) but change its 1st derivative by (0,20,0). Then the following values must be inputed to the routine. u_r = [0.5,0.6], D = [(10,0,10), (0,0,0), (0,20,0)], D_r = [0, 1, 1] and D_k = [0, 0, 1]. The values in D should be ordered in respect with r and k. {i.e.} for D_i=D_{r_i}^{(k_i)}, then i < j implies that r_i < r_j and that either r_i < r_j or k_i < k_j. See section 11.5.1 of the NURBS book for an explanation of the algorithm.
|
|
Moves a point with some constraint.
This will modify the NURBS curve by respecting a certain number of constraints. $u_r$ specifies the parameters on which the constraints should be applied. The constraint are defined by $D$ which specifies the vector by which the points should move. For example, if you want to move the point C(0.5) by (10,0,10) and fix the point C(0.6) on the current curve (a move of (0,0,0)). u_r = 0.5, 0.6 and D = (10,0,10), (0,0,0) The u_r vector should be in an increasing order. See section 11.5.1 of the NURBS book for an explanation of the algorithm.
|
|
Moves a point in the NURBS curve.
This modifies the curve such that the point C(u) is moved by delta. Delta is a vector containing the movement as D^{(k)} where (k) specifies the derivative. Thus at D[0], this specifies the 0th derivative movement, at D[1] it specifies the 1st derivative movement of the point. i.e. Suppose that C(u) = (10,20,3) then a D[0] = (10,10,10) will move the point to C(u) = (20,30,13) See section 11.5.1 of the NURBS book for an explanation of the algorithm.
|
|
Moves a point on the NURBS curve.
This modifies the curve such that the point $C(u)$ is moved by delta. See section 11.5.1 of the NURBS book for an explanation of the algorithm.
|
|
Computes the normal of the curve at u from a vector.
Computes the normal of the curve at u from a vector. If the curve lies only in the xy-plane, then calling the function with the vector v = (0,0,1) (the z$axis) will yield a proper normal for this curve.
|
|
Evaluates the curve in 4D at parameter u.
For more details on the algorithm, see A4.1 on page 124 of the Nurbs Book.
Reimplemented from PLib::ParaCurve. |
|
The assignment operator for a NURBS curve.
Reimplemented in PLib::NurbsCurveSP. |
|
project a point onto the curve.
It finds the closest point in the curve to a point $p$. For more information, see A6.4 and A6.5 on p 231 of the NURBS book
|
|
reads a NurbsCurve<T,N> from a file.
Reimplemented in PLib::NurbsCurveSP, and PLib::NurbsCurveGL. |
|
Reads a NurbsCurve<T,N> from a file.
|
|
Refine the curve knot vector.
For more information, see A5.4 on page 164 of the NURBS book
Reimplemented in PLib::NurbsCurveSP. |
|
refine the closed curve knot vector.
Adapted from algorithm A5.4 on page 164 of the NURBS book.
|
|
Removes an internal knot from a curve. This is A5.8 on p185 from the NURB book modified to not check for tolerance before removing the knot.
Reimplemented in PLib::NurbsCurveSP. |
|
Remove knots from a curve without exceeding an error bound.
For more information about the algorithm, see A9.9 on p429 of the NURB book.
Reimplemented in PLib::NurbsCurveSP. |
|
Resets a NURBS curve to new values.
Reimplemented in PLib::NurbsCurveSP. |
|
Resizes a NURBS curve.
Resizes a NURBS curve. The old values are lost and new ones have to be created.
|
|
set the tangent at a point.
|
|
set the tangent at the end points.
|
|
Splits the curve into two curves.
|
|
Generates a list of points from the curve.
Generates a list of points from the curve. The list is generated within a user specified tolerance.
|
|
Performs geometrical modifications.
Each control points will be modified by a rotation-translation matrix.
|
|
unclamp a NURBS curve.
An unclamped NURBS curve doesn't have any equal knots at both ends of the knot vector.
|
|
Writes a NurbsCurve<T,N> to an output stream.
Reimplemented in PLib::NurbsCurveGL. |
|
Writes a NurbsCurve<T,N> to a file.
|
|
Writes the curve to a file in Display format as a line object.
This function writes a surface in LINE ascii format to interface with Display (Copyright 1993,1994,1995 David MacDonald, McConnell Brain Imaging Centre), Montreal Neurological Institute, McGill University.
|
|
Writes the curve to in Display format as a LINE object.
This function writes a surface in LINE ascii format to interface with Display (Copyright 1993,1994,1995 David MacDonald, McConnell Brain Imaging Centre), Montreal Neurological Institute, McGill University.
|
|
Writes the curve in the postscript format to a file.
|
|
Writes a post-script file representing the curve.
Writes the curve in the postscript format to a file, it also draws the points defined in $points$ with their associated vectors if $vector$ is used.
|
|
Writes the curve to a VRML file.
A circle is swept around the trajectory made by the curve. The resulting surface is saved as a VRML file.
|
|
Writes the curve to a VRML file.
A circle is swept around the trajectory made by the curve. The resulting surface is saved as a VRML file.
|
|
Writes the curve to a VRML file.
A circle is swept around the trajectory made by the curve. The resulting surface is saved as a VRML file.
|
|
Writes the curve to a VRML file.
A circle is swept around the trajectory made by the curve. The resulting surface is saved as a VRML file.
|
|
chord length parameterization.
Performs chord length parameterization from a vector of points. There are more details about this function in the LaTeX version.
|
|
Generate compatible curves from an array of curves \relates NurbsCurveArray.
This routine will put to the same degree all the curves in the array and it will ensure that they have the same knot vector.
|