VARKON Version 1.15 1997-10-16
Transforming and copying geometry is a two step process in VARKON. First
you define a transformation and then you use it for copying. Transformations
are implemented as ordinary geometric objects just like lines or curves
and used in the same manner. VARKON currently supports translation, rotation,
scaling and mirroring in 2D or 3D of all implemented geometric entities
except UV-curves and their offsets. To create a combined translation and
scaling use.....
tform_move(#1,p1,p2,sx,sy,sz);
tform_move creates a transformation that moves an object according
to the translation vector p2-p1 and concurrently scales the object relative
to p1 with a factor of sx in the X-direction, sy in the Y-direction and
sz in the Z-direction. tform_rotp and tform_rotl are similarly
used for rotation and scaling. tform_mirr creates a mirroring transformation
and tform_comp creates a composite translation and rotation in 3D.
Once a transformation is created it can be used any number of times in
different copying operations. Here's an example...
lin_free(#1,vec(0,0,0),vec(100,0,0));
tform_move(#2,vec(0,0,0),vec(0,100,0));
tcopy(#3,#1,#2);
#1 is a line from (0,0,0) to (100,0,0). #2 defines a translation by 100
units in the Y-direction with no scaling. The tcopy-procedure creates
a new line #3 by copying #1 and translating the copy by #2. The new line
will end up going from (0,100,0) to (100,100,0).
As an alternative to copying single entities one at the time tcopy can
also be used to copy a whole part consisting of any number of entities
in one single operation.
part(#1,name(parameters));
tform_move(#2,vec(0,0,0),vec(0,100,0));
tcopy(#3,#2,#1);
In this case tcopy first creates a new part with the same name as
the original part and then creates transformed copies of all the part members
while inserting them into the new part with same identities as earlier.
The procedure is recursive meaning that parts consisting of other parts
are no problem. VARKON will create copies of these as well and still preserve
the original owner-membership relation on all part levels.
Copyright © Microform AB Henningholmsgatan 4 S-703 69 Örebro SWEDEN E-mail: info@microform.se
VARKON Homepage | Index |