VARKON Version 1.15 1997-12-29

> ## cur_trim - Geometric procedure

> Creates a curve
> Description
> Creates a curve by "trimming" a copy of another curve. The desired portion of the old curve is specified by two parameter values t1 and t2 relating to the position on the old curve where the new curve should start and end. Usually t2 > t1 but if t1 > t2 the new curve is also "reversed" meaning that it gets the opposite sense of direction compared to the original curve. With t2 = 0 and t1 = the number of segments of the old curve the new curve becomes an exact copy of the old curve only with opposite sense of direction.
> Trimming can also be used to extend the first or last segment of a curve. Such extrapolation is done by first creating a new segment with the same coefficients as the old segment but the new larger interval for curve parameter and then reparametrise the new segment to the standard interval of 0 -> 1.
> Syntax
> cur_trim(id, ref, t1, t2:attributes);

> REF | id;
> REF | ref;
> FLOAT | t1;
> FLOAT | t2;

> Principal parameters

> id | - Local identity
> ref | - Curve to copy and trim
> t1 | - Curve parameter start value
> t2 | - Curve parameter end value

> Optional parameters

> None. |

> 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_trim(#3,#2,0,0.5);
> Creates a new curve #3 by copying the part of curve #2 that starts in t=0 and ends t=0.5.
> cur_trim(#3,#2,5,0);
> Creates a new curve #3 by copying the part of #2 that starts in t=0 and ends in t=5 while at the same time reversing the sense of direction.
> cur_trim(#3,#2,-0.5,5);
> Creates a new curve #3 by extending the start of #2 to -0.5.
> Comments
> Extrapolation is not useful for UV-curves.

VARKON Homepage | Index