Iam learning threejs. Thank you for creating such an awesome library.

This is more of a math doubt in threejs.

How do you generate a spline of reducing height of sine wave like the following image. Any tips or suggestions ?

Can you please explain in more detail what you mean by that? Unfortunately, your question is not yet clear enough.

Hi Mugen,

If you look at the image it looks like a sine wave that is slowly dying(like a snake crawling towards a point).

Imagine a wave top is 1 and bottom point is -1 and it passes through 0. This height slowly reduces towards 0 where the wave stops. I don’t know how to mathematically convert this into spline points That is my doubt.

Its basically a damped sin wave like the following image.

It seems you are looking for a damped sine wave. I’ve implemented the respective formula in the following fiddle:

https://jsfiddle.net/p293y7ue/5/

I’m just using `sin`

instead of `cos`

so the curve starts at the origin.

Thanks that’s exactly what i was looking for. Read your js code which was much better to understand than reading equations.