Solving for unknown dimensions of shapes