octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [changeset] surface normals


From: Kai Habel
Subject: Re: [changeset] surface normals
Date: Mon, 10 Nov 2008 17:11:37 +0100
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]