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:
- Soft green hills.
- The soft green hills have now been coloured tan and blue down in the valleys.
- 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)
2001-08-19:
Now with centered models and better handling of large maps.
- Download the source code (18 kb zip file)
- (this version has not yet been packaged in compiled versions)
2001-08-10:
Now with demonstration program and edges which reach “down to the ground”. Examples of the output from the demonstration program:
- Download the source code (18 kb zip file)
- (this version has not yet been packaged in compiled versions)
1999-06-15:
- Download the source code (17 kb zip file) – tested with GCC/Ada.
- Ready to run package for DOS (377 kb zip file)
- Ready to run package for Linux on x86 compatible processors (19 kb zip file)
- Ready to run package for OS/2 (232 kb zip file)
1997-05-09:
- Ready to run package for AIX on RS-6000 (274 kb zip file)