You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, the isosurface function produces opposite clock-wise node orders in the output isosurface mesh. this makes the octave surface normal direction flipped compared to the expected direction as those computed in matlab.
here is an example
[xi,yi,zi]=meshgrid(0:60,0:60,0:60);
vol=((xi-30).*(xi-30)+(yi-30).*(yi-30)+(zi-30).*(zi-30))<400;
vol((xi-30).*(xi-30)+(yi-30).*(yi-30)+(zi-30).*(zi-30)<100)=0;
iso=isosurface(double(vol));
nn=nodesurfnorm(iso.vertices, iso.faces);
plotmesh(iso.vertices, iso.faces, 'z<40', 'facealpha', 0.4)
hold on
plotmesh(iso.vertices+nn*0.3, 'z<40', 'r.')
the below plot shows the discrepancy - in matlab, normal direction points from low-to-high across the isosurface threshold, but octave points from high-to-low
The text was updated successfully, but these errors were encountered:
This was initially reported by Josef Probst, and lately by Vincent in the below mailing list thread
https://groups.google.com/g/mcx-users/c/OYRhYRAyFg8
Apparently, the
isosurface
function produces opposite clock-wise node orders in the output isosurface mesh. this makes the octave surface normal direction flipped compared to the expected direction as those computed in matlab.here is an example
the below plot shows the discrepancy - in matlab, normal direction points from low-to-high across the isosurface threshold, but octave points from high-to-low
The text was updated successfully, but these errors were encountered: