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 
Return to the default flat view Create a new topic Submit Reply
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
[Message index]
 
Read Message
Read Message
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: Thu Oct 09 21:11:02 PDT 2025

Total time taken to generate the page: 2.63703 seconds