VARKON Version 1.15 1997-10-24


sur_rot - Geometric procedure

Creates a surface


Description

Creates a surface by rotating a line, arc or curve around an axis. The curve must be planar and the rotation axis must be in the same plane as the curve. The output surface is a LFT_SUR with maximum 4 patches in the V-direction and the same number of patches in the U-direction as the number of segments in the input curve.

Syntax

sur_rot(id, ref, p1, p2, rotang1, rotang2, dir, reverse:attributes);

REF id;
REF ref;
VECTOR p1;
VECTOR p2;
FLOAT rotang1;
FLOAT rotang2;
INT dir;
INT reverse;


Principal parameters

id - Local identity
ref - Identity of line, arc or curve to rotate
p1 - First position on rotation axis
p2 - Second position on rotation axis
rotang1 - Start angle of rotation
rotang2 - End angle of rotation


Optional parameters

reverse - Controls the parametric directions of the resulting surface
dir - +1 = Clockwise rotation, -1 = Counterclockwise rotation. Default = +1
     1 = No reversal of input (default)
    -1 = Input curve (U-direction) reversed
     2 = Angles and direction (V-direction) reversed
     3 = Both reversed 

Attributes

PEN - Pen or colour number
LEVEL - Level number
BLANK - Visible(0) or invisible(1)
SDASHL - Dashlength


Example

sur_rot(#2, #1, vec(0,0,0), vec(0,1,0), 30.0, 90.0);

Creates a surface by rotating the curve #1 from angle 30 degrees to 90 degrees (60 degrees) clockwise around the positive Y-axis.

sur_rot(#2, #1, vec(0,0,0), vec(0,1,0), 30.0, 90.0, -1);

The same as above but counterclockwise rotation from 30 to 90 degrees (300 degrees).

Comments

Creates a LFT_SUR (Conic Lofting Surface) where the spine curve is a straight line defined as the start and end points of the input curve projected on the (infinite) p1-p2 line.

The definition of the start and end angle is in accordance with the arc_1pos() definition. Each constant U line becomes a circle in a X/Y plane where the Z axis is the input rotation line.

The reverse parameter is not operational in VARKON version 1.15A


VARKON Homepage Index