index

Varkon MBS Programmers manual

# csys_3p - Geometric procedure

## Description

Creates a local coordinate system defined by two or three positions.

## Syntax

      csys_3p(id, name, p1, p2, p3:attributes);

REF | id;
STRING | name*10;
VECTOR | p1;
VECTOR | p2;
VECTOR | p3;

## Principal parameters

id | - Local identity
name | - User defined name
p1 | - Position of origin
p2 | - Position on X-axis

## Optional parameters

p3 | - Position near Y-axis

## Attributes

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

## Example

    csys_3p(#1,"Origin",vec(10,0,0), vec(11,0,0),vec(10,1,0));

Creates a coordinate system with origin in X=10 and Y=0. The direction of its axes are the same as the active coordinate system (no rotation).

## Comments

If specified the third position p3 is used by the system to rotate the Y and Z axes around X so that the XY-plane will include p3. If p3 is not specified the system will do something anyway but the user has no way of knowing what the result will be. This method should only be used when the exact direction of the Y and Z-axes is not important.

## See also

csys_1p() and csys_usrdef()

Varkon version 1.19E svn# 121M