Trig Problem - Grasshopper2024-03-28T21:22:17Zhttps://www.grasshopper3d.com/forum/topics/trig-problem?commentId=2985220%3AComment%3A1816579&feed=yes&xn_auth=noA couple of years ago... htt…tag:www.grasshopper3d.com,2017-09-21:2985220:Comment:18171122017-09-21T01:36:46.118ZJoseph Osterhttps://www.grasshopper3d.com/profile/JosephOster
<p>A couple of years ago... <a href="http://www.grasshopper3d.com/xn/detail/2985220:Comment:1430655" rel="nofollow" target="_blank">http://www.grasshopper3d.com/xn/detail/2985220:Comment:1430655</a></p>
<blockquote><p>I wrote a general purpose "Domain Search Solver" using Anemone - nested loops that split the original domain by 'Dom Divs' (5..20 suggested) and iterate until a specified precision is reached. Works well!…</p>
</blockquote>
<p></p>
<p>A couple of years ago... <a rel="nofollow" href="http://www.grasshopper3d.com/xn/detail/2985220:Comment:1430655" target="_blank">http://www.grasshopper3d.com/xn/detail/2985220:Comment:1430655</a></p>
<blockquote><p>I wrote a general purpose "Domain Search Solver" using Anemone - nested loops that split the original domain by 'Dom Divs' (5..20 suggested) and iterate until a specified precision is reached. Works well!</p>
</blockquote>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769080787?profile=original" target="_self"><img src="http://storage.ning.com/topology/rest/1.0/file/get/2769080787?profile=original" class="align-full"/></a></p>
<p>The version I use today might have evolved a little since then, I don't remember. But I wired it to the code I posted above and bingo! Works like a champ on your question. Set the desired angle and it varies the Z-height until a solution is found (if possible) - quickly; ~5 seconds:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323340?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323340?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p>
<blockquote><p><span>but as <em>I</em> pointed out I wasn't really looking for a specific code in my original question, just more of a general strategy</span></p>
</blockquote>
<p>This is a specific code solution so I won't bother posting it.</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323568?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323568?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323818?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323818?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p> Just in case anybody was curi…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18169502017-09-20T23:11:20.102ZRyan Whitbyhttps://www.grasshopper3d.com/profile/RyanWhitby
<p>Just in case anybody was curious about my solution. Here is the relevant snippet from mycode. Tried to remove as many dependencies as possible but definitely need weaverbird and K2. Might be a tree sloth component in there somewhere... </p>
<p>Just in case anybody was curious about my solution. Here is the relevant snippet from mycode. Tried to remove as many dependencies as possible but definitely need weaverbird and K2. Might be a tree sloth component in there somewhere... </p> yeah that's the correct angle…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18168042017-09-20T22:54:20.654ZBrian Harmshttps://www.grasshopper3d.com/profile/BrianHarms
<p>yeah that's the correct angle, but I believe he's trying to specify the crease angle instead of the height of the vertex.</p>
<p>yeah that's the correct angle, but I believe he's trying to specify the crease angle instead of the height of the vertex.</p> Here is a way to choose a dif…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18170542017-09-20T22:50:01.134ZJoseph Osterhttps://www.grasshopper3d.com/profile/JosephOster
<p>Here is a way to choose a different vertex:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323149?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323149?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p>
<p>Here is a way to choose a different vertex:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323149?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323149?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p> Thanks Joseph. That is indee…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18169462017-09-20T22:42:05.085ZRyan Whitbyhttps://www.grasshopper3d.com/profile/RyanWhitby
<p>Thanks Joseph. That is indeed a way to find the crease angle. I appreciate your advice but as I pointed out I wasn't really looking for a specific code in my original question, just more of a general strategy. I already have a code that creates the panel and measures the angle afterward. I was looking for a way to create the panel with a target crease angle. Therefore it would be necessary to know the relationship of the crease angle to height from a bottom up approach rather than a…</p>
<p>Thanks Joseph. That is indeed a way to find the crease angle. I appreciate your advice but as I pointed out I wasn't really looking for a specific code in my original question, just more of a general strategy. I already have a code that creates the panel and measures the angle afterward. I was looking for a way to create the panel with a target crease angle. Therefore it would be necessary to know the relationship of the crease angle to height from a bottom up approach rather than a top down approach. I appreciate your help but I settled on solution to optimize the geometry after its created using kangaroo. </p> Wasn't really a code question…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18170522017-09-20T22:30:42.263ZJoseph Osterhttps://www.grasshopper3d.com/profile/JosephOster
<blockquote><p>Wasn't really a code question. More of a generic trig/theory question.</p>
</blockquote>
<p>This is a coding forum. Solutions are typically done in code.</p>
<p>Is this how to measure the angle? The two surfaces are disabled in the purple group because they are irrelevant. Not sure I should post the code though, since you didn't bother...…</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323475?profile=original" target="_self"><img class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323475?profile=RESIZE_1024x1024" width="721"></img></a></p>
<blockquote><p>Wasn't really a code question. More of a generic trig/theory question.</p>
</blockquote>
<p>This is a coding forum. Solutions are typically done in code.</p>
<p>Is this how to measure the angle? The two surfaces are disabled in the purple group because they are irrelevant. Not sure I should post the code though, since you didn't bother...</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769323475?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769323475?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p> Yep makes total sense. I cam…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18165792017-09-20T19:27:34.812ZRyan Whitbyhttps://www.grasshopper3d.com/profile/RyanWhitby
<p>Yep makes total sense. I came to a similar conclusion and decided to "cheat" by running the panel through kangaroo after they are made to snap the crease angle to the nearest 10 degree increment. </p>
<p>Yep makes total sense. I came to a similar conclusion and decided to "cheat" by running the panel through kangaroo after they are made to snap the crease angle to the nearest 10 degree increment. </p> A brute force optimization me…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18165782017-09-20T19:23:43.500Ztazhttps://www.grasshopper3d.com/profile/taz
<p>A brute force optimization method would make sense.</p>
<p>A brute force optimization method would make sense.</p> here would be my solution to…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18165762017-09-20T19:00:38.767ZBrian Harmshttps://www.grasshopper3d.com/profile/BrianHarms
<p>here would be my solution to that</p>
<p>here would be my solution to that</p> I think the problem is that w…tag:www.grasshopper3d.com,2017-09-20:2985220:Comment:18164742017-09-20T18:48:57.494ZBrian Harmshttps://www.grasshopper3d.com/profile/BrianHarms
<p>I think the problem is that with skewed geometry, you don't have enough information to outright solve the trig. You basically have a scalene triangle with an angle and an opposite side known.</p>
<p></p>
<p>You can make it an optimization problem, where you have grasshopper try a bunch of solutions and pick the one that gives you an angle closest to what you want.</p>
<p></p>
<p>Does that make sense?</p>
<p>I think the problem is that with skewed geometry, you don't have enough information to outright solve the trig. You basically have a scalene triangle with an angle and an opposite side known.</p>
<p></p>
<p>You can make it an optimization problem, where you have grasshopper try a bunch of solutions and pick the one that gives you an angle closest to what you want.</p>
<p></p>
<p>Does that make sense?</p>