ruff-0.4.0.1: relatively useful fractal functions

Copyright (c) Claude Heiland-Allen 201020112015 BSD3 claude@mathr.co.uk unstable portable None Haskell98

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.

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.

Convert an angle to binary representation.

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.

Convert to human readable form.

Convert from human readable form.

Period under angle doubling.

Preperiod under angle doubling.

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

Instances

 Source # Methods Source # Methodssucc :: Knead -> Knead #pred :: Knead -> Knead #toEnum :: Int -> Knead #enumFrom :: Knead -> [Knead] #enumFromThen :: Knead -> Knead -> [Knead] #enumFromTo :: Knead -> Knead -> [Knead] #enumFromThenTo :: Knead -> Knead -> Knead -> [Knead] # Source # Methods(==) :: Knead -> Knead -> Bool #(/=) :: Knead -> Knead -> Bool # Source # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Knead -> c Knead #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Knead #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Knead) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Knead) #gmapT :: (forall b. Data b => b -> b) -> Knead -> Knead #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Knead -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Knead -> r #gmapQ :: (forall d. Data d => d -> u) -> Knead -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Knead -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Knead -> m Knead #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Knead -> m Knead #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Knead -> m Knead # Source # Methods(<) :: Knead -> Knead -> Bool #(<=) :: Knead -> Knead -> Bool #(>) :: Knead -> Knead -> Bool #(>=) :: Knead -> Knead -> Bool #max :: Knead -> Knead -> Knead #min :: Knead -> Knead -> Knead # Source # Methods Source # MethodsshowsPrec :: Int -> Knead -> ShowS #show :: Knead -> String #showList :: [Knead] -> ShowS #

Knead character representation.

data Kneading Source #

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

Constructors

 Aperiodic [Knead] PrePeriodic [Knead] [Knead] StarPeriodic [Knead] Periodic [Knead]

Instances

 Source # Methods Source # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Kneading -> c Kneading #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Kneading #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Kneading) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Kneading) #gmapT :: (forall b. Data b => b -> b) -> Kneading -> Kneading #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Kneading -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Kneading -> r #gmapQ :: (forall d. Data d => d -> u) -> Kneading -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Kneading -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Kneading -> m Kneading #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Kneading -> m Kneading #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Kneading -> m Kneading # Source # Methods(<) :: Kneading -> Kneading -> Bool #(>) :: Kneading -> Kneading -> Bool # Source # Methods Source # MethodsshowList :: [Kneading] -> ShowS #

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

The kneading sequence for an external angle.

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.

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

The upper associated kneading sequence.

The lower associated kneading sequence.

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

Constructors

 InternalAddress [Int]

Instances

 Source # Methods Source # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InternalAddress -> c InternalAddress #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InternalAddress #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c InternalAddress) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InternalAddress) #gmapT :: (forall b. Data b => b -> b) -> InternalAddress -> InternalAddress #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InternalAddress -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InternalAddress -> r #gmapQ :: (forall d. Data d => d -> u) -> InternalAddress -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> InternalAddress -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> InternalAddress -> m InternalAddress #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InternalAddress -> m InternalAddress #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InternalAddress -> m InternalAddress # Source # Methods Source # Methods Source # MethodsshowList :: [InternalAddress] -> ShowS #

Internal address as a string.

Construct an InternalAddress from a kneading sequence.

Construct a valid InternalAddress, checking the precondition.

Extract the sequence of integers.

Angled internal addresses have angles between each integer in an internal address.

Constructors

 Unangled Int Angled Int Angle AngledInternalAddress

Instances

 Source # Methods Source # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AngledInternalAddress -> c AngledInternalAddress #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AngledInternalAddress #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AngledInternalAddress) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AngledInternalAddress) #gmapT :: (forall b. Data b => b -> b) -> AngledInternalAddress -> AngledInternalAddress #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AngledInternalAddress -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AngledInternalAddress -> r #gmapQ :: (forall d. Data d => d -> u) -> AngledInternalAddress -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> AngledInternalAddress -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> AngledInternalAddress -> m AngledInternalAddress #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AngledInternalAddress -> m AngledInternalAddress #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AngledInternalAddress -> m AngledInternalAddress # Source # Source # Methods Source # Methods

Angled internal address as a string.

The angled internal address corresponding to an external angle.

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.

Convert an AngledInternalAddress to a list.

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

Discard angle information from an internal address.

Split an angled internal address at the last island.

The inverse of splitAddress.

The period of an angled internal address.

Parse an angle.

Parse a list of angles.

Parse a kneading element.

Parse a non-aperiodic kneading sequence.

Parse an internal address.

Parse an angled internal address, accepting some unambiguous abbreviations.