Primitive 2d geometry library