
A Short Intro to Constraints - nkoren
https://zalo.github.io/blog/constraints/
======
AYBABTME
I'm curious if someone would know where to point me?

There's many problems I would like to solve using some sort of model
definition with constraints given, and variable(s) to optimize. Either to aid
in guiding the design of a system, or using generative design.

Example:

    
    
        - Electrical power, voltage and amperage constraints along with physical size constraints, in a circuit model.
        - Data size and throughput and concurrency constraints in a distributed system models.
    

I have a feeling there must be well known techniques and/or tools to do these
kind of general purpose constraint modelling, but I can't put my finger on it.
The closest that comes to mind is using Prolog, but I've only used it with
boolean type of constraints.

~~~
dunham
Have you looked at Propagator Networks? It's a fascinating computation model
that I believe was originally proposed by Gerald Sussman. The original use
case/example was electrical circuits.

~~~
kkylin
Seems like AYBABTME is talking about constrained optimization, whereas you are
speaking of "constraints" in a different context, i.e., this paper
([https://dspace.mit.edu/handle/1721.1/6255](https://dspace.mit.edu/handle/1721.1/6255))
by Stallman and Sussman, further developed in Guy Steele's PhD dissertation,
eventually leading to the propagator model by Radul and Sussman
([https://groups.csail.mit.edu/mac/users/gjs/propagators/](https://groups.csail.mit.edu/mac/users/gjs/propagators/)).
Both kinds of "constraints" are very interesting, but one is a class of
numerical algorithms and another a general programming framework.

~~~
dunham
Yup, it looks like I glossed over the optimization part and latched onto the
circuits part.

------
kkaranth
In the distance constraint, won’t the point always land _on_ the circle? The
visualisation shows that it can be inside the circle too.

~~~
jhncls
So probably the author put a "distance less than or equal to" constraint.
Having a "distance equal to" constraint would have the point always on the
circle. And, magically, "distance larger than" would have the point always
outside the circle.

------
gtycomb
Any idea how the graphics gets rendered on the brower here? Is there a
javascript library for this?

I see further interesting graphics from the author here:
[https://github.com/zalo/MathUtilities](https://github.com/zalo/MathUtilities)

~~~
zalo
The first post is done in Paper.js, while the rest of them are done in
Three.js. The scripts in MathUtilities are for the Unity3D game engine.

All of them are excellent graphics frameworks (though with strengths in 2D,
3D, and standalone content respectively).

------
ASalazarMX
Truly didactic while being entertaining. Playing lets the concept sink in
better.

------
zawerf
This is a similar project that showed up on hn a while ago:

[http://omrelli.ug/g9/gallery/](http://omrelli.ug/g9/gallery/)

------
agrinman
I could see this as a great as visualization tool for a high school geometry
class, i.e. explaining solutions for systems of inequalities.

------
tandav
there are not so many videos about this topic

this GDC talk is kinda hard to understand (at least for me)
[https://www.youtube.com/watch?v=SHinxAhv1ZE](https://www.youtube.com/watch?v=SHinxAhv1ZE)

