[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm |
Date: |
Wed, 30 Jun 2021 21:17:20 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 |
Follow-up Comment #20, bug #60818 (project octave):
stepping through the nD code, using a 3D example, it seems to be missing one
of the zero volume tets:
Matlab:
A = [0 0 0;
1 0 0;
0 1 0;
0 0 1;
1 1 0;
1 0 1;
0 1 1;
1 1 1;
0.5 0.5 0.5];
B = delaunay(A)
B =
3 4 1 9
3 7 9 5
8 9 7 5
8 6 9 5
8 6 7 9
9 7 4 6
3 7 4 9
3 9 2 5
9 6 2 5
9 4 2 6
9 4 1 2
3 9 1 2
size(B)
ans =
12 4
Octave old code:
>> A = [0 0 0; 1 0 0; 0 1 0; 0 0 1; 1 1 0; 1 0 1; 0 1 1; 1 1 1; 0.5 0.5 0.5]
A =
0 0 0
1.0000 0 0
0 1.0000 0
0 0 1.0000
1.0000 1.0000 0
1.0000 0 1.0000
0 1.0000 1.0000
1.0000 1.0000 1.0000
0.5000 0.5000 0.5000
>> B = delaunayn(A)
B =
5 9 2 1
5 9 3 1
6 9 2 1
6 9 4 1
6 5 9 2
6 5 8 9
7 9 3 1
7 9 4 1
7 5 9 3
7 5 8 9
7 6 9 4
7 6 8 9
>> size(B)
ans =
12 4
new code, using LU decomp for 3D:
>> B = delaunayn(A)
B =
5 3 2 1
5 9 3 1
6 4 2 1
6 9 2 1
6 9 4 1
6 5 8 2
6 5 9 2
7 9 3 1
7 9 4 1
7 5 9 3
7 5 8 9
7 6 9 4
7 6 8 9
>> size(B)
ans =
13 4
>> p12 = A(B(:,1),:)-A(B(:,2),:); p23 = A(B(:,2),:)-A(B(:,3),:); p34 =
A(B(:,3),:)-A(B
(:,4),:);
>> vol = dot (p12, cross (p23, p34, 2), 2)
vol =
0
-0.5000
0
-0.5000
0.5000
0
0.5000
0.5000
-0.5000
-0.5000
-0.5000
0.5000
0.5000
so, it left in the three 0 vol tets but dropped 2 others. will look through
to see if it's something obvious.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60818>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, (continued)
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/29
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/29
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/29
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/29
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Dmitri A. Sergatskov, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Dmitri A. Sergatskov, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm,
Nicholas Jankowski <=
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Dmitri A. Sergatskov, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Dmitri A. Sergatskov, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, Nicholas Jankowski, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/30
- [Octave-bug-tracker] [bug #60818] delaunayn - 2D code path vectorization doesn't match nD algorithm, anonymous, 2021/06/30