VARKON Version 1.15 1997-12-29

> ## cur_conic - Geometric procedure

> Creates a curve
> Description
> Creates a rational cubic parametric segmented curve that interpolates two or more positions and tangents. cur_conic does not care about the length of tangents, only the direction. For every segment a Midpoint or P-value must also be specified. A Midpoint is just any intermediate position while a P-value is a scalar float that controls the "fullness" of the segment.
> If tangents are chosen in such a way that they intersect and form a nice triangle with the segment chord as baseline then the resulting segment becomes a classical plane conic segment (quadric rational). If the tangents are chosen in such a way that inflexion or twist is forced the resulting segment becomes a cubic rational generalized (3D-) conic.
> A type parameter is used to control whether to project positions and tangents onto the XY-plane of the active coordinate system or not before creating the curve.
> Syntax
> cur_conic(id, type, p1, tp1, MP, p2, tp2,MPn,pn,tpn:attributes);

> REF | id;
> STRING | type*4;
> VECTOR | p1;
> VECTOR | tp1;
> VECTOR/FLOAT | MP;
> VECTOR | p2;
> VECTOR | tp2;
> VECTOR/FLOAT | MPn;
> VECTOR | pn;
> VECTOR | tpn;

> Principal parameters

> id | - Local identity
> type | - The string "FREE" or "PROJ"
> p1 | - First position (beginning of first segment)
> tp1 | - First tangent position
> MP | - Midpoint or P-value for first segment
> p2 | - Second position (end of first segment)
> tp2 | - Second tangent position

> Optional parameters

> MPn | - Additional Midpoints or P-values, one per additional segment
> pn | - Additional positions, one per additional segment
> tpn | - Additional tangent positions, one per additional segment

> 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

> Example
> cur_conic(#1,"PROJ", vec(0, 0), vec(1, 1), 0.4,
> vec(5, 0), vec(6, -1), vec(8, -1),
> vec(10, 0), vec(11, 1));
> Creates a conic curve with two segments. First segment has a P-value of 0.4 and second segment is defined by a Midpoint position = (8,-1).
> Comments
> A true 3D spacecurve can only be defined in a 3D module with type set to "FREE". In a 2D module or with type set to "PROJ" a planar curve with torsion = 0 is always created even if defining positions are not in the same plane.
> cur_conic is intended for curves with relatively few defining positions, maximum = 50. To interpolate large number of positions use cur_conarr.
> P-values should be positive values in the range 0 <= P < 0.85. A value of zero gives a straight line segment and the cooresponding tangent positions are left without notice. Watch out for kinks !

VARKON Homepage | Index