Skip to content

Commit

Permalink
Merge pull request #339 from GrantMoyer/patch-1
Browse files Browse the repository at this point in the history
Fix 3D perspective projection onto z = 1
  • Loading branch information
byorgey committed Apr 10, 2019
2 parents 9a1b0a3 + 6af7ec6 commit 9758eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Diagrams/ThreeD/Deform.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ parallelZ0 = Deformation (_z .~ 0)
-- | The perspective division onto the plane z=1 along lines going
-- through the origin.
perspectiveZ1 :: (R3 v, Functor v, Fractional n) => Deformation v v n
perspectiveZ1 = Deformation $ \p -> p ^/ (p ^. _x)
perspectiveZ1 = Deformation $ \p -> p ^/ (p ^. _z)

facingZ :: (R3 v, Functor v, Fractional n) => Deformation v v n
facingZ = Deformation $
Expand Down

0 comments on commit 9758eaa

Please sign in to comment.