|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位大侠,有谁用过这个命令,
我编出了一些东西,在编译的时候没有问题,可是到运行的时候出不来我想要的图形,我想得到的结果是要经过两个点建立一条曲线
麻烦高手帮我看看,下面的代码错在哪?
int degree=1;
int num_points=2;
int save_def_data=1;
int periodicity=0;
tag_t spline_tag;
int i_ret;
double x1[3]={12,23,54};
double x2[3]={51,68,91};
UF_CURVE_pt_slope_crvatr_t point_data[3];
point_data[3].point[3]=12,23,54;
point_data[3].point[3]=51,68,91;
point_data[3].slope_type=UF_CURVE_SLOPE_AUTO;
point_data[3].slope[3];
point_data[3].crvatr_type=UF_CURVE_CRVATR_AUTO_DIR;
point_data[3].crvatr[3];
{
i_ret=UF_CURVE_create_spline_thru_pts (
degree ,/* <I>degree of the spline*/
periodicity ,/* <I>periodicity of the spline: 0=non-periodic, 1=periodic*/
num_points ,/* <I>number of points and parameters in the following arrays*/
point_data ,/* <I>array of data defining points andslope/curvature control*/
NULL,/* <I>
parameters of input points. This is a user specified
parameterization for the input points, which needs to be
monotonic increasing (i.e. parameters(i) < parameters(i+1)
for all i), but does not need to be normalized, if NULL
then the default parameterization will be used.
*/
save_def_data ,/* <I>
If save_def_data = 1, save input defining
data with the created spline. Otherwise, no.
*/
&spline_tag /* <O>
tag of the created spline
*/
) ;
}
谢谢各位了! |
|