EUG PD


Mini-Maxi-Map

 
Published in EUG #5

This program - submitted by Howard Guppy - will draw a map of the U.K. mainland. (Apologies to those who live elsewhere!) I have discovered that, because each point is plotted relative to the last one drawn, the whole map may be scaled up or down by changing the values of X% and Y% in the PLOT statement at line 210.

In the listing, X% and Y% are set to be multiplied by a factor of 1, but if the multiplication factor is changed to a number above or below 1, the map will be scaled accordingly.

Any decimal fraction may be used to scale the drawing, i.e. .25 for one quarter size, 1.33 for one and a third size, etc, etc. Once you start using scale factors much greater than 1, more and more of the map will start to be drawn 'off-screen' until all you will see is a greatly enlarged section of East Anglia. This is because the drawing starts and ends in that area. The actual screen co-ordinates for the starting point of the drawing can be found in the variables STARTX% and STARTY% at lines 140 and 150. These values may also be changed and when used in conjunction with the scaling factor will allow you to 'zoom-in' on any part of the map, but of course, only the coast-line is shown!

You might also try giving X% and Y% unequal values, making the drawing short and squat or tall and thin. The program uses two VDU 19 statements at lines 120 and 230. The first of these causes the computer to 'draw' in the background colour (black). When the drawing is complete the second VDU 19 statement changes this colour to white, so the actual process is not seen. Remove these VDU statements (or place REMs in front of them) if you WANT to watch the map being drawn.

Finally, I have to say that you've got to have a lot of nerve to type in all those DATA statements, but a certain amount of error trapping is included in the listing. I can think of several uses for this program, what about you? As a bit of fun, a 'mystery' prize (not worth having!) will be awarded to the first person who sends in the values of STARTX%, STARTY%, X% and Y% needed to make the Mull of Kintyre fill the screen!

Will Watts, EUG #5

Howard Guppy