module Diagrams.TwoD.Deform where
import Control.Lens
import Diagrams.Deform
import Diagrams.Coordinates
import Diagrams.TwoD.Types
parallelX0 :: Deformation R2
parallelX0 = Deformation (& _x .~ 0)
perspectiveX1 :: Deformation R2
perspectiveX1 = Deformation (\p -> p & _y //~ (p^._x) & _x .~ 1)
parallelY0 :: Deformation R2
parallelY0 = Deformation (& _y .~ 0)
perspectiveY1 :: Deformation R2
perspectiveY1 = Deformation (\p -> p & _x //~ (p^._y) & _y .~ 1)
facingX :: Deformation R2
facingX = Deformation (\v -> v & _y //~ (v^._x))
facingY :: Deformation R2
facingY = Deformation (\v -> v & _x //~ (v^._y))