-
Notifications
You must be signed in to change notification settings - Fork 63
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
section producing incorrect results #322
Comments
One thing to note is that as you change the number diagrams-lib/src/Diagrams/Parametric.hs Line 134 in 1f863bf
Transforming the parameter |
The comments in |
We have the problem that the Parametric instance of Tails depends on the number of segements, but a linear reparameterization for Sectionable can not depend on the number of segments without information about the original parameterization. One possible solution is drop the Sectionable instance for Trails and introduce a new Section type that caries that info with it. |
Proposal: fix the current instances so that they adhere to the property that for a <= b <= c, section t a c = section t a b <> section t b c and note in the documentation that they do not linearly reparameterize the section. Add two new types to wrap multisegment objects, I'll give them the placeholder names ProperSection and ProperParam. ProperSection still is parametric by segment, but has a linear reparameterization, and ProperParam is parametric by arclength. |
The section instance of SegTree seems to be correct, but the instances for Located, Trail, and Trail' Line all used the default definition which uses splitAtParam instead of SegTree's implementation of section. The default definition of splitAtParam is only correct for types which consist of a single segment or are parametrized by arclength (rather than with each segment having equal weight).
fix for: section producing incorrect results #322
Closed by #328. |
Both red sections have the same start parameters and should therefore start in the same place.
The text was updated successfully, but these errors were encountered: