How to rotate and scale a rectangle pattern?

Hello,

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!

Dani

Rectangle_ScalationandRotationWithattractor.gh (20.4 KB)


Something like this?


Rectangle_ScalationandRotationWithattractor_re.gh (15.2 KB)

1 Like

Cool! Thanks so much for your help! :blush:

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:

  1. You didn’t internalize your curve param.
  2. You didn’t wire your Rectangle component to the final Rot3D component.

When I fixed those two issues, I see this:


RectanglesWithAttractor_2021Oct08a.gh (16.4 KB)

Using multiple attractor points, but again, I made no functional changes to your code at all.


RectanglesWithAttractor_2021Oct08b.gh (21.0 KB)

1 Like


Rectangle_ScalationandRotationWithattractor_reV2.gh (15.5 KB)

2 Likes

That is exactly what I was searching for!
Thanks so much for your help and the explanation of the solution. :pray:
I didn’t notice that the rectangle component wasn’t wired - feels so good to have the solution now.

Have a great day!

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 :pray: I learned a lot today.

Have good day!