See also Anish Athalye 2019, "Experiments in Constraint-based Graphic Design" [1], which takes a similar approach to diagram creation. I'd also recommend looking at Keenan Crane's other research [2], in particular his book on Discrete Differential Geometry, which inspired some of the diagrams you see on the Penrose site.
[1]: https://www.anishathalye.com/2019/12/12/constraint-based-gra...
[2]: http://www.cs.cmu.edu/~kmcrane/