VARKON Version 1.15 1997-12-29


arc_2pos - Geometric procedure

Creates an arc


Description

Creates a circular arc defined by two positions and radius. The arc starts in the first position and turns anticlockwise to the second position where it ends. A positive value for radius creates the shorter of the two possible arcs (end-start < 180 degrees) and a negative value creates the longer (end-start > 180 degrees).

Syntax

arc_2pos(id, p1, p2, r:attributes);

REF id;
VECTOR p1;
VECTOR p2;
FLOAT r;


Principal parameters

id - Local identity
p1 - Start position
p2 - End position
r - Radius


Optional parameters

None.


Attributes

PEN - Pen or colour number
LEVEL - Level number
BLANK - Visible(0) or invisible(1)
AFONT - Solid(0), dashed(1) or centerline(2)
ADASHL - Dashlength
WIDTH - Linewidth


Examples

arc_2pos(#1, vec(1,0),vec(0,1),1);

Creates the first quarter of a circle with radius = 1.

Comments

In a 3D module the resulting arc is restricted to the XY-plane of the active coordinate system. If p1 or p2 are not in this plane they will be projected along the Z-axis onto the XY-plane before being used to create the arc. The absolute value of r must be larger than half the distance between p1 and p2.


VARKON Homepage Index