[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: area enclosed by a polygon on a sphere
- Subject: Re: area enclosed by a polygon on a sphere
- From: Ronn Kling <ronn(at)rlkling.com>
- Date: Wed, 04 Aug 1999 00:58:00 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Deja.com - Share what you know. Learn what you don't.
- References: <7o4m5g$uvv$1@nnrp1.deja.com> <7o74n7$aa7$1@news.lth.se>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15964
In article <7o74n7$aa7$1@news.lth.se>,
Struan Gray <struan.gray@sljus.lu.se> wrote:
> No code, but an idea which essentially uses Green's Theorem.
>
> 1) convert lat/lon to cartesian coords
> 2) use them to make an IDLgrPolygon object
> 3) use the IDLgrTessellator object to turn that
> into a set of triangles
> 4) for each triangle work out the solid angle it
> subtends from the centre of the earth
> 5) add up the solid angles and convert to an
> area.
>
> Working out the solid angle subtended by an arbitrary
> triangle of points on the surface of a sphere is left as an
> exercise for the reader (watch out for triplets of points on
> the same great circle :-).
>
> Struan
>
I found out how to do this today. For a spherical triangle the solid
angle subtended is the sum (in radians) of the interior angles - Pi.
This can be generalized to any polygon as
Area = (sum of all interior angles) - (n-2)*Pi
Where n is the number of points.
-Ronn
--
Ronn Kling
Ronn Kling Consulting
www.rlkling.com
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.