ruff-0.1: relatively useful fractal functions

Portabilityportable
Stabilityunstable
Maintainerclaudiusmaximus@goto10.org

Fractal.RUFF.Mandelbrot.Image

Description

Generic functions to render images.

Synopsis

Documentation

simpleImageSource

Arguments

:: (Ord r, Floating r) 
=> Int

width

-> Int

height

-> Complex r

center

-> r

radius

-> Int

max iterations

-> UArray (Int, Int) Bool

image

Render an image with the Simple algorithm. The iteration count is doubled until the image is good enough, or the fixed maximum iteration count is reached.

 putStr . unicode $ simpleImage 100 100 ((-1.861):+0) (0.001) 1000000000

complexImageSource

Arguments

:: (Ord r, Real r, Floating r) 
=> Int

width

-> Int

height

-> Complex r

center

-> r

radius

-> Int

max iterations

-> UArray (Int, Int, Int) Float

image

Render an image with the DistanceEstimate algorithm. The iteration count is doubled until the image is good enough, or the fixed maximum iteration count is reached. The output values are converted to Float.

imageLoopSource

Arguments

:: (Ord r, Floating r) 
=> STRef s Int

escapees

-> a

output array

-> Int

max iterations

-> Int

iterations

-> Bool

prior escapees

-> Int

iterations this phase

-> [Iterate u r]

iterates

-> (Output u r -> ST s ())

output callback

-> ST s a

output array as given

Image rendering loop.

coordinatesSource

Arguments

:: (Ord r, Floating r) 
=> Int

width

-> Int

height

-> Complex r

center

-> r

radius

-> (((Int, Int), (Int, Int)), [(Tuple2 Int Int, Complex r)])

(bounds, coords)

The parameter plane coordinates for an image, with bounds.

asciiSource

Arguments

:: UArray (Int, Int) Bool

image

-> String

ascii

Convert a bit array to ascii graphics.

unicodeSource

Arguments

:: UArray (Int, Int) Bool

image

-> String

unicode

Convert a bit array to unicode block graphics.