Take a look at sample.txt.
This is what is written to the file by our solution to this problem; your
solution should be similar.
To produce this data, we ran the rod program using 4 segments, a temperature of
0 at both ends, a uniform rod temperature of 100, and 3 time units.
Notice that the Maple command consists of a call to the Maple display
command. The display command takes two arguments. The first argument is a
list of plot commands, and the second argument is ``insequence=true''.
There are four plot commands contained within the display command,
one for the initial state as well as each of the three time units that we used
in the simulation. Each plot command asks Maple to plot four points, one for
each of the four segments that we used in the simulation. The x coordinate of
each point is the number of the segment, The corresponding y coordinate is the
temperature at that point.
To view the animation in Maple, you must first issue the command
with(plots);
You can then read the file ``sample.txt'' from your ``examples'' directory into
Maple by using the Include... option under the File menu. Once
you have included the file, press the Enter key and the animation will
appear. The plot will have segment numbers along the horizontal axis and
temperatures along the vertical axis. You will see a curve showing how the
temperature varies along the rod. When you start the animation, you will be
able to see how the rod cools over time. (When you finish this assignment, you
will be able to produce much more interesting animations. With only three time
units and four rod segments, our animation is rather short.)
The challenge in this assignment is to write the information to a file exactly
as indicated in the example. You must get all the punctuation exactly right,
or Maple won't be able to interpret the command. Take your time, and pay
attention to detail.
Joseph L. Zachary
Hamlet Project
Department of Computer Science
University of Utah