Voronoi Diagrams

David Bateman dbateman at dbateman.org
Mon Dec 29 16:44:16 CST 2008


David Bateman wrote:
> 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.
>
Ok it appears that yes the box is needed, but scale can be as small as 
2... In any case working on this I found the attached speedup to this 
function that should double its speed... The plotting with gnuplot is 
still really sssslllloooowwwww though.

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)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.tip
Url: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20081229/d3798959/attachment-0001.ksh 


More information about the Help-octave mailing list