RedIFS:
Filter:
redUniverse/Classes (extension) | Red > redUniverse > additional

RedIFS
ExtensionExtension

iterated function system

Description

Plotting with Pen. After Flake - "The Computational Beauty of Nature".

Class Methods

.new

Arguments:

drawFunc

A Function that draws something. It is passed a Point argument that should be used. Leave as nil for the default single pixel.

matrices

Array of arrays defining affine transformations. The inner array should have 6 values. See Pen's Pen: *matrix method. The outer array can be any length.

n

Number of iterations.

skip

Number of initial transformations without drawing.

Instance Methods

.draw

Start drawing at current Pen position.

.makeWindow

Creates a Window and draws. Mainly for testing.

Arguments:

bounds

a Rect that define window size and position

background

a Color

.plot

Creates a Window and an Image. Also mainly for testing.

Arguments:

width

in pixels

height

in pixels

.drawFunc

.matrices

.n

.skip

Examples