# I need help with waves

This topic is 3713 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I know that I can generate waves using waves equation. Using: y = A * sinf((1/wavelenght)*angle + offset) This equation generates waves all along lets say x, and goes up and dawn in y. But I would like to generate single wave instead of many waves. Here is an exsample how it would look like: -------------------o ----------------o-----o --> --------------o---------o oooooooooooooo-----------oooooo ooo is the wave. How can I do that? Maybe I could modify wave equation or use something else?

##### Share on other sites
Hmm that looks like a gaussian curve. You can do it like a gaussian curve with mean value which corresponds to the maximum of that wave.

http://en.wikipedia.org/wiki/Gaussian_curve

Also if you want the limits of your wave to be lets say a and b, you can write a condition which will multiply your function with 0 in all places except between a and b.

Depends on where do you want to use it.

##### Share on other sites
The Gaussian courve looks a little cumbersome, I would like something simpler.
Good idea to multiply the wave outside [a,b] with 0, i could try that.

##### Share on other sites
I might be out of my league now ( I'm a beginner ) but if you want one wave, that is a wave shape, so the graph of a 2nd degree function ( not sure how to say it in english )... so basically you would have something like
[Source] f(x) = a*(x^2) + b*(x) + c [/Source]
.

Then you have y = f(x)

- Correct me if I am wrong please -

##### Share on other sites
Well, thats another way.
I think Ill use wave equation and restrict it on [a,b].

##### Share on other sites
that is general a second degree approximation to a curve. That is still not zero outside the bounds a-b. It cuts the x axis at its two roots (say a-b) but then it tends to infinity or minus infinity as long as you let it go. So you still need to multiply that by zero for all other places except between a-b.

Gaussian curve is not that cumbersome I suppose and pretty controlable in fact

"The parameter a is the height of the curve's peak, b is the position of the center of the peak, and c controls the width of the "bell"."

##### Share on other sites
cool, I never new that abaut gaussian curve

1. 1
2. 2
Rutin
20
3. 3
4. 4
frob
15
5. 5

• 9
• 9
• 13
• 9
• 33
• ### Forum Statistics

• Total Topics
632592
• Total Posts
3007284

×