mars-0.1.0.0: Generates mountainous terrain using a random walk algorithm.

Maintainerch.howard@zoho.com
Safe HaskellNone

Graphics.Mars.Graph

Description

Use the graph function here to generate the raw graph array data based on various parameters.

Synopsis

Documentation

graphSource

Arguments

:: Int

height (array rows)

-> Int

width (array columns)

-> Float

stamped circle radius

-> Float

jitter factor of walk, usually nearly the same as radius

-> Int

a seed value for the random number generator

-> Int

numbers of steps to take in random walk

-> Float

magnification factor

-> IO (UArray (Int, Int) Float) 

Beginning in the center, follows a random walk path, and stamps a circle shape onto the array at each step. Internally uses a mutable unboxed array for efficiency, but returns the results in a frozen array.