Equation for sinusoidal wave with fixed wavelength and amplitude

34 Views Asked by At

I am a programmer. I am writing a program in which I need to show a graph plotted to the user when the user adjusts two sliders, which are the amplitude and wavelength of the wave, saya and w. I increment x each pixel by pixel, now I need a value for y in terms of x with a and w constant that would generate the required sinusoidal wave.

y = f(x); a, w constants

In short, I need an f(x) with constant a and w, that would create a sinusoidal wave with a as amplitude and w as wavelength. Can anyone help out?

1

There are 1 best solutions below

0
On BEST ANSWER

y = a * sin( x * 2 * pi / w ) ?