home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 4
/
AUCD4.iso
/
art_design
/
imaging
/
draw_zerr
/
!DrawZerr
/
!Help
< prev
next >
Wrap
Text File
|
1994-07-20
|
3KB
|
89 lines
************************************
* D r a w Z e r r 1.10 *
* *
* © 1994 Andreas Feldner *
* of the "Flying Snails" *
************************************
This program allows you to transform Draw files
using arbitrary mathmatical equations. It operates
by transforming every point in the Draw file, but
it does not change the junctions between the
points (i.e. a staight line stays a straight line).
Sprites and text lines are only shifted, but not
transformed (unless converted to paths). This
program cannot handle rotated sprites or texts
(these are left unchanged).
You start the program by double clicking on its
icon in the filer window. It installs itself on
the icon bar. Click on its icon to open a display
window and a setup dialogue box.
You can load a Draw file by dragging it into the
display window. Initially, it will be shown
undistorted. Now you can fill in the two
transformation formulae in the setup dialogue box.
Use the variables x and y to refer to the original
co-ordinates of each point. Please note that you
can use x in the formula for the new y co-ordinate
and vice versa (thus allowing rotations, etc.).
The expression syntax is quite similar to BASIC
expressions and will be explained below. The unit
length is one inch. When you are ready, click on
the OK button to transform the file. The original
version is still held in memory, so if you change
the formula and click OK again, this refers to the
original Draw file.
You can restore the formulae for the currently
displayed picture by clicking on the Reset button.
This also clears all additional variables (see
below).
To save the transformed Draw file, click Menu
over the display window and chose the Save option,
which leads you to the familiar "Save as" dialogue
box.
The syntax for the formulae:
****************************
You can construct a formula using
a) Infix operators:
+ - * / ^
(e.g. x+y, x^2+2*x*y+y^2)
b) Prefix operators:
- SQR SQRT LN LG EXP SIN COS TAN
ABS ATAN
(e.g. SQR(x), etc.)
c) Numbers:
123.45e-67, -2, etc.
d) Variables:
These consist of lower case characters. Only x
and y have a special meaning (the original
co-ordinates). Other variables may be used
freely; you get asked for their value before
the transformation begins. Once defined, the
variables keep their values until you click on
the Reset button in the setup dialogue box.
Some typical formulae:
x axis y axis
----------------------------------------------------
x LNy
x*COSphi-y*SINphi x*SINphi+y*COSphi
5*COSx 5*COSy
3*(COSx+SINy) 3*(SINx+COSy)
----------------------------------------------------