rampColour :: Exp Float -> Exp RGBA
rampColour v = ra + g + b
  where
    u           = 0 `A.max` v `A.min` 1
    ra          = 0xFF0000FF
    g           = A.truncate ((0.4 + (u * 0.6)) * 0xFF) * 0x10000
    b           = A.truncate (u                 * 0xFF) * 0x100


-- Rendering ------------------------------------------------------------------
-- | Compute a single frame of the animation as a Gloss picture.
--frame :: Size -> Scale -> Zoom -> Degree -> Float -> G.Picture
rampColour :: Exp Float -> Exp RGBA
rampColour v = ra + g + b
  where
    u           = 0 `A.max` v `A.min` 1
    ra          = 0xFF0000FF
    g           = A.truncate ((0.4 + (u * 0.6)) * 0xFF) * 0x10000
    b           = A.truncate (u                 * 0xFF) * 0x100


-- Rendering ------------------------------------------------------------------
-- | Compute a single frame of the animation as a Gloss picture.
--frame :: Size -> Scale -> Zoom -> Degree -> Float -> G.Picture
rampColour v = ra + g + b
  where
    u           = 0 `A.max` v `A.min` 1
    ra          = 0xFF0000FF
    g           = A.truncate ((0.4 + (u * 0.6)) * 0xFF) * 0x10000
    b           = A.truncate (u                 * 0xFF) * 0x100


-- Rendering ------------------------------------------------------------------
-- | Compute a single frame of the animation as a Gloss picture.
--frame :: Size -> Scale -> Zoom -> Degree -> Float -> G.Picture