VARKON Version 1.16 1998-09-12

> ## sur_nurbsarr - Geometric procedure

> Creates a surface
> Description
> Creates a NURBS surface from knots and control points. Input data is given in arrays. Any order can be used in the U-direction and V-direction respectively. If you dont know what order to use we recommend order = 4. Knots may be uniformly spaced or non uniformly.

> Syntax
> sur_nurbsarr(id, order_u, order_v, nk_u, nk_v, cpts, uknots, vknots, w:attributes);

> REF | id;
> INT | order_u;
> INT | order_v;
> INT | nk_u;
> INT | nk_v;
> VECTOR | cpts( , );
> FLOAT | uknots( );
> FLOAT | vknots( );
> FLOAT | w( );

> Principal parameters

> id | - Local identity
> order_u | - The bspline order in the U-direction
> order_v | - The bspline order in the V-direction
> nk_u | - Number of knots in U-direction. Note that nk_u=npts_u+order_u where npts_u= no. of control pts in U direction
> nk_v | - Number of knots in V-direction. Note that nk_v=npts_v+order_v where npts_v= no. of control pts in V direction
> cpts | - Control points

> Optional parameters

> uknots | - Knots in U-direction. If not specified a uniform knotvector is used.
> vknots | - Knots in V-direction. If not specified a uniform knotvector is used.
> w | - Homogenous coordinate. If not specified w=1.0 (non rational).

> Attributes

> PEN | - Pen or colour number
> LEVEL | - Level number
> BLANK | - Visible (0) or invisible (1)
> SFONT | - Solid boundary and dashed midcurves (0)
> SDASHL | - Dashlength

> Example
> VECTOR cpts(5,4);
> sur_nurbsarr(#3, 4, 4, 5+4, 4+4, cpts);
> Creates a new NURBS surface #3 defined by control points in array cpts. Uniform knot distribution will be used and coordinates are non rational.

> The number of knot values will be npts+order in order to make the surface pass through the boundary points of the input grid. In the example 5+4 and 4+4. The generated knot vectors will be: uknots= 1,1,1,1,2,3,3,3,3 vknots=1,1,1,1,2,2,2,2. The same surface will be the result with FLOAT uknots(9), vknots(8) and sur_nurbsarr(#3,4,4,9,8,cpts,uknots,vknots);
> The order of the points in the array poi should be:
> U= 0.0, V= 3.0 U=4.0, V= 3.0

> poi(1,4)=-2,0.0,0 | poi(2,4)= 0,0.0,0 | poi(3,4)= 2,0.0,0 | poi(4,4)=7,0.0,0 | poi(5,4)= 9,0.0,0
> poi(1,3)=-2,0.0,1 | poi(2,3)= 0,2.5,1 | poi(3,3)= 2,3.5,1 | poi(4,3)= 7,1.0,1 | poi(5,3)= 9,0.0,1
> poi(1,2)=-2,0.0,2 | poi(2,2)= 0,2.5,2 | poi(3,2)= 2,3.5,2 | poi(4,2)=7,1.0,2 | poi(5,2)= 9,0.5,1
> poi(1,1)=-2,0.0,3 | poi(2,1)= 0,0.0,3 | poi(3,1)= 2,0.0,3 | poi(4,1)= 7,0.0,3 | poi(5,1)= 9,0.0,3

> U= 0.0, V=0.0 U= 4.0, V= 0.0

VARKON Homepage | Index