Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Diagrams/Dev/Constraints
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== What sorts of constraints are easy to support? == * linear? - supported in Z3, I implemented a few (alignAxis, spacingX/Y) * linear inequalities? - they should be supported as well, but I haven't implemented anything that uses them. * square / sqrt / distance? - also supported (less well), again I haven't done anything. * sin / cos / angle? -- not supported in solvers ATM (although constant computations like sin pi work, thanks to sbv and my patches to it) * constraints on Transformations? - I think you can write transformations with variables and then constrain the variables. So it should work already (Although I haven't actually tried it...) * constraints on Measured Attributes? - Measured Attributes currently have a Data instance requirement. But CDouble can't do that, since it's a wrapper around IO, and all the functions in Data are pure. But CDouble's are actually more powerful than Measure (min/max/etc. are all first-class). So I think Measure and the Data constraint should just disappear (but that requires more diagrams-core changes) * constraints on offsets / vectors in Paths? - I don't actually render Paths yet, due to the aforementioned Attribute problem. * Which of the above are probably hard? ** Doing transcendental stuff like sin/cos constraints is hard, because (a) the mathematical solving is tricky and (b) you'd have to standardize it in SMTLIB somehow. But once it's implemented in your SMT solver of choice (Z3, YICES, etc.) then it's relatively easy to add to sbv, and then diagrams-constraints should just work (maybe after a few tweaks to the CDouble instances). Everything else is just coding. The diagrams-core rewrite is the hardest, and adding new primitives is the easiest.
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width