<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Complex poly math question. in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81308#M31579</link>
    <description>the object.....enjoy!</description>
    <pubDate>Tue, 30 Jan 2007 16:19:38 GMT</pubDate>
    <dc:creator>LiHigh</dc:creator>
    <dc:date>2007-01-30T16:19:38Z</dc:date>
    <item>
      <title>Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81305#M31576</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hey all,&lt;BR /&gt;
&lt;BR /&gt;
I have a fairly complex math question (or at least for me). In a gdl object i want to draw a polygon that has 2 sides made from a curve and 2 sides a straight line. This is easy enough but i also want to fillet where they join, see sketch.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know the how to work out the formula for this, i believe the formula lies in analytical geometry but is a bit beyond me.&lt;BR /&gt;
&lt;BR /&gt;
P.S. I realise 2 lines can be filleted using status codes using poly_b but i need to know the start, end and centre points of the fillet when a straight line and curve intersect to use this.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help&lt;/T&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/11830iD13AEC2B262552A0/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Page0001.jpg" title="Page0001.jpg" /&gt;</description>
      <pubDate>Tue, 30 Jan 2007 06:23:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81305#M31576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-30T06:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81306#M31577</link>
      <description>You need one more known distance &lt;B&gt;f&lt;/B&gt;. The resulting radius &lt;B&gt;r1&lt;/B&gt; of the fitting circle is unique. The pink right triangle brings the formulas. To calculate the X/Y coordinates is still a lot of work, but this should bring you on the track. &lt;BR /&gt;
HTH. Frank&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/15222i2E77C7266E00C4B4/image-size/large?v=v2&amp;amp;px=999" border="0" alt="rounded.jpg" title="rounded.jpg" /&gt;</description>
      <pubDate>Tue, 30 Jan 2007 10:01:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81306#M31577</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2007-01-30T10:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81307#M31578</link>
      <description>I hope this is what you are looking for...&lt;BR /&gt;
&lt;BR /&gt;
	!-----------------------------------------&lt;BR /&gt;
		r2 = r1 + d&lt;BR /&gt;
		u = ATN(f/(r2-f))&lt;BR /&gt;
		w = ATN(f/(r1+f))&lt;BR /&gt;
		&lt;BR /&gt;
		x1=r1+f :y1=0&lt;BR /&gt;
		x2=r2-f :y2=0&lt;BR /&gt;
		x3=r2*cos(u) :y3=r2*sin(u)&lt;BR /&gt;
		x4=r2*cos(alpha-u) :y4=r2*sin(alpha-u)&lt;BR /&gt;
		x5=(r2-f)*cos(alpha) :y5=(r2-f)*sin(alpha)&lt;BR /&gt;
		x6=(r1+f)*cos(alpha) :y6=(r1+f)*sin(alpha)&lt;BR /&gt;
		x7=r1*cos(alpha-w) :y7=r1*sin(alpha-w)&lt;BR /&gt;
		x8=r1*cos(w) :y8=r1*sin(w)&lt;BR /&gt;
	!-----------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
poly2_ 9,7,&lt;BR /&gt;
	x1, y1, 1,&lt;BR /&gt;
	x2, y2, 1,&lt;BR /&gt;
	x3, y3, 1001,&lt;BR /&gt;
	x4, y4, 1001,&lt;BR /&gt;
	x5, y5, 1001,&lt;BR /&gt;
	x6, y6, 1,&lt;BR /&gt;
	x7, y7, 1001,&lt;BR /&gt;
	x8, y8, 1001,&lt;BR /&gt;
	x1, y1, 1001&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/12721i18A5814D3BE4AEB9/image-size/large?v=v2&amp;amp;px=999" border="0" alt="polyShape.jpg" title="polyShape.jpg" /&gt;</description>
      <pubDate>Tue, 30 Jan 2007 16:11:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81307#M31578</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-01-30T16:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81308#M31579</link>
      <description>the object.....enjoy!</description>
      <pubDate>Tue, 30 Jan 2007 16:19:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81308#M31579</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-01-30T16:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81309#M31580</link>
      <description>Thanks for your help LiHigh and Frank. A very sound explanation, I should be able to implement this easily now.</description>
      <pubDate>Tue, 30 Jan 2007 21:37:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81309#M31580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-30T21:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81310#M31581</link>
      <description>@LiHigh&lt;BR /&gt;
That's a quiet good approximation, but it is not the exact solution. Add this at the end of your script:&lt;BR /&gt;
&lt;BR /&gt;
!-----------------------------------------&lt;BR /&gt;
line2 r1,0,r1+d,0&lt;BR /&gt;
arc2 0,0,r1,0,alpha&lt;BR /&gt;
arc2 0,0,r1+d,0,alpha&lt;BR /&gt;
rot2 alpha&lt;BR /&gt;
line2 r1,0,r1+d,0&lt;BR /&gt;
del 1&lt;BR /&gt;
!-----------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
And you will see intersection of the boundarys, which might not exist. The reason:&lt;BR /&gt;
X2 is NOT R2-F. If you have a look on it in a larger scale you will see. The dependance of the edge radius and the distance of the tangiantial point is as complex as I wrote in my posting above. So it is for all other points. Maybe it is easier to give the radius known instead of the distance. Does make not much difference as one can see. In every case I am shure that there is a simple solution, because the angle of the rounding arc can be found in any of the known triangles. I don't know the English expressions, but there is a basic trigonometric rule that lets me believe in this.&lt;BR /&gt;
&lt;BR /&gt;
If I get my work done before I sleep I spent still a thought on it. &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt; Interesting problem. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 30 Jan 2007 22:26:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81310#M31581</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2007-01-30T22:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81311#M31582</link>
      <description>Some work and sleep in between. Here is teh exact calculation part:&lt;BR /&gt;
&lt;BR /&gt;
!-----------------------------------------&lt;BR /&gt;
r2 = r1 + d&lt;BR /&gt;
L1 = sqr(r1) * sqr(2*f+r1) - R1&lt;BR /&gt;
L2 = r2 - sqr(r2^2-2*f*r2)&lt;BR /&gt;
u = ATN(f/(r2-L2))&lt;BR /&gt;
w = ATN(f/(r1+L1))&lt;BR /&gt;
&lt;BR /&gt;
x1=r1+L1 : y1=0&lt;BR /&gt;
x2=f/tan(u) : y2=0&lt;BR /&gt;
x3=r2*cos(u) : y3=f*r2/(r2-f)&lt;BR /&gt;
x4=r2*cos(alpha-u) : y4=r2*sin(alpha-u)&lt;BR /&gt;
x5=(r2-L2)*cos(alpha) : y5=(r2-L2)*sin(alpha)&lt;BR /&gt;
x6=(r1+L1)*cos(alpha) : y6=(r1+L1)*sin(alpha)&lt;BR /&gt;
x7=r1*cos(alpha-w) :y7=r1*sin(alpha-w)&lt;BR /&gt;
x8=r1*cos(w) :y8=f*r1/(r1+f)&lt;BR /&gt;
!-----------------------------------------</description>
      <pubDate>Wed, 31 Jan 2007 07:51:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81311#M31582</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2007-01-31T07:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81312#M31583</link>
      <description>@LiHigh&lt;BR /&gt;
May I use your illustration and script for a documentation page on opengdl?</description>
      <pubDate>Wed, 31 Jan 2007 07:58:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81312#M31583</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2007-01-31T07:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81313#M31584</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;@LiHigh&lt;BR /&gt;
May I use your illustration and script for a documentation page on opengdl?&lt;/BLOCKQUOTE&gt;
Sure! feel free to do so.</description>
      <pubDate>Wed, 31 Jan 2007 11:56:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81313#M31584</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-01-31T11:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81314#M31585</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;@LiHigh&lt;BR /&gt;
That's a quiet good approximation, but it is not the exact solution. 
&lt;/BLOCKQUOTE&gt;

You are right!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
The Fix:&lt;BR /&gt;
&lt;BR /&gt;
	!-----------------------------------------&lt;BR /&gt;
		r2 = r1 + d&lt;BR /&gt;
		u = ASN(f/(r2-f))&lt;BR /&gt;
		w = ASN(f/(r1+f))&lt;BR /&gt;
&lt;BR /&gt;
		x1=(r1+f)*cos(w) :y1=0&lt;BR /&gt;
		x2=(r2-f)*cos(u) :y2=0&lt;BR /&gt;
		x3=r2*cos(u) :y3=r2*sin(u)&lt;BR /&gt;
		x4=r2*cos(alpha-u) :y4=r2*sin(alpha-u)&lt;BR /&gt;
		x5=(r2-f)*cos(u)*cos(alpha) :y5=(r2-f)*cos(u)*sin(alpha)&lt;BR /&gt;
		x6=(r1+f)*cos(w)*cos(alpha) :y6=(r1+f)*cos(w)*sin(alpha)&lt;BR /&gt;
		x7=r1*cos(alpha-w) :y7=r1*sin(alpha-w)&lt;BR /&gt;
		x8=r1*cos(w) :y8=r1*sin(w)&lt;BR /&gt;
	!-----------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
poly2_ 9,7,&lt;BR /&gt;
	x1, y1, 1,&lt;BR /&gt;
	x2, y2, 1,&lt;BR /&gt;
	x3, y3, 1001,&lt;BR /&gt;
	x4, y4, 1001,&lt;BR /&gt;
	x5, y5, 1001,&lt;BR /&gt;
	x6, y6, 1,&lt;BR /&gt;
	x7, y7, 1001,&lt;BR /&gt;
	x8, y8, 1001,&lt;BR /&gt;
	x1, y1, 1001</description>
      <pubDate>Wed, 31 Jan 2007 12:35:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81314#M31585</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-01-31T12:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81315#M31586</link>
      <description>&lt;BLOCKQUOTE&gt;LiHigh wrote:&lt;BR /&gt;
&lt;BR /&gt;
You are right!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_redface.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
The Fix:&lt;BR /&gt;
&lt;BR /&gt;
	!-----------------------------------------&lt;BR /&gt;
		r2 = r1 + d&lt;BR /&gt;
		u = ASN(f/(r2-f))&lt;BR /&gt;
		w = ASN(f/(r1+f))&lt;BR /&gt;
...&lt;/BLOCKQUOTE&gt;

Thanks again guys for the solution.&lt;BR /&gt;
&lt;BR /&gt;
LiHigh, do you mind if i post this and illustration on &lt;A href="http://www.gdldeveloper.com" target="_blank"&gt;www.gdldeveloper.com&lt;/A&gt; aswell. I think others will find this very useful.</description>
      <pubDate>Wed, 31 Jan 2007 21:50:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81315#M31586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-31T21:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Complex poly math question.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81316#M31587</link>
      <description>&lt;BLOCKQUOTE&gt;Mark wrote:&lt;BR /&gt;
&lt;BR /&gt;
Thanks again guys for the solution.&lt;BR /&gt;
&lt;BR /&gt;
LiHigh, do you mind if i post this and illustration on &lt;A href="http://www.gdldeveloper.com" target="_blank"&gt;www.gdldeveloper.com&lt;/A&gt; aswell. I think others will find this very useful.&lt;/BLOCKQUOTE&gt;

No, I don't mind.</description>
      <pubDate>Thu, 01 Feb 2007 14:37:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Complex-poly-math-question/m-p/81316#M31587</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-02-01T14:37:29Z</dc:date>
    </item>
  </channel>
</rss>

