ruff-0.2: relatively useful fractal functions

Portabilityportable
Stabilityunstable
Maintainerclaudiusmaximus@goto10.org

Fractal.RUFF.Mandelbrot.Image

Description

Generic (slow) functions to render images.

Synopsis

Documentation

simpleImageSource

Arguments

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

coordinates

-> 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 (coordinates 100 100 ((-1.861):+0) (0.001)) 1000000000

complexImageSource

Arguments

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

coordinates

-> Int

max iterations

-> UArray (Int, Int, Channel) 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.

 putStr . unicode . border $ complexImage (coordinates 100 100 ((-1.861):+0) (0.001)) 1000000000

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

size

-> Coordinates r 

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.

data Channel Source

Channels in an image.

Constructors

EscapeTime

continuous dwell

DistanceEstimate'

normalized to pixel spacing

FinalAngle

in [-pi,pi]

type Coordinates r = (((Int, Int), (Int, Int)), [(Tuple2 Int Int, Complex r)])Source

Image bounds and coordinates.

borderSource

Arguments

:: UArray (Int, Int, Channel) Float

image

-> UArray (Int, Int) Bool 

Convert a distance estimate image to a near-boundary bit array. The input image must have a DistanceEstimate' channel.