马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
下面代码编译可以通过,但是不能生成曲线,如果把
int degree = 3;
int periodicity = 0;
int num_points = NUMBER_POINTS;
double point1[3] = {-0.0539, 0.0511, 0.0000};
double point2[3] = {-0.4801, 0.8428, 0.0000};
double point3[3] = {2.0000, 0.9000, 3.5956};
double point4[3] = {2.3456, 1.3456, 3.7890};
double point5[3] = {3.1000, 2.4567, 3.3214};
double vec[3] = {0.0000,0.0000,0.0000};
double crvatr[3] = {0.000,0.000,0.000};
UF_CURVE_pt_slope_crvatr_t point_data[NUMBER_POINTS] =
{
{ point1[3],
UF_CURVE_SLOPE_NONE, vec[3],
UF_CURVE_CRVATR_NONE, crvatr[3]
},
{ point2[3],
UF_CURVE_SLOPE_NONE, vec[3],
UF_CURVE_CRVATR_NONE, crvatr[3]
},
{ point3[3],
UF_CURVE_SLOPE_NONE, vec[3],
UF_CURVE_CRVATR_NONE, crvatr[3]
},
{ point4[3],
UF_CURVE_SLOPE_NONE, vec[3],
UF_CURVE_CRVATR_NONE, crvatr[3]
},
{ point5[3],
UF_CURVE_SLOPE_NONE, vec[3],
UF_CURVE_CRVATR_NONE, crvatr[3]
}
};
/* Point/slope curve attribute array */
/* Arrays of user's defining point data */
double parameters[NUMBER_POINTS] = {0.00, 0.89, 1.73, 2.23, 2.85};
int save_def_data = 1;
tag_t spline_tag;
/* Create B-spline curve */
spline_tag_out = UF_CURVE_create_spline_thru_pts(degree,
periodicity,
num_points,
point_data,
NULL,
save_def_data,
[$spline_tag)] |