Hello. I have been working with attractor curves with rectangles and have reached a snag. In the normal attractor definition the attraction distance is same along the length of the curve. My desired output is to create a variable attraction (which is adjustable) along the length of the curve as shown in the image.
Sorry for tagging along 2 years later but I’m currently having a bit of a similar issue with my definition.
I’m currently using attractor curve to push and pull a surface up and down in the Z axis. I would like to acheive an apex at the position matching the center of the curve and tapering down towards the ends with less effect. As per the attached screenshot:
I’ve been trying to adapt Adam’s from rectangles to curve but cannot find why the definition is not working. Could anybody help me solve this please? Variable Strength Attractor along curve.gh (100.0 KB)
This thread has a great title. The first thing that came to mind was using the ‘t’ value from Crv CP to determine position along the attractor curve, which I see that @Adam_M did. I would think it would be more useful if the curve (‘C’ input) were reparameterized so the ‘t’ value would be between zero and one instead of the values you see now? Oh look, the output of Graph Mapper is “clamped” to “0” or “1” because that’s the default domain.
I see some pointless code below at the Sort component where the ‘K’ input is a single value (Average) instead of a list? What’s the point of sorting a single value?
Finally, I see that you are summing vectors again instead of focusing on distance values from the attractors. It might amount to the same thing (I’m not sure), but it’s a distraction from all the attractor code I’ve ever seen, which is quite a lot.
I simplified this quite a bit, I left the purple group, though believe it’s an odd construct and could be done using Crv CP, as it is in the blue group.