affine, works but motion affects least sqaure sol
debugged meshgrid error