Voronoi Diagrams
David Bateman
dbateman at dbateman.org
Mon Dec 22 15:23:13 CST 2008
Ben Abbott wrote:
> On Dec 22, 2008, at 1:43 PM, Søren Hauberg wrote:
>
>
>> man, 22 12 2008 kl. 13:25 -0500, skrev Ben Abbott:
>>
>>> ll = min (length (idx), length (c));
>>>
>> Isn't that the same as
>>
>> ll = length (c);
>>
>> ?
>>
>> Søren
>>
>>
>
> In this case yes. But I don't understand what the line below is
> accounting for.
>
> idx = find (!infi);
>
> Ben
>
I suspect the issue is my fault and not Kai's ... When importing this
code from octave-forge into Octave I tried to make it fully matlab
compatible. Matlab draws lines in the Voronoi diagram with vertices at
infinite, whereas the original octave-forge code didn't.. The get this
behavior I added a big box around the vertices to simulate vertices at
infinite, and then flagged the tesselations with a vertex at infinite
with the third return argument of __voronoi__.. However I sized this
return argument differently than the second return argument.. I suspect
the attached is a better solution to the issue, though your proposed fix
comes to much the same thing.. My patch tries to be a bit faster as it
avoid multiple resizes of one of the return arrays as well.
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: patch8912
Url: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20081222/941fa6e1/attachment.ksh
More information about the Help-octave
mailing list