Grasshopper

algorithmic modeling for Rhino

Hi,

1) I set up a grid of points, flattened the point list, then drew 90 degree arcs using each point as their base planes (see first image)

2) Then I created some points at the center of each grid square and rotated the arcs around those new points as the base plane.  I used a Series set to get the arc to rotate in 90 degree steps.  So it rotates 90 in one grid square, 180 in the next, 270 in the next, 360 in the next and then just repeats this pattern.  (see second image)

The third image is my GH script.

What I WANT is for the arcs to rotate in 90 degree steps at random, not in the same order over and over again, from one grid square to the next.  I tried using the Random set, but am not having any luck.  Can anyone help me?  I am super new to this, so assume I know nothing.  Thanks!

Views: 1342

Attachments:

Replies to This Discussion

Hi Shawna,

There's two approaches that seem to make sense to me.

1) use the Jitter component to randomize your rotation angles. This means you'll have the same amount of 90, 180, and 270 degree rotations, but the order will be random.

2) use a random component to generate N random integers between 0 and 3 (you'll have to enable the integer option from the component menu), then multiply these random numbers with 90. This approach may give you an unacceptable excess of certain angles.

Thank you!   I used jitter and it worked perfectly. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service