Geometry Nodes Sine Curve , points

Hi guys,

I am starting out with GN. Coming from Rhino/Grasshopper.
Simple task how to move points based on Sine function?

Thank you

Here’s one way to do it:


You don’t need to use the transfer attribute node, since you are only applying the operation to a single geometry, and you don’t need to transfer any data to another one.

Hope that helps!

2 Likes

Thank you.
Why this does not work? And how should I think about position node?

That doesn’t work because you have the curve line is being offset in the y direction, while you are using the x axis as an input for the sine wave. To fix it, either make the curve line offset in the x instead of the y, or use the y output of the separate xyz node.

A good way to think about the nodes is by splitting them into function and geometry nodes.
All nodes with a green header are geometry nodes, while all other nodes are function nodes.
The node tree is executed in this order (a little unituitive for new users):

First the two geometry nodes at the start are executed, creating a curve line, and then converting it to points. Then blender moves on to the set position node and sees that there are some function nodes connected to one of the sockets.
It then executes that function for every point so that it knows what value to use for the offset in the set position node, and finally executes that as well.

In this case, that function is: take the x coordinate of the position, multiply it by 3, take the sine of that, and then put that into the z coordinate of a vector. The set position then takes that and uses it as the offset value.

You could write this as offset = (0, 0, sin(pos.x * 5))

Here the position node simply refers to the position of each point, when it is executed (aka after the curve to points node)

I hope that makes sense, but if not, have a look at these great videos by Erindale:

1 Like

Thank you !
It will get me going… Just need to get my head around with a couple of example :slight_smile: And I should be fine
Thanks for the explanation it relay helps

1 Like