<?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: How to find angle between 3 points in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-find-angle-between-3-points/m-p/371160#M1851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a programming language agnostic definition would be&lt;/P&gt;&lt;P&gt;take 3 sequential points&amp;nbsp; p0, p1, p2, subtract their coordinates and determine their respective angles, then derive the differences&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; (d1_x, d1_y) = d1 = p0 - p1&amp;nbsp; yields the differences in the x and y coordinates&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (d2_x, d2_y) = d2 = p2 - p1&amp;nbsp; ditto&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ang1 = arctan2(d1_y, d1_x)&amp;nbsp; (d1's y, and x differences)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ang2 =arctan2(d2_y, d2_x)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ang = (ang2 - ang1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ang_deg = degrees(ang) &amp;nbsp;&amp;nbsp; to convert from radians to degrees if needed&lt;/P&gt;&lt;P&gt;note you need your language's implementation of arctan2 not atan and that most use arctan(dy, dx) unlike spreadsheets which reverse these.&amp;nbsp; This avoids messy uses of arccos and dot products as normally shown in textbook equations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2019 10:00:13 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-03-19T10:00:13Z</dc:date>
    <item>
      <title>How to find angle between 3 points</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-find-angle-between-3-points/m-p/371159#M1850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please tell us how to find angle between 3 points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 06:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-find-angle-between-3-points/m-p/371159#M1850</guid>
      <dc:creator>Girishchandra_Yendargaye</dc:creator>
      <dc:date>2019-03-19T06:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to find angle between 3 points</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-find-angle-between-3-points/m-p/371160#M1851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a programming language agnostic definition would be&lt;/P&gt;&lt;P&gt;take 3 sequential points&amp;nbsp; p0, p1, p2, subtract their coordinates and determine their respective angles, then derive the differences&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; (d1_x, d1_y) = d1 = p0 - p1&amp;nbsp; yields the differences in the x and y coordinates&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (d2_x, d2_y) = d2 = p2 - p1&amp;nbsp; ditto&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ang1 = arctan2(d1_y, d1_x)&amp;nbsp; (d1's y, and x differences)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ang2 =arctan2(d2_y, d2_x)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ang = (ang2 - ang1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ang_deg = degrees(ang) &amp;nbsp;&amp;nbsp; to convert from radians to degrees if needed&lt;/P&gt;&lt;P&gt;note you need your language's implementation of arctan2 not atan and that most use arctan(dy, dx) unlike spreadsheets which reverse these.&amp;nbsp; This avoids messy uses of arccos and dot products as normally shown in textbook equations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 10:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-find-angle-between-3-points/m-p/371160#M1851</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-03-19T10:00:13Z</dc:date>
    </item>
  </channel>
</rss>

