Suppose that we have $n$ points in 3D.
I want to find a plane $ax + by + cz + d$ such that sum of all the orthogonal distances to the plane is minimum.
I read this article. However, I need an algorithmic solution.
So far, this answer from SO was the simplest one. However, this solution projects the points onto $z=0$ plane all the time.
Could you help me to write the algorithm? I'll code it in Java.