[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46946] isosurface throws errors where Matlab
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #46946] isosurface throws errors where Matlab does not |
Date: |
Tue, 26 Apr 2016 11:21:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #8, bug #46946 (project octave):
Dear Markus,
I recently encountered your original bug 3., thanks for fixing it.
I have some comments about your latest patch. First of all, since you compute
the square of the distances, I think you should compare with eps^2. Moreover,
max (abs (fvc.vertices(:))) is not correct: try the following set
fvc.vertices = [1,1,1;1e20,1e20,1e20;1.1,1.1,1.1;10,10,10]
You will get first, third and fourth point "very_close". The distance between
two points should be relative to the maximum 2-norm of *those two* points. I
tried the following code
x = [fvc.vertices(:,1)';fvc.vertices(:,2)';fvc.vertices(:,3)'];
IP = x' * x;
norms = diag(IP);
mutual_dist = norms+norms'-2*IP;
is_very_close = mutual_dist < SPF * eps^2 * max(norms',norms);
where SPF is some possible factor and it seems to work nice. What do you
think?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46946>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46946] isosurface throws errors where Matlab does not,
Marco Caliari <=