Processing math: 62%

# Primary Bulb

The child bulb of the period 1 cardioid at internal angle pq has external angles:

(.¯b0b1bq301,.¯b0b1bq310)

where

b0b1=map((1pq,1))iterate(+pq)$pq

# 1 Haskell Code

import Data.Fixed (mod')
import Data.List (genericTake)
import Data.Ratio (denominator)

type InternalAngle = Rational
type ExternalAngle = ([Bool], [Bool])

primaryBulb
  :: InternalAngle
  -> (ExternalAngle, ExternalAngle)
primaryBulb pq
  = ( ([], bs ++ [False, True])
    , ([], bs ++ [True, False])
    )
  where
    q = denominator pq
    bs
      = genericTake (q - 2)
      . map (\x -> 1 - pq < x && x < 1)
      . iterate (\x -> (x + pq) `mod'` 1)
      $ pq

# 2 Examples

Consider the bulb at internal angle pq=25:

r0=25(125,1)

Therefore the external angles for the \frac{2}{5} bulb are:

\left( .\overline{01001}, .\overline{01010} \right)