This
document lists commands that were not included in the Nusse-Yorke book.
These
are more advanced commands that might be appropriate for someone who is quite
familiar with dynamics.
MOVIE - Showing changing
behavior as a parameter is varied
Any movie is a series of frames. In dynamics, you can create movies and
show them using Dynamics. The movies can be shown at about 1 frame per second.
Each frame is a separate file. For example you might make a movie about the
basins and attractors of the Henon map, and each frame might correspond to a
different choice of parameters.
The file names in a movie begin with some letters and then a number (for a
total of 8 letters and digits), and finally the name ends in ".pic". A movie from Henon might have the file
containing the first frame named
h0000000.pic
and the next frames would have file names
h0000001.pic, h0000002.pic,
h0000003.pic, etc.
These might contain pictures computed for parameter rho varying. The first
might be rho = 1.8, then next being rho = 1.81, then 1.82, etc.
To play the movie you need to know the name of the first file and you must tell
the program using the command RN (Root of file Name). After entering RN, enter
the root of the first file, which in our case above would be
h0000000
As the movie plays, the file name in DN increases to h0000001, etc. Note when a movie ends, it resets RN to the name at the start of a
movie, so you can replay movie by entering the command again.
If you
terminate before the end of the movie, (for example by hitting
the <Esc> key), the movie can be restarted from the last frame by
entering
the commands CONT and then MOVIE. If you set RN to be h0000003, and then
entered the command MOVIE, the movie would begin from that file.
While running MOVIE the arrow
keys have the following meanings:
LEFT (or equivalently '.') and
RIGHT fetch the previous or
next frame and its data and turn on pause mode if it is not already on
provided the process of the picture is the current process.
If
the picture file says the process is different from the actual process,
say H when it is actually P, then the program will not load the data.
UP and DOWN are for going through
frames more quickly. Both
check to see if another DOWN and UP has already been
hit an extra time.
If so, they simple advance or retard the file counter. If these have not
been hit, they act like LEFT and RIGHT.
---------------------------------------------------------------------
Comments on making Movies
It is possible to automate the process of making movies. The way to begin is to
experiment with the set of commands needed to make the movie. Some commands will
be needed to initialize the process and the others will be needed after a frame
is completed to save the frame and to make changes needed for the next frame.
Using a word processor like Edit, create a file (named H.DD for example) whose
first entries are
H !
Select the Henon map
RHO 1.8 ! Do Not include an equal sign.
PRMS .01 !
This sets the increment size of RHO to be .01.
BA ! Create a basins plot
TD ! Save the results in a file
DNP ! Increment the file name by one
BA
TD
DNP !
Repeating the last 3 commands 100 times is for
! making 100 files for rho = 1.8, 1.81, etc.
Once it is created, it can run as follows from the command line of DOS
> dynamics h.dd
------------------------------------------------------------------------
Making Movies Using the Basin and Attractors Command BA
BA (BAsins) can now set yk
to be a point on the k-th attractor for k = 1,...,7;
this is useful for movies since those yk that are set
are the first points
BA tests before the regular boxes; this means it will color the attractors
in the same order if they have not changed significantly from the previous
picture.
When using BA, it is important to have the attractors in the screen area.
To make a pictures using a zoom, to zoom toward one point,
BAS if preferable.
See our book for examples of how to use BAS.
---------------------------------------------------------------------
2/7/97
Macros:
New command NMAC tells program how many times it should repeat a macro.
Default = 1;
If you call a macro, it will run NMAC times.
Macros can be stopped by hitting Esc.
---------------------------------------------------------------------
Changes
incorporated in Edition 2
---------------------------------------------------------------------
Macros -- these can be of
particular use in creating files for videos, though it has other uses since it
lets a complicated string of commands be compressed to a single command. The
string of commands must by inserted into yalert.txt using an editor.
They could be used to prepare
an example for a class. It is like a Batch (DD) file except it can be called at
any time the program is running.
Steps
1) Select a name beginning with MAC but not just MAC, for example
"macro".
2) Enter a string of commands in a special place in yalert.txt;
this has been done for "macro".
3) At any point after you have chosen a map or DE, you enter the command
"MACRO" and its commands will be executed.
You can "play" macro
many times if you want. There is virtually no limit to the number of macros you
can create in yalert.txt.
To see how MACRO works, start the program, select P, enter command
MACRO.
It will execute the following commands (because they are specified in
yalert.txt under *macro); actually this is a slight change and you should
try this bunch:
*macro
# COMMANDSSTART says that commands follows;
# STOP says that if a process like T is running, it should stop.
$COMMANDSSTART
STOP
C
B1
T2
R
TN 10000
ys -5 5
ret
dis
TNB
TNE
T
ret
TNB
TNE
I
CommandsEnd # the following will be plotted as text;
(with extra spaces);
MACRO
This has shown $TN trajectories
followed simultaneously. #This text gets
printed
$COMMANDSSTART #
TN 1
CommandsEnd #
*
Note that RET TNB and TNE are toggles, so doing it twice would result in
different results, though the third time should be the same as the first.
It should but doesn't erase the screen, so that should be done manually.
---------------------------------------------------------------------
The following are commands that do the same as interrupts, except that they
can be called at anytime.
initxyz /* initialize rotation matrix */
ia = iax /* initialize
3-d axes default position */
{
drawXYZaxes(0,0,0);/* colors are set to 0 */
clrWindow();
initxyz();
drawXYZaxes(10,10,12,14);/*
colors */
return(1);
}
prmp /* increment parameter prm like + when plotting */
prmm /* increment parameter prm like - when plotting */
rotp /* rotate plus 3d axes */
rotm /* rotate minus
3d axes */
---------------------------------------------------------------------
added to disk menu a menu created by Dreger
GFM
- copy picture to special Graphic Formats Menu
---------------------------------------------------------------------
--------------------------------------------------------------------------
From Jens Dreger, dreger@ipst.umd.edu Jul 9 1997
Commands that are not in the
book...
unixfn
(unix-filename)
unixfn
is a toggle that alters the way in which dynamics
treats filenames that you
enter using the RN (rename)
command. Usually dynamics
shortens a given filename so it
contains at most one dot
(separating the rootname from the
extension). Using the unixfn command you can tell dynamics
not to touch the given
filename at all. This comes in
handy on systems that allow
arbitrary filenames, for
instance you can specify a
filename like
mymap_rho=+1.05_c1=-2.30
Note however that funny
filenames are sometimes dangerous.
Consider the filename -r: If
you do a rm * your file -r
will become an option to rm, deleting recursively
everything in reach, except
the file -r. You should also
avoid the characters ?
and * for similar reasons.
rotx,roty,rotz (rotate-about-x/y/z-axis)
There already are commands in
dynamics that allow you to
rotate the coordinate system
in three dimensional maps.
You specify the rotation axis
with ax,ay or az and use +
or - while plotting. Since +
and - are handled like
interrupts, these commands are
not available in batchmode,
that is, if you read all
commands from a file. Therefore
the commands rotx,roty,rotz where added. For example, to
rotate about the y-axis by 45
degrees from within a
batchfile,
you would say
angle 45
roty
rpcfirst,incrfirst
The toggle rpc
causes dynamics to color periodic orbits
plotted using rp or rpk according to their
period. By
default dynamics will use
color number 1 for period one,
and so on. Since this might
interfere with colors assigned
to basins, you can specify the color to be
used for period
one orbits using the rpcfirst command. Period two orbits
will then be colored using
color number rpcfirst+1 and so
on.
incrfirst does basically the same for the incremental
color mode (incr). In this mode, dynamics increases the
color number of a pixel by one
every time it is hit by a
trajectory point. With incrfirst you can specify the color
to start with. This is the
color number that will be
assigned to pixels when they
get hit by a trajectory point
for the first time. Using both
commands together you can
completely separate the color
numbers for basins, periodic
orbits and trajectories using
something like
rpcfirst
16
incrfirst
24
assuming that you only plot
periodic orbits with period
<=8.
shade3d
The shade3d command tries to
improve the output of the
three dimensional trajectory
routines by using higher color
numbers for points that are
further away from the screen.
Furthermore if shade3d is
switched on, dynamics will not
plot points with higher color
numbers over those with
lower color numbers.
plotupd (plot-and-update)
The plotupd
command is a toggle, that alters the behavior
of the plot command in the
following way. Usually the plot
command takes a data file
containing coordinate pairs and
plots them on the screen.
Points that do not fall into the
screen area are silently
ignored and the corresponding
coordinate pair remains in the
data file read by plot.
However, if you switch on the plotupd toggle, plot WILL
CHANGE THE DISK FILE erasing
all those coordinate pairs
that are not within the
visible screen area. Note that
this change is irreversible.
What is this good for ? You
can use this to create a
sequence of images zooming very
deep into some images. The
problem with zooming in is that
it takes longer and longer to
get a reasonable number of
point onto the screen, since
almost all trajectory points
fall out of the screen area.
On the other hand if you zoom
in using small steps, you
loose only a small number of
points in a small border
around you image. So you will
want to keep your old points
and just replace the points
that went missing. Here is a
sequence of dynamics commands
that does exactly that:
dots 100000 # we want 100000 points on the screen
ttdd
100000 # we want 100000 points on the
disk
incrt # plot should only increase
"dots",
# if a
point is on the screen
plotupd # if a point is NOT on the screen,
# erase it
from the diskfile
rn myproject # give diskfile a
name
ttd # start writing to the disk
t # plot trajectory, coords go to file
ttd # stop writing to disk and close file
At this point you have a file
on the disk, that contains
100000 points, named myproject.ttd. And you have an image
on the screen,
that corresponds to these 100000 points.
You could erase the screen and
read the file back in with
plot and you would get the
same image back. But if you
zoom in a small step first,
then some points from the disk
file are no longer on the
screen and plotupd becomes
important. Say you lost 5000
points by zooming in. Then
you can replace them by the
following lines of dynamics
commands:
plot myproject.ttd # read in diskfile
and plot points
Now
there are 95000 points on the screen and 95000 points
in the disk file, since plot
deleted all points outside
the screen area. dots also has the value 95000, since we
told dynamics to count only
points on the screen (see
incrt).
cont # don't reset dots counter when
# starting
trajectory
rn myproject # set rootname
ttd # start writing to the disk
t # plot trajectory, 5000 points,
# coords
are appended to the diskfile
ttd # stop writing to disk and close
file
What do you have now ? 100000
points on the screen (95000
from the file, and 5000 added
by t) and 100000 points in
the diskfile !
At first you might think that
the disk-I/O takes more time
than the calculation, which
might be true for the first
few frames. But as you will
see when you try zooming in
very deep, calculation time
increases exponentially and
the disk I/O becomes
completely negligible.
Tip: If you save a .dd-file al
along with every frame, you
can even restart the zoom
process easily using a
commandline
like
dynamics myproject.dd myproject.bat
where the .dd file contains
the screen coordinates and the
batchfile
contains the commands mentioned above.
--------------------------------------------------------------------------
12/96
New command RNP (or DNP) = Root Name + 1;
The root name can be up to 8
characters long for DOS and this command
creates names 8 characters long.
This command takes the root
name and sees if it ends in an
integer (minus signs are ignored) and if not it is thought of as ending in 0
This non negative integer is increased by 1 and the root is thus changed
(except that in DOS, the name is rejected if it is longer than 8 letters.
Examples:
h becomes h0000001,
h0000001 becomes h0000002,
h0000099 becomes
h0000100,
hhh999 becomes
hhh1000.
h4h1 becomes
h4h10001.
-------------------------------------------------------------------------------