IBM PC FRACTAL LANDSCAPES and PLANETSFRACTAL LANDSCAPES and PLANETS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Version 2.0 (C) 1988,89 Idea Soft Box 137 463 00 LILLA EDET SWEDEN C H A P T E R _________________________________________________________________ 1 Introduction First of all I would like to apologize for any spelling errors and language misunderstandings in this manual. Since English isn't my native tongue there's probably a lot that would have been written in another way by someone who has a better knowledge in English. This program was developed partly because I wanted to prove to myself that I could write such a program, but mainly as an exercise in graphics programming. Description of fractal landscapesDescription of fractal landscapes A fractal landscape is a landscape generated by a computer. It's completely controlled by randomness. This simulates how the movements in the earths surface has created mountains etc. How the program worksHow the program works This program uses a quite simple algorithm for generating the landscapes. The data for the landscape is hold in an two dimensional array of data. This array can be treated as a matrix of numbers. The value of each number represents the hight of that particular point in the lands surface. The computer then calculates some random numbers to describe the position of a line across the landscape, if it goes south-north or east-west and if the land should rise or sink. When this is done the computer decreases the value for all points on one side of the line and increases the other points by one. After that the procedure is started all over. After some hundreds of lines the landscape is beginning to look quite complex. CopyrightCopyright This program, it's documentation and all associated files are protected by international copyright laws. You are however allowed to copy this program to anyone you please as long as you - Page 2 - don't modify any file, don't leave out any files, don't copy this manual in a printed form, and don't charge anything for copying the software. You are not allowed to disassemble this program for any purpose. If you like this program, or use it for any profitable purpose such as demonstrating any computer devices (for example a graphics adapter), you're supposed to send us some money for it (currently $25, or 120 s.kr.). When you do you will receive the latest release of the program and a printed manual plus the rights to use it on one computer. Our address is on the front page. You are not allowed to use this program as a graphics-You are not allowed to use this program as a graphics- demonstration if you haven't registered as a user and paid thedemonstration if you haven't registered as a user and paid the license fee.license fee This program was written in Turbo C v2.0 and the source code can be obtained from us by sending us $40 (200 s.kr. i you live in Sweden). You are however not allowed to use any part of the source code for profitable use. - Page 3 - C H A P T E R _________________________________________________________________ 2 Installation This chapter describes what kind of equipment you require to use the program, how to install it on a hard disk, how to make a backup copy of the program and how to start it. System requirementsSystem requirements This program works on almost any system. It's however recommended that you use a computer with an EGA or VGA card together with a corresponding color display. The program requires the following: o A video graphics adapter (CGA,EGA,VGA and Hercules is supported) and a corresponding display. o One disk-drive. o At least 198 Kbytes of free memory. o An EPSON FX printer is supported, but not required. The "edit palette" function is only supported on the EGA/VGA video adapters. Backing up your diskBacking up your disk You should make a backup copy of this disk when you receive it. You do this by inserting you DOS Disk in the A-drive. You then type: A:DISKCOPY A: A:__________ __ __ The computer will prompt you to insert your source disk. Insert the original disk at this time. When you have done this you press a key. The computer will start the copying process. After some time you will be prompted to insert your Target disk. At this moment you remove the original diskette from the disk-drive, and insert a blank diskette in the same drive. The copy will be - Page 4 - created. After some time you may be prompted to insert your original again and then to insert your target again. This depends on the memory amount available in your computer. When the computer is finished it asks you if you want to copy another disk. At this question you type N and press enter. Installing the program on a harddiskInstalling the program on a harddisk To install the program on a hard-disk you insert your original disk in drive A: You then type MD C:\FRACLAND (enter) COPY A:*.* C:\FRACLAND If your hard-disk isn't C: you replace the C in the above example with the corresponding drive letter. Starting the programStarting the program To start the program you simply type FRACLAND and press enter. - Page 5 - C H A P T E R _________________________________________________________________ 3 The menus Fracland is completely menu controlled. The operations are separated in four categories: Files, Edit, Draw and Utilities. In this chapter we will describe all menu titles. You select from the menus by moving the sliding bar with the cursor keys. When you have moved to a menu you wish to select you press enter. The pull-down menu will open, and you can select operation from this menu with the up- and down arrows. When you have moved the bar to the operation you wish to select you press enter. To close a pull-down menu you press Esc. FilesFiles Under the you can select different file related operations. All operations under this menu have something to do with the operating system. Save landSave land This operation will save the current landscape to disk. When you select this operation you will be prompted to input a name to use for the landscape. This name can include a full path specification. You are however not allowed to include any file extension. The program appends .LND on every landscape file. When you have entered your filename the landscape will be saved on your disk. Each file takes 48402 bytes on your disk. If you enter an invalid filename or anything goes wrong when you saves your landscape an error-message will be displayed. Load landLoad land This option loads a previously saved landscape. When this option is selected you will be prompted for a filename. If you enter the name of a file that doesn't exist or anything goes wrong when the file is loaded you will receive an error message. - Page 6 - Print landPrint land This options prints the current screen on any Epson FX graphics compatible printer. The whole screen except the menu are printed. This option prints to LPT1: save palettesave palette This option saves the palette setting to disk. This can be useful if you modify the palette with the edit palette option. When this option is selected you will be prompted to enter a filename. This name may include a path specifier, but no file extension. When the file is save the extension .PAL is appended to the filename. Each palette takes 16 bytes of disk-space. load paletteload palette This option loads a previously saved palette. When a palette is loaded the colors will change immediately after the palette is loaded. DirectoryDirectory This option will display a directory of user specified files. If you want to see all landscape files you enter *.LND as file mask,*.LND to see all palettes *.PAL, and to see all files *.*.*.PAL *.* OS-ShellOS-Shell The os-shell takes you to DOS without quitting fracland. This does however clear the screen. When you exit with this option you can enter the command EXIT at the dos prompt to return to fracland at any time. QuitQuit Quits fracland, and returns you to DOS. EditEdit Under the edit menu you can generate landscapes and modify the palette. Generate landscapeGenerate landscape Under this option you generate landscapes. When you select this option you will be asked if you wish to continue to generate on the current landscape or if you want to create a new landscape. - Page 7 - If you select continue the computer will continue to generate your current landscape. A new landscape on the other hand clears the previous one out of memory before continuing. When you select the new landscape option you will be prompted for size. This option determines the resolution of your picture. The bigger size the bigger resolution (and the longer time it takes to generate the landscape). The computer now starts generating. You can abort at any time by hitting the space-bar. If you have selected a large size I strongly recommend you to leave the computer over night. The landscapes included on this disk has been generated for at least 12 hours (on my 10 MHz AT with 80287 math-coprocessor). Edit paletteEdit palette This option allows you to modify the default color palette set by fracland. You select color by moving the arrow to the color you wish to modify. You modify it with the up and down arrows. When you have modified the palette to your liking you can save it to disk with the save palette option under the files menu. Reset paletteReset palette This option restores the default color palette when you have modified it with the Edit palette option. DrawDraw Under the draw menu you can draw landscapes, planets and look at your landscape from above (satellite view). LandscapeLandscape This option draws your landscape in a 3-D view on the screen. When it's selected you are asked to input the scale factor for the landscape (this is parameter determines the height of the highest mountains), water level (this determines where the water should start, default 0), snow level (where the snowline on the mountains should be) and if your landscape should be transparent. If you answerer no on the last question some (not all) hidden lines will not be drawn. This is the default. It's recommended to use the satellite view to determine the recommended values for each parameter. - Page 8 - You can abort drawing at anytime by hitting space bar. PlanetPlanet This option draws a planet on the screen with your landscape on it's surface. You will be prompted for the same parameters as you are when you draw a landscape, except for the transparent parameter. A planet is never transparent. You can modify the planets angels by selecting the planet parameters option under the utilities menu. When the landscape is drawn it may take some time before anything actually happens. This is because the program begins to draw on the south pole, and (with the default parameters) it's not visible. Where the landscape is connected you will se a quite sharp edge. This happens because the sides of the landscape doesn't fit together. You could use the Mirror landscape (under the utilities menu to overcome this). Satellite viewSatellite view The satellite view draws the landscape as seen from above. It also gives some recommended values and some status information about your landscape. I suggest you use the recommended values , when drawing landscapes and planets, as a rule. UtitlitesUtitlites Under this menu you can convert landscapes in size, and change some program parameters. Mirror landscapeMirror landscape The Mirror option takes a landscape (not over 110 in size) and converts it to a four times bigger landscape. This is done by taking the original landscape and creating mirror images in three different directions. This option creates a quite symmetrical look. If you don't like this look you can always use the "generate, continue option". This option is most useful when putting landscapes on planets as the edges of the landscape will fit together when it's wrapped around the planet. If your landscape is over 110 in size you should use the scale option before using mirror. - Page 9 - Scale (1:2)Scale (1:2) This option makes your landscape half the original size. This is achieved by removing every second point from the original landscape. Planet parametersPlanet parameters Under this option you can change some parameters for the planet. They are as follows: Radius This is the size of the planet. By default this isRadius the largest value that fits the screen. A larger value will cause the planet to be clipped by the screen edges. Alpha This is an angle from a neutral Y-axis to theAlpha north-south axis. Beta This is an angel from a neutral X-axis to theBeta equator. Phi This is the rotation angle around the north-southPhi axis. GrayscaleGrayscale This option turns gray-scaling on and off. If gray-scaling is on no colors will be displayed when the landscape is drawn. Every color will be represented by a different dot-density. This option is most useful on a monochrome system (CGA and Hercules), and when you want to print a landscape on paper. This is by default turned ON for CGA and Hercules adapters, and OFF for EGA and VGA. When this option is ON the drawing will take longer time as a lot of pattern calculation is done while drawing takes place. - Page 10 - C H A P T E R _________________________________________________________________ 4 Tips & tricks This section include some tips on how to use this program. Planet drawingPlanet drawing When you draw a planet you are recommended to use the mirror option first, as this produces a much better result. PrintingPrinting If you are about to print a landscape it's recommended that you set the gray-scale option to on before drawing on screen. Using landscapes in drawing programsUsing landscapes in drawing programs Since many drawing programs include a snapshot feature you can always hide the pull-down menu (by pressing esc) and use this feature. You can then leave fracland, enter your drawing program and edit the picture. Known programs that include such a feature: EGA PAINT 2005 Use the EGAPRINT utility.EGA PAINT 2005 DR HALO III Use the GRAB utility.DR HALO III Deluxe Paint IIDeluxe Paint II Use the CAMERA utility. First publisherFirst publisher Use SnapShot & Snap2Art. There are probably a dozen more out there, but the list above is the ones I know. The listed programs are (Tm) to their publishers. - Page 11 - IndexIndex A LA L Alpha 10 Load Land 6 B Palette 7B backup copy 4 Beta 10 MM Menu selection 6 C Mirror 9C CGA 10 Modify colors 8 Copyright 3 OO D os-shell 7D Description 2 directory 7 PP Draw Phi 10 landscape 8 Planet parameters 10 planet 9, 11 Print 7, 11 Satellite view 9 Printer 4 draw menu 8 QQ E Quit 7E edit menu 7 Edit palette 8 RR EGA 4 Radius 10 EXIT 7 Recommended parameters 9 F Register as user 3F files menu 6 Reset palette 8 G SG S Generate landscape 8 Save Graphics adapter 4 Land 6 Grayscale 10 Palette 7 Scale (1:2) 10 H snapshot 11H hard-disk 5 Source code 3 Hercules 10 Start fracland 5 System requirements 4 - Page 12 - U VU V Utilities menu 9 VGA 4 - Page 13 - ContentsContents Chapter 1 Introduction 2 Description of fractal landscapes . . . . . . . . . . . 2 How the program works . . . . . . . . . . . . . . . . . 2 Copyright . . . . . . . . . . . . . . . . . . . . . . . 2 Chapter 2 Installation 4 System requirements . . . . . . . . . . . . . . . . . . 4 Backing up your disk . . . . . . . . . . . . . . . . . . 4 Installing the program on a harddisk . . . . . . . . . . 5 Starting the program . . . . . . . . . . . . . . . . . . 5 Chapter 3 The menus 6 Files . . . . . . . . . . . . . . . . . . . . . . . . . 6 Save land . . . . . . . . . . . . . . . . . . . . . . 6 Load land . . . . . . . . . . . . . . . . . . . . . . 6 Print land . . . . . . . . . . . . . . . . . . . . . 7 save palette . . . . . . . . . . . . . . . . . . . . 7 load palette . . . . . . . . . . . . . . . . . . . . 7 Directory . . . . . . . . . . . . . . . . . . . . . . 7 OS-Shell . . . . . . . . . . . . . . . . . . . . . . 7 Quit . . . . . . . . . . . . . . . . . . . . . . . . 7 Edit . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Generate landscape . . . . . . . . . . . . . . . . . 7 Edit palette . . . . . . . . . . . . . . . . . . . . 8 Reset palette . . . . . . . . . . . . . . . . . . . . 8 Draw . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Landscape . . . . . . . . . . . . . . . . . . . . . . 8 Planet . . . . . . . . . . . . . . . . . . . . . . . 9 Satellite view . . . . . . . . . . . . . . . . . . . 9 Utitlites . . . . . . . . . . . . . . . . . . . . . . . 9 Mirror landscape . . . . . . . . . . . . . . . . . . 9 Scale (1:2) . . . . . . . . . . . . . . . . . . . . . 10 Planet parameters . . . . . . . . . . . . . . . . . . 10 Grayscale . . . . . . . . . . . . . . . . . . . . . . 10 i Chapter 4 Tips & tricks 11 Planet drawing . . . . . . . . . . . . . . . . . . . . . 11 Printing . . . . . . . . . . . . . . . . . . . . . . . . 11 Using landscapes in drawing programs . . . . . . . . . . 11 Index 12 ii