Settings

Theme

Constrain – Interactive figures using declarative constraint solving

github.com

48 points by rachitnigam 3 years ago · 11 comments

Reader

flupe 3 years ago

I love the idea, although it doesn't seem to perform very smoothly, even on simple examples. A related project is Penrose [^1], except the latter isn't interactive.

[^1]: https://penrose.cs.cmu.edu/

082349872349872 3 years ago

I was always impressed with how well Solidworks constraints could produce models of "mechanisms" — but maybe that's an easier/more easily constrained domain than arbitrary figures?

(Or software UIs: Amulet and Garnet bring up memories — but those were a different Myers)

zokier 3 years ago

The triangle demo doesn't seem completely stable, there are occasional flickering glitches, occasionally it also stays in a "wrong" state like this: https://ibb.co/4gD5NcB

  • mkl 3 years ago

    GeoGebra's constraint solver has similar issues with this type of figure. I get the impression they get stuck in a local optimum or something.

  • AndrewCMyers 3 years ago

    This is fixed now, by choosing better constraints.

ardoise 3 years ago

I couldn't find any information about its license.

crapaud23 3 years ago

Solvespace seems a lot more compelling

https://files.whitequark.org/SolveSpace/solvespace.html (web demo)

xiphias2 3 years ago

Looks great, I wonder if it's powerful enough to build a UI toolkit

xigoi 3 years ago

Looks nice! Why does it use canvas and not SVG?

  • FractalHQ 3 years ago

    Canvas is generally more performant so I imagine it could be a better fit depending on how complex things get. Very rarely have I encountered the performance limitations of svg, though it has happened.

  • AndrewCMyers 3 years ago

    There has been some work on an SVG back end. It also supports rendering to PDF and PostScript.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection