Grasshopper

generative modeling for Rhino

Creating a triangle with sides of set segment length

I've got a basic understanding of Grasshopper but have come up against a problem that I'm not quite sure how to figure out, though it seems like something that's possible in Grasshopper. Basically, we're trying to make a triangle where each side is made up of smaller pieces that have a set length (in this case, 430 mm), and where the triangle is not equilateral but still acute. We want to be able to set the length of 1 or 2 sides, then see possible combinations of triangles where the length of the remaining side is still a multiple of 430 (thus changing the angles within the triangle. I know in some cases there would actually be an infinite number of possible triangles, so perhaps setting a boundary on maximum length of sides would be useful.

Any ideas would be super helpful. I imagine there's a way through trigonometry but my math is a bit rusty...

Views: 271

Replies to This Discussion

Hi Ben this would be my approach:

Attachments:

Purely to satisfy my own OCD here is an improved version that handles the "Flat" triangles by limiting the intersections to only those in range and by insisting that the static horizontal line is always the largest of the two inputs.

Attachments:

Thanks, this is exactly what we needed! I'm curious though if you know why the intersection, in the first one at least, gives a null value? I often run into null values here and there and can never figure out why they happen...

If two lines don't intersect then you get a null value. For example if there were circles in the muticoloured version above where the circular blank space is the these would not cross the chain line circle, therefore they would have nulls.

This is why I re wrote it so that the lines would always intersect.

by Alex

by Alex

by Alex

• View All