How many points to span a goniometric wave and how to construct the goniometric function I have two questions concerning the spanning of a simple trigonometric function:


*

*What is the minimum number of points to define/span a "simple" trigonometric wave in two dimensions? 

*Is it possible to give a generic trigonometric function give a set of points - something like a function in the form of: $f(x) = A \cdot \sin (\varphi + \frac{ P }{2\cdot \pi }\cdot x)$, with $A$, $\varphi$ and $P$ expressed in a set of $(x_{i},y_{i})$'s?


Notes:


*

*I'm looking to span/define a "simple" trigonometric wave, so the argument of the trigonometric function can be a linear transformation of $x$ (but it's not more complex than that).

*my question is not about fitting a curve through some points, but to define a function using point. Like a line is defined using two points, say $(x_{1}, y_{1})$ and $(x_{2}, y_{2})$ and that the equation of that line is: $f(x)=-\frac{\left( x1-x\right) \,y2+\left( x-x2\right) \,y1}{x2-x1}$

*I have a "hunch" that the number of required points is 3, but I can´t explain it.

*With trigonometric functions, of course there are a multiple of equations fitting a set of points, because of the repetitive character of the function. The solution has probably some "modulo".

 A: Addendum below, answering a slightly simpler question (which turns out to be what the OP was wondering about)
If I follow correctly, you're talking about functions that can be written 
$$
f(x, y) = k\sin (Ax + By + C).
$$
You might says that you want to include cosines, but by adding $\pi/2$ to $C$, you cover that case. Perhaps you also want a constant term, so 
$$
f(x, y) = k\sin (Ax + By + C) + D
$$
You're supposing that you know the values of $f$ at various $(x, y)$ points, and hope to compute the values of $k, A, B, C,$ and perhaps $D$. 


*

*It can't be done. For instance, if you know that $f(0, 0) = 0, f(\pi, 0) = 0, f(2\pi, 0) = 0, ...$ (i.e., you know the value at an infinity of points!), you can perhaps decide that $D = A = C = 0$, but it's possible for $B = 0$ or $B = 1$: in other words, despite infinitely many constraints, the solution is still indeterminate. The problem here appears to be that all the known points lie on a single line. 

*If you have the values at three points that don't all lie on a line, you might imagine that you could determine the answer. You still can't. Let's see that with an example: Suppose you know that $f(0, 0) = 0, f(\pi, 0) = 0, f(1, 3) = 6$. Well, if you could determine the correct values for $A, B, C, D, k$, then I could increase $A$ by $2$ and have another solution. 

*Even if you suppose $D = 0$, the arguments above work just fine. 

*In the $D = 0$ case, what if you knew the value at four points? Then, in general, you'd expect a "unique" solution, except that adding $2\pi$ to $C$ would provide an alternative solution. Whether you count that as a "different" solution is a matter of taste: the functions that result from these two values of $C$ are identical, but the quadruples $(A, B, C, k)$ and $(A, B, C+2\pi, k)$ used to specify them are obviously different. 
In case 4, how could you find the solution, given the values $v_i = f(P_i)$ for four points $P_i = (x_i, y_i)$ of the plane? That's tough. The four points need to be sufficiently "un-coordinated" for the solution to be found. For an instance of too-coordinated data, if the four points all lie on some lattice, i.e., if 
$$
P_4 = P_0 + a(P_1 - P_0) + b(P_2 - P_0)
$$
for some integers $a$ and $b$, then the problem for which all the $v_i$ are zero can be solved by the all-zero function, but you can also let 
$$
w = (P_2 - P_1)^\perp
$$
be the vector perpendicular to $P_2 - P_1$. Setting 
$$
A = \pi w_x \\
B  = \pi w_y \\
C = -Ax_0 + B y_0
$$ 
and letting $k$ take on any real-number value gives a different solution consistent with the data. 
You could probably work out a method for deriving $A, B, C, k$ from $v_0, v_1, v_2, v_3$, with various "if this involves a divide-by-zero, then there's no unique solution" clauses along the way that would address problems like the one I just described. But I'm hoping that instead you'll see that this probably isn't a fruitful course to pursue: the conditions under which a unique (up to adjusting the "phase", $C$, by a multiple of $2 \pi$) solution exists aren't likely to be very pretty. 
In fact, my best shot-in-the-dark guess is that the situation described above is pretty much the bad case: if your four points are nice, in the sense that no three are collinear, and "rationally independent," in the sense that the coordinates of $P_3 - P_0$ in the basis $P_1 - P_0$, $P_2 - P_0$ are both irrational (and perhaps incommensurable with each other), then there's a more or less unique solution. Note, however, that testing this condition using actual data and a computer is completely hopeless in general, because of the computer's finite precision. That's why I suggest that this isn't a great question to pursue. 
ADDENDUM:
The OP was actually wondering about functions of a single real variable $x$, i.e., 
$$
f(x) = A \sin (Bx + C) + D
$$
and wondering whether if you knew, for several $x$-values, the corresponding $y = f(x)$ values, could you determine $A, B, C,$ and $D$. And if so, how many $(x,y)$ values do you need? 
Part of the answer is the same: if you have a method to find $C$, I can add $2\pi$ to your value and get an equally good value, so there's no way to actually find $C$, because there's no single answer for $C$. On the other hand, your $C$ and mine will produce the same function, so maybe that's moot. 
So let's look at the simpler question: can you determine $A, B, D$,  and a value of $C$ with $0 \le C < 2\pi$? 
Just as before, you'd expect to need four $xy$ pairs to determine the four unknowns, and indeed, if your four $x$-values are "generic", then you can probably find the constants. If, however, they're equally spaced, for instance, and the $y$-values are all the same, then there an infinitely many solutions. For instance, if we know the values at $x = 0, 2 \pi, 4\pi, 6\pi$, and the values are all $0$, then one solution is 
$$
A = B = C = D = 0.
$$
But another is 
$$
A = B = 1, C = \frac{\pi}{2}, D = -1.
$$
Fixing $A$ and $B$, for each $C$, you can find a corresponding $D$ (namely $D = -\sin(C)$). 
If the points are not evenly spaced, there's still a potential for problems: if the spacing between any two $x$-values happens to be an integer multiple of the smallest spacing, then the same kind of trick will work: you pick $B = \frac{1}{s}$, where $s$ is the smallest gap between known $x$-values, and then you can do the same sort of fiddling as in the previous example. 
That means that any hope of determining the answer has to depend on whether those $x$-gaps are rational multiples of one another, just as before...which is likely to be impossible to test numerically.  
