Voronoi Diagrams
David Bateman
dbateman at dbateman.org
Mon Dec 29 15:53:37 CST 2008
Ryan Matthew Balfanz wrote:
> Hi All,
> I've changed the the lines starting from line number 127 to the following:
> --
> #idx = find (!infi); # Original
> idx = find ( ! resize (infi, size(c))); # Modified
>
> ll = length (idx); # Original
> #ll = min (length (idx), length (c)); # Modified
> --
> and get strange output.
>
> My input file can be found at http://www.phy.ilstu.edu/~rbalfanz/voronoi/inp.dat
> The output can be found at
> http://www.phy.ilstu.edu/~rbalfanz/voronoi/voronoi.pdf
>
>
> To get my results do the following in octave:
> --
> load inp.dat
> voronoi(inp(:,2), inp(:,3))
> --
>
> For the curious, columns 2 and 3 of inp.dat are positional data of
> galaxies. I'm having no trouble in MatLab working with this data even
> though individual points can be extremely close to one another.
>
>
>
That is a surprising result... It appears that Qhull's Voronoi algorithm
has some sort of threshold of whether the distance between a point is
considered significant or not that is relative to the distance between
two points and the maximum distance between any point. Unfortunately the
external box I added to get the matlab compatibiliy works well for
convhull and needs to be extremely large in that case to approximate a
box at infinite. However, it causes issues for voronoi. For now set
scale to something smaller then 1e4 (say scale = 1e2) and it should
work.. I'll look at a better fix soon.
D.
--
David Bateman dbateman at dbateman.org
35 rue Gambetta +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob)
More information about the Help-octave
mailing list