home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
files
/
nz10.dms
/
nz10.adf
/
Synthe
/
Synthe.doc
< prev
next >
Wrap
Text File
|
1993-12-03
|
2KB
|
47 lines
SYNTHESHAPE
===========================================================
Written by Garth Thornton, Wellington NZ in TDI Modula-2 (v3.00)
Completed 14th Feb 88
This is a sort of simulation of an oscilloscope display of complex
lissajous figures.
The speed is achieved by using integer math; all waveform data is set up
previously in arrays.
There are two screens; an interlaced 1 bit-plane for graphics,
and a console window for the parameter entry.
The easiest way to switch between them is to use Left-Amiga M and N
ie WB to front/back, (if you slide the front screen down the interlace
is a pain for the console window).
The parametric equation for the display is:
x = A1.cos(F1.t) + (A2.sin(F2.t + P1) + BX1).(A3.sin(F3.t + P2) + BY1)
y = A4.sin(F4.t) + (A2.sin(F2.t) + BX2).(A3.sin(F3.t - P2) + BY2)
If that doesn't mean much to you don't worry; either way you'll have
to play with the numbers to get a feel for what they do (and don't do).
Basically, amplitudes 1 and 4 set the x and y levels for the basic
figure, with amplitudes 2 and 3 setting the amount of "surface modulation".
All frequencies are relative to F1 (fixed at 10). The ratio of F4 to F1
sets the shape of the basic figure, eg F4=10 gives an ellipse, 20 gives a
figure eight. You can see this with amplitudes 2,3 set to zero.
F2 and F3 are the modulation frequencies applied to the basic figure.
There are three waveforms available; sine, triangle and square.
Best results are with mainly sine or triangle, and up to 2 square.
The phase shift P2 adds volume to the surface modulation, P1 distorts
it a bit.
The X balances change the frequency components of the modulation; you
need to know some maths/physics/electronics to understand how this works.
The Y balances sort of warp the shape a bit; hard to use "purposefully".
The rotation increment is the angle (in hundredths of a degree) between
each point, 10 gives good detail; 100 is fast; values such as 8700, 17600,
etc give different effects.
Have fun, don't get angry with me if it won't do what you want!
Garth.
Credits: Richie Bielak for code to run from Workbench.
It's not trivial to figure out how to do this sort of thing.
Lots of things are easy once you know how, but until you do...