.cpp
file for C++).
Use the usual submit folder, under the name of seeworld.cpp
.
continents.dat
that gives outlines of the continents, in terms of points and
information about how they are connected.
H:\class\m149.1\continents.dat
,
which describes the outlines of the continents. Each line of
this data file has three numbers for one data point. The first
number is 0 or 0 18.6 120.7 1 18.5 121.4 1 18.5 122.2 ...
earth.ez
.
seeworld.exe 30 -90 < continents.dat > earth.ez
(for example). Below is a discussion of just how to access such arguments in your program.
Another way is to have your program prompt the user for these arguments and read them in from standard input. The only disadvantage is that then you can't use standard input and output for the data files in and out; instead, you will need to build the names of those files into the program and open them for reading and writing.
H:\class\m149.1\lab2
you will need the files continents.dat
and ez2gs.cmd
; it would be easiest first to make shortcuts
to these files from your own folder, the one in which you are working.
(To make a shortcut, use Windows NT Explorer to go to the folder,
use the right mouse button to make a copy, go to your working folder,
and use the right mouse button to ``paste shortcut''.)
Command Prompt
. If your working
folder is m149\lab2
in your home folder, type cd m149\lab2
.
Then you can run commands as described.
earth.ez
, you can generate the graphic output by the
command ez2gs.exe earth.ez
on the command line. To center the
picture you may need to use the horizontal and vertical scroll
bars.
seeworld.cpp
.
seeworld.exe
.
earth.dat
by using the DOS command
seeworld.exe 30 -90 < continents.dat > earth.ez
ez2gs.exe earth.ez
After a wait for processing the file, you will get a drawing window in which the picture will be shown.
Remember, the latitude of a point on the earth is the angle up from the equator, as seen from the center of the earth, and the longitude is the angle east of a line that runs from pole to pole through Greenwich, England.