-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong envelope for cubic segment #88
Comments
Progress: I've whittled the code down to the following, which still exhibits a wrong envelope: {-# LANGUAGE NoMonomorphismRestriction #-}
import qualified Data.FingerTree as FT
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Coordinates
import Diagrams.Prelude
t :: Trail R2
t = Trail (Line (SegTree {getSegTree = FT.fromList [Cubic (0 & 1.480952380952381) ((-1) & 2.961904761904762) (OffsetClosed ((-1) & 0))]}))
main = defaultMain (strokeT t # pad 1.1) |
More progress: this segment has a bogus envelope: seg :: Segment Closed R2
seg = Cubic (0 & 1.480952380952381) ((-1) & 2.961904761904762) (OffsetClosed ((-1) & 0))
|
This results in a call to |
Previously, it simply gave completely bogus results when b=0. Fixes #88.
This code:
produces this (wrong) image:
Note how the top of the trail is cut off. Presumably the envelope is being computed incorrectly. One thing to work on short of fixing the bug is to produce a simpler trail which still exhibits the bug.
The text was updated successfully, but these errors were encountered: