comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Intersecting geometric shapes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Intersecting geometric shapes [message #25534] Thu, 28 June 2001 12:23 Go to next message
Joe Means is currently offline  Joe Means
Messages: 44
Registered: November 1996
Member
Hello IDL group,
I need to calculate the area of intersecting geometric shapes. Right
now a circle and rectangle. Does nayone know of code to do this?

--
Joseph E. Means
Assistant Professor, joe.means@orst.edu
Department of Forest Science
Oregon State University
Corvallis, OR 97331-5752
541-750-7351
Re: Intersecting geometric shapes [message #25605 is a reply to message #25534] Mon, 02 July 2001 03:55 Go to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Joe Means, means@fsl.orst.edu writes:

> I need to calculate the area of intersecting geometric shapes.
> Right now a circle and rectangle. Does nayone know of code to
> do this?

How accurately do you need to do this, and is there any
danger you will end up needing to deal with concave shapes
or shapes with holes in (most forests have far to many holes
in them these days :-).

IDL's object graphics has a 'tessalator' object which
will take a general polygon and give you back a set of
triangles. Finding the area of two intersecting triangles
can be solved exactly with algebra, so if you loop through
the sets of triangles from both your shapes you will get a
more accurate answer than if you use a graphical method.
The only downside is that with complicated shapes you will
have to loop through all unique permutations of a large
number of triangles, which can take, literally, forever.

Mind you, I recently needed to calculate the area of a
set of blobs which were easy for the human eye to spot, but
very hard for an automated routine to identify. Since I
only had to do the job once, I printed out image, weighed
the peice of paper, cut out all the blobs and weighed them
seperately. It worked.


Struan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: pixel coordinates of a line
Next Topic: Re: VARRAY, memory & extracting subarrays

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:48 PDT 2025

Total time taken to generate the page: 0.00472 seconds