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

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

[Octave-bug-tracker] [bug #54922] demo surfl 1 fails


From: Rik
Subject: [Octave-bug-tracker] [bug #54922] demo surfl 1 fails
Date: Wed, 31 Oct 2018 17:21:29 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Update of bug #54922 (project octave):

                  Status:         Patch Submitted => Patch Reviewed         

    _______________________________________________________

Follow-up Comment #3:

I agree that we don't want to calculate the normals unless it is necessary.

Matlab
(http://www.mathworks.com/help/matlab/ref/matlab.graphics.primitive.surface-properties.html)
is a little unclear about when it calculates the normals.  "If you do not
specify normal vectors, then the surface generates this data for lighting
calculations."  Does that mean only when a light object is added?  Only when
the "facelighting" property changes?

If you have access to Matlab the following code would be useful to test.


Z = peaks ();
h = surf (Z, 'facelighting', 'none');
get (h, 'facelighting')
get (h, 'vertexnormals')
set (h, 'facelighting', 'gouraud')
get (h, 'vertexnormals')
hl = light ();
get (h, 'vertexnormals')


In the NEWS section, the description begins


 ** "FaceNormals" and "EdgeNormals" for patch and surface graphic


But, I don't see any graphic property called "EdgeNormals" for patches or
surfaces.  Should this be "VertexNormals"?

I think it would be a good idea to add to the description in NEWS the
conditions required before the "*Normals" will be calculated.  Something, like
'The "FaceLighting" property must be set to "flat" (FaceNormals) or "gouraud"
(VertexNormals), AND a light object must be present in the axes, before any
normals will be calculated.

I would add a FIXME note in surfl.m above where you create a light object and
then immediately delete it.  Without any explanation, it looks weird, and
someone at a later date might come along and try to clean up the code by
removing it.

Finally, and this might be the subject of a separate bug report, the
documentation for surfl says


The default lighting mode "cdata", changes the cdata property of
the surface object to give the impression of a lighted surface.
*Warning:* The alternative mode "light" mode which creates a light
object to illuminate the surface is not implemented (yet).


Since light objects now exist, couldn't this option be implemented?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54922>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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