Rotate multiple surfaces

Hello.
I created a small definition. As a result, many surfaces are created.

Now handmade.
I divided all surfaces into eight groups. Each surface inside their groups I turned to 3 degrees оn the side views.

Please help me to do it automatically inside the grasshopper.
Thanks.


Rotate multiple surfaces.3dm (795.0 KB)
Rotate multiple surfaces.gh (8.4 KB)

Hi @leex ,

I don’t have clipper but you should be able to plug your offset polylines into the E input of the “Surfaces To Rotate” node in this definition and get the result you are looking for.

The 2nd and 3rd function aren’t needed, they are just for visualization purposes.

Let me know if you have any questions!

Graph Space:

Model Space:

20230820_Rotate multiple surfaces_Response_01a.gh (18.8 KB)

1 Like

Hi Michael,

Thank you very much for your help!
Can I ask where to control groups of surfaces and how to define them. It seems here 4 groups. I would like more groups.
Now the color from “Random Colors (HSV)” node does not correspond to a certain group.
I drew attention to the fact that the turns are in rows.
I would like more chaotic. But I did not understand how to manage it.

It may be first to break all surfaces into chaotic groups according to the principle of “Random Colors (HSV)”, for example 8 colors.
And then turn each surface with the corresponding resulting color to a certain degree?

Rotate

There are 8 groups in file, from the first post .
Each group is turned on a certain degree.
In general, I would like to do it but inside the grasshopper.
Rotate multiple surfaces.3dm (796.6 KB)

I created several identical squares and applied your definition to them.
Squares rotate the same way.

Is it possible to create chaos for rotation?
Rotate Rectangle
Rotate Rectangle.gh (14.1 KB)
Rotate Rectangle.3dm (352.6 KB)

Hi @leex ,

By chaos do you mean randomized rotation and in multiple axis?

Yes, that’s just what I mean.
Randomized rotation in two coordinate axes.

1 Like

Welcome to the chaos:

I created a python component that will allow you to randomly rotate within a specified range and takes a mask input allowing you to choose which inputs you want to rotate within.

Here is an example with XYZ mask input:

Here is an example with Z only mask:

Y only mask:

Let me finish cleaning up the code/graph space and I’ll share.

One moment

That is Hell! :fire: :grinning:

But seriously, the pattern in a top view should remain unchanged.

@leex ,

Here you are:

Graph Space:

Model Space (Random rotation in XYZ min 0, max 3 degrees):

20230820_Rotate multiple surfaces_Response_01b.gh (21.3 KB)

That’s great!
Michael, thanks a lot! It works wonderful!
:handshake:

Glad to hear it! You’re welcome!

Michael, now I tested on the same circles and noticed that the turns have a different angle.
The circles that I designated blue turned a little bit.
It’s embarrassed to ask, but I would like you to see what is wrong here.


Rotate Circle.gh (21.7 KB)
Rotate Circle.3dm (564.6 KB)

@leex ,

Don’t be embarrassed haha! I’ll see what I can see, one moment

Looks good on my end?

When you say turned a little bit do you mean when you re-ran the script they moved again, and you had values that you “liked” and then they moved? If so that’s because each time the script runs its random so if you want it to maintain the last randomness iteration we need to add a seed value to the randomness (not a problem to do but wanting to know if that’s what you meant?)

OR

Did you mean that the blue ones moved “only a little bit” as in barely rotated much in comparison to the others and you would like better control over the range to ensure that a near 0 rotation is not possible?

Because currently if your range is -15 To 15 a rotation of 0 or 0.1 or even 0.00001 is possible as it’s within that range

Yes, I mean that the blue ones moved “only a little bit”.
I would like each element to be turned on the same angel. But randomly in any side (on the Front or Left view).

Rotate Circle

I would like to strictly set the angle of inclination of all elements.

Rotate Circles

Hi @leex ,

If I understand you correctly…
That’s what the XY mask would do, provided you have consistent input planes.

Graph Space:
image

Model Space:

Note the consistent world aligned planes:

If you don’t want to evaluate the surface or in the case of your earlier voronoi example, simply using the area component and plugging the C “Center” output into the Rotation Script P input should give you a rotation center that is World XY aligned by default.

What that looks like in Graph Space:
image

And Model Space:

I have already tested with these values (min 0, max 15)
And I saw that all the elements have a slope in the one side with minor deviations.

This is clearly visible on the Front view.

The Area component changes little. The slope still goes one way.
Area