VARKON Version 1.17 1999-10-21

> ## cur_usrdef - Geometric procedure

> Creates a curve

> Description

> Low level routine to create a rational or non rational cubic parametric curve by specifying the polynomial coefficients for all segments. Each segment is defined by 16 values orderd in a 4 by 4 matrix. By specifying an optional surface-id the curve becomes an UV-curve, ie. a curve on the surface (in the UV-plane of the surface). The four basic polynomials for a rational segment are:

> x(t) = c0x + c1x*t + c2x*t*t + c3x*t*t*t
> y(t) = c0y + c1y*t + c2y*t*t + c3y*t*t*t
> z(t) = c0z + c1z*t + c2z*t*t + c3z*t*t*t
> w(t) = c0w + c1w*t + c2w*t*t + c3w*t*t*t

> For a given segment i the order of the coefficients in segdat should be:

> segdat(i,1,1) = c0x segdat(i,2,1) = c1x segdat(i,3,1) = c2x segdat(i,4,1) = c3x
> segdat(i,1,2) = c0y segdat(i,2,2) = c1y segdat(i,3,2) = c2y segdat(i,4,2) = c3y
> segdat(i,1,3) = c0z segdat(i,2,3) = c1z segdat(i,3,3) = c2z segdat(i,4,3) = c3z
> segdat(i,1,4) = c0w segdat(i,2,4) = c1w segdat(i,3,4) = c2w segdat(i,4,4) = c3w

> Syntax

> cur_usrdef(id, nseg, segdat, sur_id:attributes);

> REF | id;
> INT | nseg;
> FLOAT | segdat(nseg,4,4);
> REF | sur_id;

> Principal parameters

> id | - Local identity
> nseg | - Number of segments
> segdat | - Segment coefficients

> Optional parameters

> sur_id | - Identity of a surface

> Attributes

> PEN | - Pen or colour number
> LEVEL | - Level number
> BLANK | - Visible(0) or invisible(1)
> CFONT | - Solid(0), dashed(1) or centerline(2)
> CDASHL | - Dashlength
> WIDTH | - Linewidth

> Comments

> If a non rational segment is wanted c0w should be set to 1.0 and c1w,c2w,c3w to 0.0.

> If a curve on a surface is wanted ( a UV-curve) use the optional parameter sur_id to specify the identity of the surface.

VARKON Homepage | Index