[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53397] Delaunay returns inconsistent (cw/ccw)
From: |
A.R. Burgers |
Subject: |
[Octave-bug-tracker] [bug #53397] Delaunay returns inconsistent (cw/ccw) orientations in 2-D (needs overhaul) |
Date: |
Sat, 19 Feb 2022 16:45:41 -0500 (EST) |
Follow-up Comment #5, bug #53397 (project octave):
The proposed m-code solution in the [comment #0 original submission] is still
valid, and is fully vectorized, so no urgent need to go to c++? We are
calculating the cross product already anyway. (wasn't the case at the time
when this bug was submitted)
Could be as simple as this (untested)
diff -r 753e48aa488c scripts/geometry/delaunayn.m
--- a/scripts/geometry/delaunayn.m Sat Feb 19 13:14:44 2022 -0500
+++ b/scripts/geometry/delaunayn.m Sat Feb 19 22:41:37 2022 +0100
@@ -110,6 +110,8 @@
det = cross (p12, p23, 2);
idx = abs (det (:,3) ./ sqrt (sumsq (p12, 2))) < tol & ...
abs (det (:,3) ./ sqrt (sumsq (p23, 2))) < tol;
+ is_clockwise = det(:,3) > 0;
+ T(is_clockwise,2:3) = T(is_clockwise,[3,2]);
else
## FIXME: Vectorize this for loop or convert delaunayn to .oct function
idx = [];
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?53397>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #53397] Delaunay returns inconsistent (cw/ccw) orientations in 2-D (needs overhaul),
A.R. Burgers <=