[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: Intersecting geometric shapes*From*: Struan Gray <struan.gray(at)sljus.lu.se>*Date*: 2 Jul 2001 10:55:51 GMT*Distribution*: world*Newsgroups*: comp.lang.idl-pvwave*Organization*: This line intentionally left bland*References*: <3B3B8421.3080005@fsl.orst.edu> <3B3CABE3.8020502@orst.edu>*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:25493

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

**References**:**Intersecting geometric shapes***From:*Joe Means

**Re: Intersecting geometric shapes***From:*Joe Means

- Prev by Date:
**Re: pixel coordinates of a line** - Next by Date:
**Re: Repost of Vertex question...** - Prev by thread:
**Re: Intersecting geometric shapes** - Next by thread:
**Test. Please Disregard.** - Index(es):