point :: Size -> Scale -> Exp DIM2 -> Exp R2
point size scale ix = A.lift (adj x, adj y)
  where
    (Z:.x:.y)   = A.unlift ix
    denom       = A.constant (fromIntegral size - 1)
    adj n       = A.constant scale * ((2 * A.fromIntegral n / denom) - 1)


-- Computation ----------------------------------------------------------------
-- | Compute a single frame
point :: Size -> Scale -> Exp DIM2 -> Exp R2
point size scale ix = A.lift (adj x, adj y)
  where
    (Z:.x:.y)   = A.unlift ix
    denom       = A.constant (fromIntegral size - 1)
    adj n       = A.constant scale * ((2 * A.fromIntegral n / denom) - 1)


-- Computation ----------------------------------------------------------------
-- | Compute a single frame
point size scale ix = A.lift (adj x, adj y)
  where
    (Z:.x:.y)   = A.unlift ix
    denom       = A.constant (fromIntegral size - 1)
    adj n       = A.constant scale * ((2 * A.fromIntegral n / denom) - 1)


-- Computation ----------------------------------------------------------------
-- | Compute a single frame