I’m trying to move some curves on the z axis based on their distance from one of them. I want to achive a result like the one in the image: i want to keep the first and last crv of the contour in the original position and move only those in between near to the chosen one, like a gradient (in a “attractor logic”).
what i have tried so far is in the attached file. Maybe the solution can involve ScaleNU but i dont know how to set the z parameter and keep the first and last crv in place; maybe i’m missing something in the remap logic or i need to go deeper in the attractor. while i continue my research i want to ask u for a hint or a help if u have time. hope i’ve been clear.
Thanks to anyone who shares an idea on how to do it
I did it right at the beginning by mapping Z values either side of the “pinch” to 0to1 , graph mapping to get the curve then remapping back to the original domains. Then pass that list of Z values to the Contour Ex component. Keeps all the maths upstream of the geometry.
I took a look at your script and I have to say that the logic of keeping math and geometry separate is incredible, I hadn’t thought about it and you opened my eyes to new scenarios.
If you have time to explain it to me, would you let me know the meaning of the expression x+1 in the integer component? i dont think i fully understand that. while everything else seems to add up even if I have to understand this logic better. thanks again
It’s just a typical “off by one” correction for what is known as a “fence post error.” When you’re building a fence, you always need one more post than panels.
In this case, dividing the height by the Division gives us the number of “panels” but we want to generate a series of coordinates for the “posts” so we need to add 1.