Equations for shapes on grid paper