A 2d sketcher with constraints is kind of similar. For example the equation
A = B + C
Where A, B, C are the lengths of 3 parallel lines. Within the sketcher you can drag the length of any one of those lines and the other two will adjust to keep the constraints.
Yes! I'd really like to make something graphical in this same idea space next. See g9.js for example, or parametric CAD software like FredCAD which kinda does what you said.