makeImage :: Size -> Scale -> Degree -> Acc (Scalar Phi) -> Acc Bitmap
makeImage size scale degree phi = arrPixels
  where
    -- Compute [0..1] values for the wave density at each point.
    arrVals     :: Acc (Array DIM2 Float)
    arrVals     = A.generate
                      (A.constant $ Z :. size :. size)
                      (quasicrystal size scale degree phi)

    -- Convert the [0..1] values of wave density to an RGBA flat image
    arrPixels   :: Acc Bitmap
    arrPixels   = A.map rampColour arrVals


-- | Colour ramp from red to white, convert into RGBA
makeImage :: Size -> Scale -> Degree -> Acc (Scalar Phi) -> Acc Bitmap
makeImage size scale degree phi = arrPixels
  where
    -- Compute [0..1] values for the wave density at each point.
    arrVals     :: Acc (Array DIM2 Float)
    arrVals     = A.generate
                      (A.constant $ Z :. size :. size)
                      (quasicrystal size scale degree phi)

    -- Convert the [0..1] values of wave density to an RGBA flat image
    arrPixels   :: Acc Bitmap
    arrPixels   = A.map rampColour arrVals


-- | Colour ramp from red to white, convert into RGBA
makeImage size scale degree phi = arrPixels
  where
    -- Compute [0..1] values for the wave density at each point.
    arrVals     :: Acc (Array DIM2 Float)
    arrVals     = A.generate
                      (A.constant $ Z :. size :. size)
                      (quasicrystal size scale degree phi)

    -- Convert the [0..1] values of wave density to an RGBA flat image
    arrPixels   :: Acc Bitmap
    arrPixels   = A.map rampColour arrVals


-- | Colour ramp from red to white, convert into RGBA