[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33923] problem with voronoin output
From: |
Yulin Chang |
Subject: |
[Octave-bug-tracker] [bug #33923] problem with voronoin output |
Date: |
Tue, 02 Aug 2011 02:45:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.5.15-1.fc12 Firefox/3.5.15 |
URL:
<http://savannah.gnu.org/bugs/?33923>
Summary: problem with voronoin output
Project: GNU Octave
Submitted by: ychang
Submitted on: Tue 02 Aug 2011 02:45:06 AM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Yulin Chang
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.3
Operating System: GNU/Linux
_______________________________________________________
Details:
he output of the indices (F) of the voronoi diagrams is messed up:
[C,F] = voronoin(xy);
Specifically, an element of F should be the indices of those vertices
in C that form a facet (or cell called by matlab) surrounding the
correponding point in xy, i.e., the elements in F and the input points
in xy should have a one-to-one correspondence in the same order
(first element of F corresponds to first element of xy, second element
of F corresponds to second element of xy, etc.). The order is messed up,
and I can't for the life of me figure out how the elements in F are
organized. Since the main purpose of voronoin is to compute the area
surrounding each point in xy, the incorrect order makes the function
almost useless.
The problem can be checked using the following code.
x=[6,9,1,8,10,3,5,2,7,4];
y=[4,6,8,9,1,3,2,10,7,5];
[cx,cy]=voronoi(x,y);
figure; plot(x,y,'ro',cx,cy,'b-'); axis([0 11 0 11]);
% you can see the first point (6,4) is surrounded by a pentagon
xy=[x(:),y(:)];
[C,F]=voronoin(xy);
% check F, the firs element contains only three indices, clearly not
% for the first element of xy, which is (6,4). And the correct element
% for (6,4) should, obviously, contain 5 indices
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33923>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #33923] problem with voronoin output,
Yulin Chang <=