Grasshopper

algorithmic modeling for Rhino

Hello, I'm trying to create a polygon from a given number/length of segments that should become the edges of the polygon.

I'm using hoopsnake to allow me to move and rotate each segment one after another. Which is only partially working.

I've tried to relate the length of each segment to the sum of them to find the rotation angle which is mathematically incorrect.

Is there a way to relate the number of edges, the interior angles, and the edges lengths?

Or is there a simpler way of doing so?

I've attached the gh and a screenshot showing in yellow the starting segments.

looking forward to everyone's help.
woot!

Views: 1227

Attachments:

Replies to This Discussion

Is there a way to relate the number of edges, the interior angles, and the edges lengths?

Your question is a bit incomplete. Does your polygon is always convex ? Do you want to specify the angles between consecutive segments ? 

But even with that, your problem is quite complex to solve in a single shot solution... you may try use kangaroo...

Thanks for your response, yes my interior angles will always be convex.


I'm open to using kangaroo, can you elaborate?

You could use kangaroo to create a polygon spring that reaches the desired lengths you want.  With this method it would equalize the angles to be as similar as possible.

Attachments:

It worked, thanks a lot!

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