/* Define the data structure used by UF_MODL_create_fitted_spline().
For "By Tolerance" method, you need to at least specify 'degree', 'num_of_points',
'points', 'tolerance' and 'num_of_segments'(must be zero).
For "By Segments" method, you need to at least specify 'degree', 'num_of_points',
'points', and 'num_of_segments'.
The "By Template" method is not supported at this moment.
*/
struct SPLINE_FIT_s
{
double *points; /* coordinates for the points to be fitted.
points[0~2] = (x, y, z) for the 1st point,
points[3~5] = (x, y, z) for the 2nd point,
...
*/
double *slopes; /* The slope values.
slopes[0~2] = start slope when slope_flag = 1 or 3
end slope when slope_flag = 2,
slopes[3~5] = end slope when slope_flag = 3.
*/
double *weights; /* values for user-defined weights. Only positive values are allowed */
double tolerance; /* Tolerance value for the "By Tolerance" method.
This value will be ignored when the 'num_of_segments' is
positive */
int num_of_points; /* Number of points to be fitted */
int slope_flag; /* 0=no slopes, 1=only start slope exists,
2=only end slope exists, 3=both end slopes exist */
int num_of_weights; /* Number of user-defined weights */
int *weight_positions; /* The index of points (from 1 ~ num_of_points) for the user-defined
weights to apply to */
int num_of_segments; /* Number of segments for the "By Segments" method.
Must be set to 0 for "By Tolerance" method. */
int degree; /* The desired degree for the fitted spline */
};作者: morpheus_1982 时间: 2009-4-20 19:38
太专业了。漫天的星星,这位大哥,你到底是程序员,工程师,还是数学家?