Visible gap in ChopToSop with cyclical chops

I’d like to think this isn’t quite a begginer question, but I was unsure of where to put it.

Im generating cyclical shapes by feeding cosine functions with different cycles and phases to the x y and z coordinate in a ChopToSop, however, on the “ends” there seems to be a very minor mismatch of values resulting in a visible gap, especially after running through a copy node.

I suppose this might be a floating point precision problem, it might also be that, for some reason, the chops don’t go exactly from 0 to 1 but from 0 to something like .99999…

Any ideas on how to fix this? Should I try and use a higher precision version of sine/cosine? if so how?

I hope you can see the gap above the merge1 node

I hacked a lil bit and made an offset version of the shape, with the gap somewhere else, and merged them together before the copy node, not entirely loving this approach, but it does work.

(edit) it seems to have stopped working?? I can’t quite wrap my head around it yet, but the offset shape does not match the initial one, even though I think it should.

Hi @fakedooge,

the CHOP To SOP only draws a primitive that is not closed so if the end position does not match the starting position of your waveform, there will be a gap.

A fix could be to create a Circle with the same number of points as you have samples in your CHOPs and append the CHOP To SOP to that, effectively the CHOP To SOP is now acting as a filter to the original shape offsetting the positions but retaining information on the geometry, like if it is a closed circle or some other geometry.

Hope that helps
cheers
Markus