octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #8951] Calculate vertexnormals for patch o


From: Markus Mützel
Subject: [Octave-patch-tracker] [patch #8951] Calculate vertexnormals for patch objects
Date: Sat, 16 Apr 2016 10:55:54 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #7, patch #8951 (project octave):

Pantxo:
Thank you for the link to Newill's method and your other suggestions.

The attached patch uses it to calculate the facenormals for non triangular
faces.

I would personally prefer to leave "normalmode" in as a hidden property
because I have some Matlab code using it and I would like to see it running in
Octave without too many "if"s.

I am waiting with changes to the calculation of vertexnormals for
non-triangular faces for bug #47677.
Are you aware of a fast way to check whether a set of points lies in one plain
(same normal for all vertices) or, in a following step, how to group them in
"sub-plains" if necessary (same normals for all normals in each group)?
I was thinking about checking whether the triple product was zero for all
series of four subsequent face corners. But maybe there is something more
efficient.

If "*NormalsMode" is set to "auto", normals are only calculated if lights are
present (and visible?) in the same axes and if lighting is active for the
patch. I don't know what Matlab is doing exactly. But that seemed reasonable
to me.
I am going to change patch #8943 to account for this if you think this is the
right way to go.

To always get the normals, set the "*NormalsMode" to the "non-standard" value
"always".

Probably, it is possible to use some of the facenormals to speed up the
calculation of vertexnormals if both are in mode "auto" or "always". But the
facenormals for non-planar faces are probably not the right ones to use for
the vertexnormals.

I tried with patches with several 1000 vertices and faces and did not notice
any obvious speed impact. However, I am not sure how to time this exactly.

I will adapt the doc string and tests when we are sure enough that nothing
will change dramatically.

(file #36949)
    _______________________________________________________

Additional Item Attachment:

File name: patch_normals.patch            Size:18 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8951>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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