[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54896] voronoi produces no edges for provided
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #54896] voronoi produces no edges for provided data |
Date: |
Wed, 31 Oct 2018 00:42:59 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 |
Update of bug #54896 (project octave):
Category: Libraries => Octave Function
Release: 4.2.1 => dev
_______________________________________________________
Follow-up Comment #6:
As I understand it, Matlab still uses QHull. It just doesn't expose the API
to programmers anymore. With Matlab, you are stuck using whatever options
they think are appropriate.
But, I don't think this is a problem with the QHull library. The voronoi
function in voronoi.m does post-processing on the edges found. I think there
may be an issue there. The code is
if (numel (x) > 2)
## Eliminate the edges of the diagram representing the box.
## Exclude points outside a certain radius from the center of
distribution.
## FIXME: Factor should be at least 1.0. Octave uses 1.1 for margin.
## There is no theoretical justification for this choice.
ctr = [(xmax + xmin)/2 , (ymax + ymin)/2];
radius = 1.1 * sumsq ([xmin, ymin] - ctr);
dist = sumsq (p - ctr, 2);
p_inside = (1:rows (p))(dist < radius);
edge_inside = any (ismember (edges, p_inside));
edges = edges(:, edge_inside);
If I change the factor from 1.1 to 100.1 then I get a figure equivalent to
Matlab. If I comment out the code completely I get an en equivalent figure as
well.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54896>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/