7 ms·
Look up "cassowary" layout algorithm and all of its implementations.
by speps 2y ago
Look up "cassowary" layout algorithm and all of its implementations.
- airstrike 2y agoThank you for this! If you or any one else has any other literature to recommend, I'm all ears!
- PaulDavisThe1st 2y agothe algorithm is cool but it does not scale well. it's awesome for small things (like mobile-style app GUIs), but not usable for full-scale desktop apps (e.g. a DAW).
- kragen 2y agowhen you say 'does not scale well', are you talking about the algorithm's performance or about some kind of maintainability concern?
- jacobp100 2y agoMaintainability. Think about having a list. You add constraints between all the rows etc. then remove a row in the middle. Now you have to update all the constraints
- kragen 2y agoi think that in cassowary that involves removing roughly one constraint for each thing on the row, then adding a new constraint for the newly adjacent rows? then because it uses an incremental solver it can reuse the part of the previous solution for the rows above the deleted row, just recomputing the positions of the rows below but that's a question of performance. 'maintainability' would be removing the code that adds the row to the list, which is trivial with cassowary
- danielvaughn 2y agoI spent some time digging into Cassowary around 2019, so I can't recall much, but here's a link to the seminal paper: https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf https://constraints.cs.washington.edu/solvers/cassowary-toch...