Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know anything about Matlab's function, but here we go. Consider splitting your spherical polygon into spherical triangles, say by drawing diagonals from a vertex. The surface area of a spherical triangle is given by</p> <pre><code>R^2 * ( A + B + C - \pi) </code></pre> <p>where <code>R</code> is the radius of the sphere, and <code>A</code>, <code>B</code>, and <code>C</code> are the interior angles of the triangle (in radians). The quantity in the parentheses is known as the "spherical excess".</p> <p>Your <code>n</code>-sided polygon will be split into <code>n-2</code> triangles. Summing over all the triangles, extracting the common factor of <code>R^2</code>, and bringing all of the <code>\pi</code> together, the area of your polygon is</p> <pre><code>R^2 * ( S - (n-2)\pi ) </code></pre> <p>where <code>S</code> is the angle sum of your polygon. The quantity in parentheses is again the spherical excess of the polygon.</p> <p>[edit] This is true whether or not the polygon is convex. All that matters is that it <em>can</em> be dissected into triangles.</p> <p>You can determine the angles from a bit of vector math. Suppose you have three vertices <code>A</code>,<code>B</code>,<code>C</code> and are interested in the angle at <code>B</code>. We must therefore find two tangent vectors (their magnitudes are irrelevant) to the sphere from point <code>B</code> along the great circle segments (the polygon edges). Let's work it out for <code>BA</code>. The great circle lies in the plane defined by <code>OA</code> and <code>OB</code>, where <code>O</code> is the center of the sphere, so it should be perpendicular to the normal vector <code>OA x OB</code>. It should also be perpendicular to <code>OB</code> since it's tangent there. Such a vector is therefore given by <code>OB x (OA x OB)</code>. You can use the right-hand rule to verify that this is in the appropriate direction. Note also that this simplifies to <code>OA * (OB.OB) - OB * (OB.OA) = OA * |OB| - OB * (OB.OA)</code>.</p> <p>You can then use the good ol' dot product to find the angle between sides: <code>BA'.BC' = |BA'|*|BC'|*cos(B)</code>, where <code>BA'</code> and <code>BC'</code> are the tangent vectors from <code>B</code> along sides to <code>A</code> and <code>C</code>.</p> <p>[edited to be clear that these are tangent vectors, not literal between the points]</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload