Use the more command to view the contents of a file.
This works on all of the supported operating systems (Unix, OS X, Windows).
If your system does not have the more command, try the
less command instead.
To avoid having to type the full pathname c:\lcc\bin\lcc126 to run
the lcc compiler, you can shortcut it to lcc126. To do this you need
to put the directory c:\lcc\bin in your path. You can
check your path at the command line with the commmand
C:\> path
Unfortunately, there is no uniform way to add directories to your path across
different flavors of Windows.
We recommend consulting a lab TA for assistance.
The input file begins with an integer n, followed by
four real values: xmin, ymin, width, and
height in this order. It is followed by a 256-by-3
table of real-valued color gradations. (There is no need to even read
in the last 768 values for the part of the assignment that deals
with the grayscale image.)
For example, the file
mand4.txt is:
4
-1.5
-1.0
2.0
2.0
0.000 0.000 0.734
0.000 0.300 0.734
. . .
0.000 0.000 0.000
If you use scanf() it won't matter whether the numbers are on
the same line or not.
Checking Your Work and Hints
|
Compilation, Stdin, Stdout
|
There is a huge amount of information on the Web about
fractals, including a
Mandelbrot tutorial,
a
Mandelbrot applet,
another
Mandelbrot applet,
and a
Mandelbrot generator.
Check out the
PostScript section
of the COS 126 FAQ List
for more information on PostScript
(although you shouldn't need it for this assignment).
Kevin Wayne