The 3SUM problem formulation: in a given set of n real numbers find 3 elements that sum to specified value S.
I am trying to understand mathematical solution of the 3SUM problem based on a polynomial of 3 degree. I found some information about 3SUM problem as a special case of geometrical problems. It says:
There are m points on a plane and it is required to check if some 3 points are located on on the same straight line. So, there is a straight line function: $y = ax + b$ and a curve: $ y = f(x) = x^3 - Sx^2 $
Intersection of the above two equations is roots of the following equation: $x^3 - Sx^2 - ax - b = 0 $
So, set of points $(a_1 , f(a_1)), ..., (a_m , f(a_m))$ contains 3 points $(a_x , f(a_x)), (a_y , f(a_y)), (a_z , f(a_z))$ on the samle straight line if and only if $a_x + a_y + a_z = S$
I can't fully percieve the relation between 3SUM problem and the above geometrical problem. AFAIK, in the equation: $x^3 - Sx^2 - ax - b = 0 $ variable $a$ represents set of points $(a_1 , f(a_1)), ..., (a_m , f(a_m))$ and probably all real numbers in which I search for some 3 numbers that sum to S. So 3 numbers $a_x + a_y + a_z$ sum to S if all of them are on the same line. But what x, y, z represent here? What is $a_z$ or $a_y$? And what is coefficient before $x^3$ equal to? How do I define b?
Can someone clarify relation between 3SUM problem and the above geometric problem?