kiwisolver

A fast implementation of the Cassowary constraint solver

Here are some articles that you may find helpful