Gradual Modification of Multiple Curves Based on Target Curve

Hello,

I’m reaching out in the hopes that someone can provide assistance with a challenge I’m facing.

I am attempting to adjust multiple curves based on the shape of another curve, which I’ll refer to as the “target curve.” While this might sound straightforward, the complexity arises from the fact that I want these adjustments to occur gradually.

To elaborate, let’s consider a scenario where I have 40 curves that need modification, each relative to the “target curve.” I aim to make the first curve an exact match to the target curve, the second curve slightly less modified, and so forth. Ultimately, the last curve should undergo no modification at all.

I’ve been experimenting with vectors, and my understanding is that a graph mapper might be the key. However, I’m struggling to implement it effectively. If anyone has insights on how to achieve this, I would greatly appreciate your guidance. Thank you!

modify_multiple_curves.gh (34.6 KB)

missing

I don’t have time to do this right so perhaps shouldn’t post anything… but maybe this helps?


modify_multiple_curves_2024Jan5a.gh (14.7 KB)

1 Like

Is this it? I’m a little dubious about using (moving) control points for this, and believe it calls for Nurbs Curves instead of interpolated curves.


modify_multiple_curves_2024Jan5b.gh (37.9 KB)

1 Like

Dear Joseph,

I sincerely appreciate your prompt response and the results :slight_smile: It is exactly what I was looking for !! Your level of expertise is truly remarkable, evident not only in this particular instance but also in the consistent quality of your work across various posts (I’ve read). Thank you

One last question. Would it be possible to manipulate the strength of the adjustment for each curves (from 0 to 1, 0 is no modification at all and 1 is exacly the shape of the target curve). I was initially thinking incorporating a graph mapper to control the 40 curves together - is it possible?

Your continued assistance is really really appreciated. I look forward to your guidance on this matter :wink:

Best regards,

That is already done by the Range component, isn’t it? The top curve has zero length vectors so doesn’t change at all. The bottom curve (of 40) matches the “target curve” exactly.

If you want it the other way (so top curve is modified and bottom curve is unchanged), bypass the TStat and Branch components and wire Amp directly to Move.

Have I missed something?

How can it be “exactly what [you were] looking for !!” and yet not be?

Dear Joseph,
Your approach to gradual modification from 1 to 0 (or vice versa) works perfectly. I truly appreciate your guidance.
However, I’m eager to gain more control over the modification process.
I’m interested in manipulating the modification with greater accuracy, introducing a factor per curve that ranges between 0 to 1. I attempted to incorporate a graph mapper into your definition, but unfortunately, I haven’t been successful in making it work.

If you have any insights or suggestions on how I can achieve a more refined control over the modification, I would be immensely grateful for your expertise.
Thank you in advance for your time and assistance.

So you think what I did three days ago is not accurate?

I get that you want to use a graph mapper. Yet you seem to have no idea what effect it will have?

Here is one way and there are certainly others. When inserted between Range and Flip like this, a graph mapper can alter the linear nature of the transition:

Again, there are other ways to use graph mapper here. Have fun.



So many ways to use graph mapper. :roll_eyes:

1 Like

Maybe this is more like what you had in mind all along? Maybe it’s mathematically equivalent to one of the versions I posted above? The most important thing is that you understand it and can modify it yourself to get whatever effect you wish.


modify_multiple_curves_2024Jan11a.gh (40.5 KB)

2 Likes

Hello Joseph,

Thank you for the grasshopper file. It was interesting to understand how you did it.
I tried experimenting on closed curves and there is always an overlap.

Would you know how to ensure the curves close properly?

Without your GH file, I won’t even try.

3. Attach minimal versions of all the relevant files

modify_multiple_curves_2025Jan.gh (35.2 KB)
Apologies!

Here you go Joseph.
I did a crude method of joining back the curves by removing the duplicate points and closing them up again.

Thanks for looking!

Too crude apparently? I don’t even remember the point of this thread…

1 Like

That is a more elegant way to do it!

I guess the original poster wanted a gradual transformation of curves.
I was interested in how it applies to shapes too.

Thanks Joseph!

Using standard GH Interpolate properly, without two plugins, is not just “more elegant”, it produces the correct result, eh?

modify_multiple_curves_2025Feb1.gh (34.1 KB)