VARKON Version 1.15 1997-10-24


tform_rotp - Geometric procedure

Creates a transformation


Description

Creates a rotational transformation with optional scaling. This rotation is restricted to the XY-plane of the active coordinate system with a specified position as center.

Syntax

tform_rotp(id, p, rot, sx, sy, sz:attributes);

REF id;
VECTOR p;
FLOAT rot;
FLOAT sx;
FLOAT sy;
FLOAT sz;


Principal parameters

id - Local identity
p - Center of rotation and origin for optional scaling
rot - Counterclockwise angle of rotation


Optional parameters

sx - Scalefactor in X-direction, default = 1
sy - Scalefactor in Y-direction, default = sx
sz - Scalefactor in Z-direction, default = sy


Attributes

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


Example

tform_rotp(#1,vec(100,100),45);

An anticlockwise rotation of 45 degrees in the XY-plane with X=Y=100 as centre.

tform_rotp(#1,vec(100,100),-20,2.5);

A clockwise rotation of 20 degrees around X=Y=100 and simultaneous scaling in X and Y and Z with a factor of 2.5.

Comments

In a 2D module scaling in the Z-direction has no meaning.


VARKON Homepage Index