Finding an equation from given points