
Originally Posted by
doctornash
Thanks for the function. Is this saying that y=1 if x=1?
Because, if 0<x<2 (as you have) and 0<y<10 (say) then the points could be:
first point: [0,0]
second point specified by user (which must be peak of wave): [0.2, 3]
third point: [2,0]
or:
first point: [0,0]
second point specified by user (which must be peak of wave): [1.6, 8]
third point: [2,0]
etc
So to get your first one you would use the function
=\begin{cases} 3f\left(\frac{x}{0.2},s \right) , \text{ if } 0 \le x \le 0.2 \\ 3f\left( -\frac{x-2}{2-.2},s\right), \text{ if } .2 \le x \le 2\end{cases})
I can't upload any files except .pdf so I changed this animated .gif file to a pdf so I could upload it. If you want to see it you will need to change it back to a .gifwave.pdf
This is what that would look like as s ranges between 0 and 100 and going though the points you gave.
Here is the maple code used to generate the .gif file
Code:
with(plots):
z := piecewise(s <> 50, (exp(tan((1/100)*Pi*s-(1/2)*Pi)*x)-1)/(exp(tan((1/100)*Pi*s-(1/2)*Pi))-1), x);
j := animate(plot, [((Heaviside(x)-Heaviside(x-.2))*3)*(eval(z, x = x/(.2))), x = 0 .. 2], s = 1 .. 99);
k := animate(plot, [((Heaviside(x-.2)-Heaviside(x-2))*3)*(eval(z, x = -(x-2)/(2-.2))), x = 0 .. 2], s = 1 .. 99);
display(j,k);
Note that there is an artifact from the use of the Heaviside step function in the plot.