Have a Cookie


My website uses cookies to personalize content and ads, to show you social media features, and to analyze website traffic. I might share information about your use of the website with my social media partners, advertising partners, and analysis partners, who may combine the data with other information about you, provided to them from your prior use of their services. Please note that you can change your cookie settings at any time.

Fractal Landscape Generator

I have written an Ada program for creating fractal LEGO landscapes in LDraw format. The system is split in two parts. The program Fractal_Landscape, which creates a fractal landscape in the form of a gray scale bitmap (in PGM format) and the program PGM_To_LDraw, which translates PGM files to LDraw format.

The latest edition of the system also comes with a demonstration program, which in three steps creats a little coastal landscape:

  1. Soft green hills.
  2. The soft green hills have now been coloured tan and blue down in the valleys.
  3. The water down in the valleys finally became horizontal.

The demonstration program depends on LDGLite (the command ldglite-run) and Perl.

The two programs in the package can be translated with the GNU Ada compiler with the following commands:

   gnatmake fractal_landscape
   gnatmake pgm_to_ldraw

The compiled programs should be moved to /usr/local/bin or ~/bin:

   su root -c 'mv fractal_landscape pgm_to_ldraw /usr/local/bin'

You can read the source code on-line and there are Ada compilers for a variety of operating systems on the AdaIC web site. You can learn about Ada in the Ada Programming wikibook.

To do:

  • (nothing I am aware of)


Now with centered models and better handling of large maps.


Now with demonstration program and edges which reach “down to the ground”. Examples of the output from the demonstration program:

  1. Green hills
  2. Green, tan and blue hills
  3. Beach landscape