#include "stdlib.h"
#include "geom.h"
#include "bezier.h"
Go to the source code of this file.
Data Structures | |
| struct | bezier_3_poly_data |
| Data for a polyline constructed from a number of third-order Bezier curves. More... | |
Functions | |
| int | alloc_bezier_3_poly (struct bezier_3_poly_data *bp, int n) |
| Allocate memory for the Bezier polyline data. | |
| int | free_bezier_3_poly (struct bezier_3_poly_data *bp) |
| Release the memory that had been allocated to the polyline. | |
| int | segment_bezier_3_poly (struct bezier_3_poly_data *bp, struct point_3D *loc0, struct point_3D *loc1, struct point_3D *loc2, struct point_3D *loc3, int i) |
| Initialize the coordinates of the Bezier control points for Bezier segment i. | |
| int | normalize_bezier_3_poly (struct bezier_3_poly_data *bp) |
| Normalize the Bezier polyline so that the parameter t_star varies from 0.0 to 1.0 along the entire curve. | |
| int | eval_bezier_3_poly (struct bezier_3_poly_data *bp, double t_star, struct point_3D *loc) |
| Evaluate the position on the Bezier polyline at given parameter t_star. | |
| int | bezier_3_spline (struct bezier_3_poly_data *bp, int m, struct point_3D p[]) |
| Given m+1 interpolation points, determine the m-segment Bezier polyline that interpolates these points as a spline. | |
| int | coons_bezier_3 (struct bezier_3_poly_data *c1, struct bezier_3_poly_data *c2, struct bezier_3_poly_data *c3, struct bezier_3_poly_data *c4, double r, double s, struct point_3D *d) |
| Compute a location on the Coons patch at parameter position (r,s). | |
|
||||||||||||
|
Allocate memory for the Bezier polyline data.
|
|
||||||||||||||||
|
Given m+1 interpolation points, determine the m-segment Bezier polyline that interpolates these points as a spline. This is done by first determining the array of weight points which define the spline and then evaluating the cubic Bezier segments. If successful, data is written directly to the Bezier polyline data structure. function returns an integer status flag: 0 == normal return -1 == NULL pointer to Bezier polyline -2 == invalid value for m -3 == NULL pointer for interpolation points -4 == could not allocate weight-point array
G. Engelin & F. Uhlig (1996) Numerical Algorithms with C Springer, Berlin Section 12.3.1 |
|
||||||||||||||||||||||||||||||||
|
Compute a location on the Coons patch at parameter position (r,s). Returns 0 for a normal return, -1 otherwise.
|
|
||||||||||||||||
|
Evaluate the position on the Bezier polyline at given parameter t_star. Returns 0 if everything was OK, -1 if there was a problem.
|
|
|
Normalize the Bezier polyline so that the parameter t_star varies from 0.0 to 1.0 along the entire curve. Returns -1 if the normalization fails, 0 otherwise. Arc length along the Bezier segments is approximated as the sum of the distances between a number of points along each curve.
|
|
||||||||||||||||||||||||||||
|
Initialize the coordinates of the Bezier control points for Bezier segment i.
|
1.4.4