title: How to determine shape is Semicircle by given point collection?
body: <p>Here is point collection of polygons</p>
  
  <pre><code>&lt;Polygon Points="24,188,24,183,25,176,26,172,29,166,33,160,38,155,44,151,50,148,54,147,61,146,67,146,74,147,78,148,84,151,90,155,95,160,99,166,102,172,103,176,104,183,104,188" Stroke="Black" StrokeThickness="1" /&gt;
  &lt;Polygon Points="568,263,520,263,520,256,521,253,523,249,526,245,531,241,536,239,540,238,548,238,552,239,557,241,562,245,565,249,567,253,568,256,568,263" Stroke="Black" StrokeThickness="1" /&gt;
  </code></pre>
  
  <p>that gives me below shapes.</p>
  
  <p><a href="https://i.stack.imgur.com/VzNkQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VzNkQ.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/NeHcn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NeHcn.png" alt="enter image description here"></a></p>
  
  <p>I need to check the shape is a semicircle or not?
  Please anyone can guide me to determine. Is it semicircle?</p>
  
  <p>I will only get collection before drawing only I should determine the shapes. It can be any(Rectangle, Line, Semicircle, curve etc.)I am able to find a rectangle, triangle and lines shape from point collection.
  like for a rectangle, I am checking its opposite faces should be equal and inside angle should be 90 degrees.</p>
  
  <pre><code>  public bool IsRectangle()
          {                
              var pointColl = polygon.PointCollection;
              bool isRightAngle = false;
  
              if (polygon == null || pointColl == null)
              {
                  return false;
              }
              if (pointColl.Count == 5)
              {
                  double length1 = (pointColl[0] - pointColl[1]).LengthSquared;
                  double width1 = (pointColl[1] - pointColl[2]).LengthSquared;
                  double length2 = (pointColl[2] - pointColl[3]).LengthSquared;
                  double width2 = (pointColl[3] - pointColl[0]).LengthSquared;
  
                  if ((length1 == length2 &amp;&amp; length1 != 0) &amp;&amp; (width1 == width2 &amp;&amp; width1 != 0))
                      isRightAngle = CalculateAngle(polygon);
              }
              else
              {
                  isRightAngle = false;
              }
  </code></pre>
  
  <p>Can I write something like this for a semicircle or circular shape detection?
  Thanks in advance.</p>