Sine wave with incomplete pattern or uneven ending, how to fix it?

So I have made several divisions and made the points move in Z, with a ‘Sine components’, but the result always when used a curve to connect points always results in incomplete pattern or uneven ending

Here’s the IMAGE showing the sine pattern incomplete-

Here’s the GH script -

random sine curve lofted contoured false ceiling.gh (73.2 KB)

Any help would be appreciated !

If you want to stick to Sinus, it will be better you use a Sinus rather than GraphMapper and you feed this equation or component with start and end values multiple of PI


sine curve_2024Mar27a.gh (5.0 KB)

Version ‘a’ above is not quite correct, especially at the ends. This method uses Sine.


sine curve_2024Mar27b.gh (9.9 KB)

You can see the difference if you look closely. (cyan group)

a remap should do the trick

the basic ideas is that if:
x_rmp = [ 0, 1/2 pi, pi , 3/2 pi, 2 pi, etc…]
sin (x) = [0, 1, 0 , -1, 0, etc…]

so to go from x to x_rmp you use a remap component such that
(xmin, xmax) is remapped to (0, n pi) —> since sin(0) = 0 and sin(n pi) = 0

random sine curve lofted contoured false ceiling [fixed] .gh (72.0 KB)