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

Home » Public Forums » archive » Polygon hull
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
Polygon hull [message #23006] Sun, 17 December 2000 13:51
bcohen is currently offline  bcohen
Messages: 15
Registered: January 1996
Junior Member
Hi, I have an array of data and I want to plot a polygon that encompasses
all the points within it. I have tried JHU's convexhull but it fails to
encompass all the data (example below). Does anyone else have a program
to do this? I thought I'd ask before trying it myself :) Thanks! Barbara

Example of how convexhull fails in this case:

x=[0.36,0.35,0.39,0.42,0.60,0.41,0.48,0.73,0.46,0.42,0.42,0. 42,0.47,0.44,0.47,0.49,0.54,0.64,0.65]
y=[0.19,0.26,0.26,0.26,0.14,0.22,0.15,0.10,0.16,0.30,0.27,0. 27,0.23,0.23,0.22,0.16,0.16,0.08,0.08]

plot, x, y, color=0, /nodata

convexhull, x, y, xh, yh

polyfill, xh, yh, color=150, fill_pattern=50

plot, x, y, psym=7, color=0


--
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: HIST_EQUAL
Next Topic: temporary() pitfall

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

Current Time: Fri Nov 28 07:49:35 PST 2025

Total time taken to generate the page: 0.00924 seconds