<?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: Generate ellipse polygon based on 4 mappoints in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/generate-ellipse-polygon-based-on-4-mappoints/m-p/247521#M1186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Assuming the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;center.X = Width/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;center.Y = Height/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;xRadius = Width/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;yRadius = Height/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could create an ellipse by slightly modifying the code posted in this thread (quoted below with my modifications):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/77161-draw-circles-on-the-graphics-layer?p=270965&amp;amp;viewfull=1#post270965" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/77161-draw-circles-on-the-graphics-layer?p=270965&amp;amp;viewfull=1#post270965&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private ESRI.ArcGIS.Client.Geometry.Polygon DrawCircle(ESRI.ArcGIS.Client.Geometry.MapPoint center, double radius, int pointsCount = 360) {
 ESRI.ArcGIS.Client.Geometry.Polygon p = new ESRI.ArcGIS.Client.Geometry.Polygon();
 ESRI.ArcGIS.Client.Geometry.PointCollection pcol = new ESRI.ArcGIS.Client.Geometry.PointCollection();
 double slice = 2 * Math.PI / pointsCount;
 for (int i = 0; i &amp;lt;= pointsCount; i++) {
&amp;nbsp; double rad = slice * i;
&amp;nbsp; double px = center.X + xRadius * Math.Cos(rad);
&amp;nbsp; double py = center.Y + YRadius * Math.Sin(rad);
&amp;nbsp; pcol.Add(new ESRI.ArcGIS.Client.Geometry.MapPoint(px, py));
 }
 p.Rings.Add(pcol);
 return p;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:19:20 GMT</pubDate>
    <dc:creator>AaronHigh</dc:creator>
    <dc:date>2021-12-11T12:19:20Z</dc:date>
    <item>
      <title>Generate ellipse polygon based on 4 mappoints</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/generate-ellipse-polygon-based-on-4-mappoints/m-p/247520#M1185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Given 4 mapPoints I would like to generate the ellipse polygon that is enclosed within the 4 mapPoints. Is there any built in functionality that I could use to accomplish this, or does anyone have any idea of how it can be achieved? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Sep 2013 13:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/generate-ellipse-polygon-based-on-4-mappoints/m-p/247520#M1185</guid>
      <dc:creator>ae</dc:creator>
      <dc:date>2013-09-07T13:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generate ellipse polygon based on 4 mappoints</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/generate-ellipse-polygon-based-on-4-mappoints/m-p/247521#M1186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Assuming the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;center.X = Width/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;center.Y = Height/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;xRadius = Width/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;yRadius = Height/2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could create an ellipse by slightly modifying the code posted in this thread (quoted below with my modifications):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/77161-draw-circles-on-the-graphics-layer?p=270965&amp;amp;viewfull=1#post270965" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/77161-draw-circles-on-the-graphics-layer?p=270965&amp;amp;viewfull=1#post270965&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private ESRI.ArcGIS.Client.Geometry.Polygon DrawCircle(ESRI.ArcGIS.Client.Geometry.MapPoint center, double radius, int pointsCount = 360) {
 ESRI.ArcGIS.Client.Geometry.Polygon p = new ESRI.ArcGIS.Client.Geometry.Polygon();
 ESRI.ArcGIS.Client.Geometry.PointCollection pcol = new ESRI.ArcGIS.Client.Geometry.PointCollection();
 double slice = 2 * Math.PI / pointsCount;
 for (int i = 0; i &amp;lt;= pointsCount; i++) {
&amp;nbsp; double rad = slice * i;
&amp;nbsp; double px = center.X + xRadius * Math.Cos(rad);
&amp;nbsp; double py = center.Y + YRadius * Math.Sin(rad);
&amp;nbsp; pcol.Add(new ESRI.ArcGIS.Client.Geometry.MapPoint(px, py));
 }
 p.Rings.Add(pcol);
 return p;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:19:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/generate-ellipse-polygon-based-on-4-mappoints/m-p/247521#M1186</guid>
      <dc:creator>AaronHigh</dc:creator>
      <dc:date>2021-12-11T12:19:20Z</dc:date>
    </item>
  </channel>
</rss>

