bugGNU Octave - Bugs: bug #40247, patch chooses wrong vertex for...

 
 

bug #40247: patch chooses wrong vertex for coloring face

Submitter:  Rik <rik5>
Submitted:  Fri 11 Oct 2013 06:02:09 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 14 Dec 2013 06:36:58 AM UTC, comment #1: 

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/647d806868ee).  There is still an issue with "interp" shading in that the colors match the Mac version of Matlab, but not the Linux version.

Rik <rik5>
Group administrator
Fri 11 Oct 2013 06:02:09 PM UTC, original submission:  

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].


Rik <rik5>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-12-14 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code