GN specific Index position on Curve?

Want to use a Float Curve to position points of a Curve but only by Index? At the moment in the image if I lower resample the Curve for fewer points it no longer holds the same shape.

Well, that can’t work for obvious reasons…

the only way would be to have a very dense curve, do the set position and then simplify the curve: basically inspect each segments and if they are aligned ( dot product ~= 1 ) you delete the point in the middle, and that goes for each segments basically…

That should work, however nothing guarantee that you’ll get exactly the same number of points. If that’s fine by you it might be a good option.

The curve simplification might be a good challenge to practice GN and it’s a pretty useful tool to have in your assets…

Have fun !

1 Like

Thanks will give it a try.

1 Like

Best I can do at the moment, my maths is not good. Had to add a Tolerance too.

1 Like

hum ! it’s getting there ! A few comments :

1/ I don’t understand the Cross Product part, basically you should have two vectors and feed that into a Dot product, the tolerance is basically the compare node, which should be less than… less than say 0.5 = low tolerance, -0.99 = points should be on a straight line to be removed…

2/ About getting the previous and next point : that’s it ! and in that case you’ll get opposite vectors. You have two option there, keep them opposite and the dot product witll give you ~ -1 if the points are aligned, therefore a less than ~-0.8 should work. Or at some point you invert one vector, to have a dot product of ~1 when they are aligned, and use a greater than ~0.8 when removing points…

Anyway, it’s on the right track, I’m not sure if you have a working solution or not but it’s cool, great geonode-fu !

Thanks again, looks a lot tidier.

1 Like