October 8, 2021, 10:39am
I would like to scale a rectangles with a curve attractor and rotate these rectangles with its own center following another attractor point.
I managed to do these independently but when I try to combine the definitions, it doesn’t work…
Does someone know what I have to change for it to work?
Any help is greatly appreciated!
Rectangle_ScalationandRotationWithattractor.gh (20.4 KB)
October 8, 2021, 11:14am
Cool! Thanks so much for your help!
Almost - Is it possible to have the curve attractor only affect the scalation of the rectangles and not the rotation?
And the point attractor only affecting the rotation of the rectangles?
It looks to me like your code was already doing this correctly, except for two little things:
You didn’t internalize your curve param.
You didn’t wire your
Rectangle component to the final Rot3D component.
When I fixed those two issues, I see this:
Using multiple attractor points, but again, I made no functional changes to your code at all.
October 8, 2021, 12:47pm
That is exactly what I was searching for!
Thanks so much for your help and the explanation of the solution.
I didn’t notice that the rectangle component wasn’t wired - feels so good to have the solution now.
Have a great day!
October 8, 2021, 12:52pm
Yeah, that is the solution I was looking for!
So interesting to see another code for the problem.
Thanks so much for your help and effort I learned a lot today.
Have good day!
January 12, 2022, 3:43pm
Hello, does anyone know if it is it possible to have the rotation in only one direction, so that it looks more “smooth” like in this example?
I don’t want the rectangles to point all that harsh to the attractor point. How can I have more of a flow like in the example (black image)?
RectanglesWithAttractor_One directionScale.gh (21.2 KB)
Which example? The solutions that have been posted are algorithms that can be adapted - so modify them any way you like. Too many people here don’t seem to learn anything from working code unless the work done by others exactly matches every detail of their evolving “spec”.
January 12, 2022, 5:16pm
This might be a start for your adjustments. You could rather use 3d curve as an attractor instead of using 2d planar curve like this.
January 12, 2022, 7:15pm
It was hard to describe. But that is exactly what I meant!
Thanks for the explanation! I didn’t know about the 3d curve - now I know