[changeset] surface normals
Kai Habel
kai.habel at gmx.de
Mon Nov 10 10:11:37 CST 2008
Kai Habel schrieb:
> Hello,
>
> the attached changeset adds the calculation of normals for surface
> boundaries. For the calculation of interior normals four additional
> neighbors are being used.
>
> Kai
>
Just a quick comment on the change below
+ double d = - std::max(std::max(fabs(nx), fabs(ny)), fabs(nz));
+ //double d = - sqrt (nx*nx + ny*ny + nz*nz);
It seems matlab calculates the normal vector in manner that the largest element is set to 1.0. We have set the length to 1.0 previously. I think the reason is to make the vector more human readable like
> v=[1 -0.5 0.25]
v =
1.00000 -0.50000 0.25000
versus
> v/norm(v)
ans =
0.87287 -0.43644 0.21822
>
Kai
More information about the Octave-maintainers
mailing list