VARKON Version 1.15 1997-11-17
sur_splarr - Geometric procedure
Creates a surface
Description
Creates a bicubic surface (patch type CUB_PAT) from points and tangents. Input data is given in 2-dimensional arrays.
The points are splined with the cur_spline() function. As an option tangents can be defined but unlike cur_spline() only the tangent directions are used and not the lengths of the tangents.
The created surface is continous in position and slope.
Syntax
sur_splarr(id, method, npu, npv, poi, utan, vtan, twist:attributes);
REF id; STRING method; INT npu; INT npv; VECTOR poi( , ); VECTOR utan( , ); VECTOR vtan( , ); VECTOR twist( , );
Principal parameters
id - Local identity method - Defines the algorithm for the calculation of tangent lengths and twist vectors Eq. ZEROTWIST_1: All twist vectors will be zero Eq. ADINI_1: Twist vectors will be calculated with Adinis method npu - Number of points in the U direction npv - Number of points in the V direction poi - Array with points
Optional parameters
utan - Array with normalized tangents in the U direction vtan - Array with normalized tangents in the V direction twist - Array with twist vectors
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 poi(10,10);
sur_splarr(#3, "ZEROTWIST_1", 6, 4, poi);
Creates a new surface #3 defined by points in array poi. The number of CUB_PAT patches in the output surface will be 5 in U direction and 3 in V direction.
The order of the points in the array poi should be:
U= 0.0, V= 3.0 U=5.0, V= 3.0
poi(1,4) poi(2,4) poi(3,4) poi(4,4) poi(5,4) poi(6,4) poi(1,3) poi(2,3) poi(3,3) poi(4,3) poi(5,3) poi(6,3) poi(1,2) poi(2,2) poi(3,2) poi(4,2) poi(5,2) poi(6,2) poi(1,1) poi(2,1) poi(3,1) poi(4,1) poi(5,1) poi(6,1) U= 0.0, V=0.0 U= 5.0, V= 0.0
VARKON Homepage | Index |