MetaPost has a system for solving linear equations for example with its whatever -notation (so for example whatever [z3, z3] ), but I don't know how to tell it the rectangular constraints.
After seeing some jaw-dropping examples done with MetaPost I have a feeling it is doable.