# How can I create a sine wave on a bezier curve?

I've been playing with Geometry Nodes in an attempt to re-create a rippled wave effect which will follow a bezier curve. I want to be able to control the amplitude of the wave and the frequency.

I've attached a blend file which shows what I've been able to achieve. Included in the file is an example of what I want to achieve (also here as an image)

The existing object was created by converting a bezier to a mesh, selecting a number of vertices and using proportional editing to move those points and bring the rest along proportionally.

By doing this in Geometry Nodes I will be able to re-use the technique.

I've spent the morning looking for solutions, none of which provide the level of control and conformance to what I'm looking for, hope someone can help.

This task can be solved with the following node setup:

As parameters for the wave I have prepared the values for "Wave Length", "Wave Amplitude" and "Wave Resolution", with which the result is influenced.

First, your curve must be in sufficient resolution. In this example I have chosen a resolution of $$512$$.

Then the curve is divided into points according to the resolution and wavelength in relation to the total length.

These points are then simply shifted along the normal of each point.

To calculate this shift, I first use the Math-Node Wrap to make the values repetitive, then the Node Map Range to convert it to a value between $$0$$ and $$2\pi$$, and only then the Math-Node Sine, which creates a constant sine value along the curve.

The cool thing about this solution is that this also works in three-dimensional space, and you can also use Curve Tilt.

(Blender 3.2+)

• That looks like a winning solution. I just spent a bit of time looking into the curve tilt node but couldn't see a way of controlling that. The existing model seems to place the curve on a different axis so I'm wondering how I would go about tilting it? Mar 22, 2023 at 17:48
• @argyrg Forgive me, I do not understand exactly what you mean. Which model? What exactly do you do? Mar 22, 2023 at 18:26
• Sorry for any confusion. I downloaded the file which you attached and I played around with it. I'll take a longer look at it tomorrow, I had to run out... Mar 22, 2023 at 18:56
• Thank you for your great help with this. Yours is an elegant solution to the question. I think I now have to ask a similar question because I had assumed that the resultant bezier curve would be composed of control points (as my uploaded Geo nodes file had) which I could then loft between a pair of similar curves along the profile of another pair of curves (effectively a rippled plane with curved sides) similar to the upload on post 18 in this link but with the sine wave surface (forum.freecad.org/…) Mar 23, 2023 at 9:22