[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes retur
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int |
Date: |
Tue, 12 Sep 2023 12:26:30 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?64658>
Summary: delaunay / delaunayn - sometimes return empty if
inputs are of type int
Group: GNU Octave
Submitter: nrjank
Submitted: Tue 12 Sep 2023 12:26:28 PM EDT
Category: Octave Function
Severity: 2 - Minor
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Nicholas Jankowski
Originator Email:
Open/Closed: Open
Release: 8.3.0
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 12 Sep 2023 12:26:28 PM EDT By: Nicholas Jankowski <nrjank>
for some inputs, delaunayn is fine if the points are specified as doubles or
ints:
for one simplex:
>> pts = [0 0 0; 0 10 0; 10 0 0; 0 0 10]
>> delaunayn(pts)
ans =
1 3 2 4
>> delaunayn(int32(pts))
ans =
1 3 2 4
or multiple:
>> pts = [0 0 0; 0 10 0; 10 0 0; 0 0 10; 5 5 5]
>> delaunayn(pts)
ans =
5 2 3 1
5 3 4 1
5 4 2 1
>> delaunayn(int32(pts))
ans =
5 2 3 1
5 3 4 1
5 4 2 1
but at some point, the type seems to make a difference:
>> pts = [0 0 0; 0 0 10; 0 10 0; 0 10 10; 10 0 0; 10 0 10; 10 10 0; 10 10 10;
5 5 5];
>> delaunayn(pts)
ans =
7 5 9 1
7 9 3 1
6 9 5 1
6 2 9 1
6 9 7 5
6 8 7 9
4 3 9 1
4 9 2 1
4 7 9 3
4 7 8 9
4 9 6 2
4 8 6 9
>> delaunayn(int32(pts))
ans = [](0x4)
stepping through delaunayn for the case above, both come out of the
___delaunayn___ simplex calculation the same. it seems having the pts as ints
going into the volume check creates erroneous evaluations of the simplex
volume, and it removes them all as 'trivial' simplexes. recasting pts as
double should be the easiest fix.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64658>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int,
Nicholas Jankowski <=
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int, Nicholas Jankowski, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int, Nicholas Jankowski, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int, Markus Mützel, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int, Markus Mützel, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int, Nicholas Jankowski, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunay / delaunayn - sometimes return empty if inputs are of type int, Nicholas Jankowski, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunayn - calculations with integer inputs removes valid simplices, Nicholas Jankowski, 2023/09/12
- [Octave-bug-tracker] [bug #64658] delaunayn - calculations with integer inputs removes valid simplices, Markus Mützel, 2023/09/13