# Sine wave problem

Hei, i want to create from a line (regardless about length) a sine wave through Grasshopper. Below you can see where I’m currently:

My Aim is to have only 2 waves on the line. The wave’s climax and 0.2m and its sides are symmetric and have distance from the Base line 0.05m. Like in this image:

Here is my internalized code:
SINE WAVE.3dm (59.9 KB)
SINE WAVE.gh (9.9 KB)

Thanks for the help!

There are many methods, you can use Graph mapper or equation.

sine curve.gh (10.3 KB)

Thanks,

What if we have 2 lines of different lengths and we want at same time to create from them sine waves of 2 climax and symmetric sides. If Iam thinking right, we need to create 2 different domains/sin functions for each?. I would be very thankful to see how the code goes.

For different inputs, you need to use the same code twice or more;
you can use data tree but you will lost if you have many inputs.
Show an example and you will find many solutions

1 Like

If you mean this

Like this i exactly mean, the different lines always hold the same shape.

Simply change the length of the line

I meant that i have 2 lines with different lengths, and i want to have for each line wave shape with 2 climax regardless about the wave lengths. Of course for each line the wave length would be different. So my question was that, is it possible with one code (grafted) to create for a bunch of lines waves with 2 climaxes.? hopefully Iam not complicating it. Thanks

I show you; you need to use Graft (the small arrow) to separate curves and use the same for other inputs

sine curve2.gh (29.1 KB)

Now i understand quite well. Thanks a lot