ruff-0.4: relatively useful fractal functions

Copyright(c) Claude Heiland-Allen 2010,2011,2015
LicenseBSD3
Maintainerclaude@mathr.co.uk
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Fractal.RUFF.Mandelbrot.Address

Description

External angles give rise to kneading sequences under the angle doubling map. Internal addresses encode kneading sequences in human-readable form, when extended to angled internal addresses they distinguish hyperbolic components in a concise and meaningful way.

The algorithms are mostly based on Dierk Schleicher's papers Internal Addresses Of The Mandelbrot Set And Galois Groups Of Polynomials (version of February 5, 2008) http://arxiv.org/abs/math/9411238v2 and Rational parameter rays of the Mandelbrot set (version of August 11, 1998) http://arxiv.org/abs/math/9711213v2.

Synopsis

Documentation

type Angle = Rational Source

Angle as a fraction of a turn, usually in [0, 1).

tune :: Angle -> (Angle, Angle) -> Angle Source

Tuning transformation for angles. Probably only valid for angle pairs representing hyperbolic components.

prettyAngle :: Angle -> String Source

Convert to human readable form.

prettyAngles :: [Angle] -> String Source

Convert to human readable form.

angles :: Angle -> [Angle] Source

All external angles landing at the same location as the given external angle.

type BinAngle = ([Bool], [Bool]) Source

Binary representation of a (pre-)periodic angle.

binary :: Angle -> BinAngle Source

Convert an angle to binary representation.

unbinary :: BinAngle -> Angle Source

Convert an angle from binary representation.

btune :: BinAngle -> (BinAngle, BinAngle) -> BinAngle Source

Tuning transformation for binary represented periodic angles. Probably only valid for angle pairs representing hyperbolic components.

prettyBinAngle :: BinAngle -> String Source

Convert to human readable form.

parseBinAngle :: String -> Maybe BinAngle Source

Convert from human readable form.

bperiod :: BinAngle -> Int Source

Period under angle doubling.

bpreperiod :: BinAngle -> Int Source

Preperiod under angle doubling.

bangles :: BinAngle -> [BinAngle] Source

All external angles landing at the same location as the given external angle (binary angle variant).

data Knead Source

Elements of kneading sequences.

Constructors

Zero 
One 
Star 

kneadChar :: Knead -> Char Source

Knead character representation.

data Kneading Source

Kneading sequences. Note that the Aperiodic case has an infinite list.

prettyKneading :: Kneading -> String Source

Kneading sequence as a string. The Aperiodic case is truncated arbitrarily.

kneading :: Angle -> Kneading Source

The kneading sequence for an external angle.

period :: Kneading -> Maybe Int Source

The period of a kneading sequence, or Nothing when it isn't periodic.

unwrap :: Kneading -> [Knead] Source

Unwrap a kneading sequence to an infinite list.

associated :: Kneading -> Maybe (Kneading, Kneading) Source

A star-periodic kneading sequence's upper and lower associated kneading sequences.

upper :: Kneading -> Maybe Kneading Source

The upper associated kneading sequence.

lower :: Kneading -> Maybe Kneading Source

The lower associated kneading sequence.

data InternalAddress Source

Internal addresses are a non-empty sequence of strictly increasing integers beginning with '1'.

Constructors

InternalAddress [Int] 

prettyInternalAddress :: InternalAddress -> String Source

Internal address as a string.

internalAddress :: Kneading -> Maybe InternalAddress Source

Construct an InternalAddress from a kneading sequence.

internalFromList :: [Int] -> Maybe InternalAddress Source

Construct a valid InternalAddress, checking the precondition.

internalToList :: InternalAddress -> [Int] Source

Extract the sequence of integers.

prettyAngledInternalAddress :: AngledInternalAddress -> String Source

Angled internal address as a string.

angledInternalAddress :: Angle -> Maybe AngledInternalAddress Source

The angled internal address corresponding to an external angle.

angledFromList :: [(Int, Maybe Angle)] -> Maybe AngledInternalAddress Source

Builds a valid AngledInternalAddress from a list, checking the precondition that only the last 'Maybe Angle' should be Nothing, and the Integer must be strictly increasing.

externalAngles :: AngledInternalAddress -> Maybe (Angle, Angle) Source

The pair of external angles whose rays land at the root of the hyperbolic component described by the angled internal address.

stripAngles :: AngledInternalAddress -> InternalAddress Source

Discard angle information from an internal address.

splitAddress :: AngledInternalAddress -> (AngledInternalAddress, [Angle]) Source

Split an angled internal address at the last island.

addressPeriod :: AngledInternalAddress -> Int Source

The period of an angled internal address.

parseAngle :: String -> Maybe Angle Source

Parse an angle.

parseAngles :: String -> Maybe [Angle] Source

Parse a list of angles.

parseKnead :: String -> Maybe Knead Source

Parse a kneading element.

parseKneading :: String -> Maybe Kneading Source

Parse a non-aperiodic kneading sequence.

parseInternalAddress :: String -> Maybe InternalAddress Source

Parse an internal address.

parseAngledInternalAddress :: String -> Maybe AngledInternalAddress Source

Parse an angled internal address, accepting some unambiguous abbreviations.