<?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: VBA: weird values of coordinates in position matrix in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9533560#M111136</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/118453"&gt;@alewer&lt;/a&gt;&amp;nbsp; Thank you so very for taking time to explain and that article is brilliant. I have just printed it and will read it thoroughly on weekend, it is brilliant and explains the topic much better and in detail than what is available on Inv help for same topic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just need to clarify one more thing, if you look at my few lines of code you would note (and might agree) that in those few lines not even once I have given/assigned any value to Y, then why and where the value of Y might be coming from (and that too exactly 75).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you so much again and have a great weekend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;</description>
    <pubDate>Fri, 22 May 2020 08:25:54 GMT</pubDate>
    <dc:creator>sam</dc:creator>
    <dc:date>2020-05-22T08:25:54Z</dc:date>
    <item>
      <title>VBA: weird values of coordinates in position matrix</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9532043#M111128</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have couple of questions. part of my code is acting really weirdly,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture005.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/773905i052EF2F285B06D8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture005.png" alt="Capture005.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;in PositionMatrix translation I have no clue where Length (106.0666) is coming from.&amp;nbsp;&lt;/P&gt;&lt;P&gt;X is fine though it should show 75 instead of 74.99999&lt;/P&gt;&lt;P&gt;again I don't know where -75 is coming from as Y-axis value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 14:49:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9532043#M111128</guid>
      <dc:creator>sam</dc:creator>
      <dc:date>2020-05-21T14:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: VBA: weird values of coordinates in position matrix</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9532472#M111130</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6787200"&gt;@sam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;in PositionMatrix translation I have no clue where Length (106.0666) is coming from.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The length is expected for the values of X, Y, and Z. You can think of the length as the distance from (0, 0, 0) to (75, -75, 0). By pythagorean theorem this is sqrt(75^2+75^2)=106.066, so my math agrees with Inventor's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6787200"&gt;@sam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;X is fine though it should show 75 instead of 74.99999&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This can come from a number of places... floating point binary representations of numbers are imperfect and lead to rounding errors, some of which are not exactly obvious. For example in base 10 we know that some numbers do not have exact representations--for example 1/3 = 0.333... and there is no way to exactly represent this number as a decimal. With binary representations, 1/10 suffers from the same problem--it is a repeating decimal with no exact representation. As a result of this (and other oddities of binary floating point math), you will often see rounding errors that you might not expect. Well written software usually tries to hide this weirdness from the user, but since you are in API land, none of this will be hidden from you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6787200"&gt;@sam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;again I don't know where -75 is coming from as Y-axis value.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Have a look at this excellent document (handout from Brian Ekins' 2008 AU presentation &lt;EM&gt;How Deep is the Rabbit Hole?&lt;/EM&gt;) &lt;A href="https://modthemachine.typepad.com/files/mathgeometry.pdf" target="_blank" rel="noopener"&gt;https://modthemachine.typepad.com/files/mathgeometry.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you read the document and still have questions, I suggest sharing your code. There is very little I can do to help with just a screenshot of a couple lines.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 18:16:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9532472#M111130</guid>
      <dc:creator>alewer</dc:creator>
      <dc:date>2020-05-21T18:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: VBA: weird values of coordinates in position matrix</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9532947#M111131</link>
      <description>&lt;P&gt;One more point about X=74.99999: another look at your code and your error ths could also easily come from what appears to be a rather inexact approximation of pi. Try using 2 * Math.Atn(1) instead of 3.14159... / 2.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 22:37:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9532947#M111131</guid>
      <dc:creator>alewer</dc:creator>
      <dc:date>2020-05-21T22:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: VBA: weird values of coordinates in position matrix</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9533560#M111136</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/118453"&gt;@alewer&lt;/a&gt;&amp;nbsp; Thank you so very for taking time to explain and that article is brilliant. I have just printed it and will read it thoroughly on weekend, it is brilliant and explains the topic much better and in detail than what is available on Inv help for same topic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just need to clarify one more thing, if you look at my few lines of code you would note (and might agree) that in those few lines not even once I have given/assigned any value to Y, then why and where the value of Y might be coming from (and that too exactly 75).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you so much again and have a great weekend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;sam&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 08:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9533560#M111136</guid>
      <dc:creator>sam</dc:creator>
      <dc:date>2020-05-22T08:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: VBA: weird values of coordinates in position matrix</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9533759#M111138</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/118453"&gt;@alewer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;One more point about X=74.99999: another look at your code and your error ths could also easily come from what appears to be a rather inexact approximation of pi. Try using 2 * Math.Atn(1) instead of 3.14159... / 2.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have tried this and its not same, isn't it?&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 10:35:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/vba-weird-values-of-coordinates-in-position-matrix/m-p/9533759#M111138</guid>
      <dc:creator>sam</dc:creator>
      <dc:date>2020-05-22T10:35:47Z</dc:date>
    </item>
  </channel>
</rss>

