The only simple geometric constraint solver on the internet
github.com·2d·
Discuss: r/programming
λFunctional Programming
Preview
Report Post

Geometric Constraint Solver

The only toy geometric constraint solver on the internet. Simplified for easy understanding and using only the Go standard library, so there is no magic, just about 2000 lines of code. You can step through it and understand how CAD programs work.

It is inspired by SolveSpace, but built independently from the ground up. Geometric constraints are represented as a system of nonlinear equations and solved by multidimensional Newton’s method. I built a simple symbolic algebra system that calculates derivatives by traversing the syntax tree. To keep the codebase simple, this implementation assumes that the system will conver…

Similar Posts

Loading similar posts...