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

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

[Octave-bug-tracker] [bug #40247] patch chooses wrong vertex for colorin


From: Rik
Subject: [Octave-bug-tracker] [bug #40247] patch chooses wrong vertex for coloring face
Date: Fri, 11 Oct 2013 18:02:10 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

URL:
  <http://savannah.gnu.org/bugs/?40247>

                 Summary: patch chooses wrong vertex for coloring face
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Fri 11 Oct 2013 11:02:09 AM PDT
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

According to the documentation, with "facecolor" = "flat", the patch color is
taken from the first vertex specified in the "faces" property.  Octave is
using some other algorithm.  Likely fix will be in gl-render.cc.

The following example should produce a red face.


v  = [0 0 0;1 0 0;1 1 0;0 1 0];
f = [1 2 3 4];
fvc = [1 0 0;0 1 0;1 0 1;1 1 0];
h = patch ("Vertices",v,"Faces",f,"FaceVertexCData",fvc,
           "FaceColor","flat","EdgeColor","flat",
           "Marker","o","MarkerFaceColor","flat")


Specifying a different first vertex, should change the color.  So, 


set (h, "faces", [4 3 2 1])


should color the face yellow because the 4th vertex (which is listed first and
thus sets the color) facevertexcdata value is [1 1 0].






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40247>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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