Graphical solution of linear and quadratic systems of equations