-
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
Projective/perspective transforms for points and paths #108
Comments
Am I understanding the problem correctly? Do you have more specific ideas about how you want to do this?
I think we can accomplish (2) with two type classes, one for "geometry which can be projected", and one for "transformations which can be combined with a projection". If we only have two types, we could replace the latter with a monomorphic function. If we want to approximate Beziers under perspective projection, I think we can do (3) with an extra field in the Projection type, rather than a new type. That keeps the API a bit cleaner. I haven't wrapped my head around Data.LinearMap yet, but it feels wrong to use it for maps that aren't linear. Do we want to keep the memo-trie? I also want to think more about diagrams/diagrams-core#33. The above doesn't address that problem, but having a type-correct way to express Sorry this got so long. |
(1) sounds right. I don't have much of an opinion about (2) right now. Probably the most important thing to do at this point is to think up examples of cases where one might wish to use a more general projection, and then think about what a nice API for those examples would be. That can help drive our opinions about the actual design, e.g. whether distinguishing orthogonal projections is worth it. Re: |
For diagrams in general, we can only support affine transformations, because there's no way to apply projective transformations to envelopes (though I think traces would be OK). However, there's no reason we can't apply projective transformations to simpler things.
Another important part of this ticket is figuring out a nice way to represent projective transformations that fits well with our existing representation of affine transformations, and a nice API for constructing projective transformations.
The text was updated successfully, but these errors were encountered: