Skip to content
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

incorrect bounds for Bezier segments #11

Closed
fryguybob opened this issue Aug 4, 2012 · 2 comments
Closed

incorrect bounds for Bezier segments #11

fryguybob opened this issue Aug 4, 2012 · 2 comments
Assignees

Comments

@fryguybob
Copy link
Member

(Imported from http://code.google.com/p/diagrams/issues/detail?id=23. Original issue from byor...@gmail.com on April 18, 2011, 11:10:59 PM UTC)

See attached file which exhibits the problem; the square ought to be next to the curvy triangular path, but intersects it instead.

Not sure whether it's a bug in lib or core.

@ghost ghost assigned byorgey Aug 4, 2012
@fryguybob
Copy link
Member Author

(Imported. Original comment by byor...@gmail.com on April 19, 2011, 02:12:32 PM UTC)

The problem isn't really with trails or composition; the bounding function for Bezier segments itself is wrong.

@fryguybob
Copy link
Member Author

(Imported. Original comment by byor...@gmail.com on April 19, 2011, 02:26:56 PM UTC)

Doh! The bug was really dumb: I began by writing down the wrong formula for Bezier segments in a comment (forgot the factors of 3 in the (1-t)^2 t and (1-t) t^2 terms), then proceeded to "correctly" work out the derivative when projecting against a given vector, etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants