I’m trying to generate the geometry for a specific triangle, and I’m stuck on how to do it. What’s especially frustrating is that it took me less that 5 seconds to do in Fusion 360, but in Grasshopper I’ve been stuck for hours trying to figure out how to set up the cluster to make it happen. I made this to try to explain it:
Points A, B, and Z are all on a line in that order. The length of AB is fixed at 12, and length BZ is an input that will vary from 0 to 1. I am trying to generate a point C such that angle ACB = 60 and segment CZ is perpendicular to AZ, for any given input of BZ within the range. Each value of BZ has only one configuration that satisfies this. (Note at s=0 triangle ABC will be a regular 30-60-90 triangle). Fusion handles this really easily, I can just place an undefined vertex C and once I have set angles ACB and AZC to these values, the geometry is fully defined and I can measure what X is out of this.
In Grasshopper though, I can’t find a way to set it up that doesn’t require X as an input parameter. I’ve tried various setups with the two trigonometry components, but my two defining angle measurements (ACB and AZC) don’t fit into one place that can determine the geometry. I have the lengths of AB and AZ for that trig, but not any of the other side lengths or angles. It’s not really that complicated and I know the math all checks out, I just can’t get Grasshopper incorporate the pieces. Can anyone think of a configuration that will do this? I really appreciate it, I’m totally stuck on this.
As I am quite sure your triangle is too undefined to be solved by equations I can’t think of anything else but an iterative approach (similar to what fusion360 does)
Have a look at this file showing you how to solve your problem with kangoroo
Thank you, this is brilliant! I only just started with grasshopper and haven’t used Kangaroo before, I will be studying this closely! Greatly appreciate this!
Setting aside for a moment the non linear nature of this function, I can’t find any value for the ‘Y coord’ for point C that solves this when ‘BZ’ = 1 (i.e. AZ = 13)?
Its the circumference of the equilateral triangle constructed for AB. Super smart solution there @DanielPiker, Any point C on that circle will be at an angle of 60° to A and B.
This is a super useful visualization to understand the problem. I had been thinking about point C as traveling “down” toward z and only considering that first intersection (which is the one I’m looking for), but this shows clearly that there are 2 and that it can be done without the iterative approach. Thank you, seeing there various approaches are so helpful!