APPLICATIONSCREATION GRAPHIQUE ★ FRACTAL LANDSCAPE GENERATOR (AMSTRAD COMPUTER USER) ★

Fractal Landscape Generator (ACU 89/11)Fractal Landscape Generator (ACU 89/12)Fractal Landscape Generator (ACU 90/01)Fractal Landscape Generator (ACU 90/04)
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Generate your own landscape

Dean Cracknell serves up the second course of his three part fractals recipe.

ihe Basic program that created the fractal landscape last month takes only a few minutes to calculate and plot the entire fractal. This phase in the creation of the Landscape Generator is replaced by a machine-code version that does the trick in a few seconds.

The Machine Code Loader program (Program 1) loads and saves the machine code which, when installed by the Landscape Generator program, adds twelve new commands to Basic's vocabulary. These create the fractal data and generate random numbers for the fractal image. The fractal is now created in memory, rather than in the array ‘height', and this memory is between &8000 and &90FF. You can quickly test this machine code by typing the following at the keyboard:

MEMORY &7FFF - reserve space
LOAD “FRA-A.BIN”,&9100 - load M/ Code CALL &9100 - Log-on RSX's
|WIPE - Clear Fractal Data
MODE0: |FRACTAL,1 - Calculate and Plot Fractal This will produce the now familiar fractal contour map in the bottom left-hand comer of the screen.

Entering:
|WIPE: |FRACTAL,1 - Clear, Recalculate & Plot plots a new fractal over the first.

Program 2 is the first instalment of the Landscape Generator program: type in this program and save it as “prog-1.bas” (part 2 will be listed next month). This will run perfectly as it stands, but does not perform the 3-D image projection (yet). This is an expansion of last month's program and introduces a keyboard scan loop for changing certain parameters around the system. The keyboard options so far are as follows: [cursors-keys]: Move over the landscape, [SHIFT] will step 10 and [CONTROL] steps 30.

[U] and [D]: Move up and down, [SHIFT] moves 10 and [CONTROL] moves 100.
[A]: Switches between auto and manual elevation. In auto, the elevation is set to 2 units above the surrounding landscape. [U] and [D] will turn off auto.
[S] and [I]: These keys add 1 to the two seed values; shifting the keys subtracts 1.
[N]: Turns cursor ON and OFF.
[Q]: Quit.

The screen area is divided into 3 sections: the main image area where the landscape will be projected; the contour map area; and the data area that displays some of the more relevant landscape data.

The information shown in this last screen areas is as follows:

  • I: The Image Seed
  • S: The Comer Seed These describe each landscape. Changing “1” affects the entire image, producing drastic changes in the landscape; “S” only alters the four comers', producing more subtle changes. In theory these two numbers can generate 17,592,186,044,416 different landscapes [i.e. 128 x 128 x 128 x 128 (comers) x 65536 (images)], but in order to allow the two seeds to be displayed, this total has been restricted to 1,000,000.
  • L: Current Level
  • E: Current Elevation “L” determines the resolution level that the projected image will have (from 2,8,16,32 or 64) “E” is the elevation of the viewer above (or below!) the landscape. In “AUTO” mode the “E” changes to and “A” and shows the average height of the surrounding cells.
  • X: Current X-position Y: Current Y-position The following are for the image projection and will be covered in more detail next month.
  • W: Wire, Solid or Mixed Drawing -mixed is wire-framed solid.
  • C: Contour or Shaded Display.
  • B: Show Below Sea Level, Draw Sea, or Fill Sea.
  • Frame: Frame Number to save to Disc/Cassette.
  • Time: The time taken to perform the option, in seconds.
If you wish to experiment with what we have so far, make a copy of the program and work on that, (you will need the unaltered version next month). Subroutine 5 from last month can be readily added for isometric projections; the 4 variables - tiltl, tilt2, tilt3 and tilt4 - will ‘tilt' the comers of the fractal. In the program these are preset to tip the landscape towards the viewer, but can be changed to alter the landscape to any angle. Setting other locations within the map, using :STORE,x,y,value, 1 will allow you to preset other parts of the landscape: for example, making all tilt variables zero and setting the centre to a value (eg :STORE,32,32,100,1) will create islands.

The next instalment gets down to the nitty-gritty of 3-D image projection (you will not need the special red and blue glasses, it is not that kind of 3-D projection), and adds the finishing touches to the Landscape Generator.#

ACU

★ PUBLISHER: Amstrad Computer User
★ YEARS: 1988 , 1990
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: AMSTRAD COMPUTER USER 1990
★ AUTHOR: Dean CRACKNELL
   



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Fractal  Landscape  Generator  v1.1    (Amstrad  Computer  User)    ENGLISHDATE: 2023-12-03
DL: 451
TYPE: ZIP
SiZE: 15Ko
NOTE: 40 tracks
.HFE: Χ
.DSK: √

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » 2D/3D Fractal Landscape (Amstrad Computer User)
» Applications » The Fractal Show/Mandelbrot
» Applications » Fractales (Tilt)
» Applications » Mandelbrot Generator
» Applications » Fraktal Generator 3D
» Applications » Fractals on Amstrad (Popular Computing Weekly)
Je participe au site:
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.732-desktop/c
Page créée en 154 millisecondes et consultée 3753 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.