Help for FRACGEN
PURPOSE:
fracgen generates images which are similar to elevation images of mountainous
regions using the fractional Brownian motion process.
EXECUTION:
fracgen fake.img NL=300 NS=150 FORMAT=HALF FRACDIM=2.30 POWER=2.0 SEED=32161267
This example, which uses all the parameters, generates a 128x128 image that has
a fractal dimension of 2.30 and starts the random number generator with that
particular seed. The fractal dimension parameter governs the roughness of the
terrain: try values between 2.0 and 2.5, the default is 2.15. The elevations
are raised to the POWER power. If the power is greater than one this has the
effect of smoothing out the valleys relative to the mountains. Using a partic-
ular value for the SEED parameter allows the generation of the same terrain.
If the SEED is defaulted, a random value is used for the seed.
fracgen fake.img
This example will generate a 256x256 image with fractal dimension 2.15.
OPERATION:
fracgen basically just filters white noise with a power law filter. More
specifically it generates random phases and random amplitudes, multiplies
the amplitudes by a power law ( 1/f**(power), f is frequency), and FFT's
them to get the fake elevation image. The elevations are raised to the POWER
power and are scaled to fit into the format. Because an FFT must be
performed this program can take a large amount of CPU time.
NOTE:
fracgen creates a large (roughly 8000 blocks) temporary scratch file named
by the user but defaulted to fracgen.scr. The file is automatically deleted
on successful completion of the program.
RESTRICTIONS:
The maximum image size is 4096 in either direction.
Original Programmer: Frank Evans
Cognizant Programmer: Frank Evans
Revisions: Megan O'Shaughnessy, 3-12-1990
Changed destination of temporary scratch file to
V2$SCRATCH.
George A. Madrid Jr, 6-AUG-1993
Changed file specification so that it can be set
by the user when running the pdf. Put in parameter
IDSNAM to accomplish this. Ported to UNIX.
PARAMETERS:
OUT
Output image
NS
Number of lines
NL
Number of samples
FORMAT
The output format
FRACDIM
The fractal dimension
POWER
The exponent the elevation
is raised to.
SEED
The random generator seed
IDSNAM
Name of Intermediate Data Set
See Examples:
Cognizant Programmer: