Bug in IDL routines VERONOI or TRIANGULATE ?! [message #1263] |
Thu, 19 August 1993 08:09 |
black
Messages: 39 Registered: August 1992
|
Member |
|
|
IDL v3.1.0
I tried out the IDL routine VERONOI yesterday and did the example code to
demonstrate the VERONOI routine in the help utility. Viz
x = randomu(seed, n) ;Random grid of N points
y = randomu(seed, n)
triangulate, x, y, tr, CONN=c ;Triangulate it
for i=0, n-1 do begin
voronoi, x, y, i, c, xp, yp ;Get the ith polygon
polyfill, xp, yp, color = (i mod 10) + 2 ;Draw it
endfor
The results are interesting because they look reasonable, except that at 3 or
4 points on the edge of the region where the points are, the coloured
regions (marking out the veronoi sells) shoot off to a point well outside
the area where the points are. Does anyone know which of the two routines the
bug is in? And if it is in VERONOI what the fix is? (I know TRIANGULATE is a
system routine, so that can't de fixed, unless the output can be fixed that
is!)
|
|
|