[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65421] patch/cdata does not work.
From: |
Liang Tang |
Subject: |
[Octave-bug-tracker] [bug #65421] patch/cdata does not work. |
Date: |
Wed, 6 Mar 2024 08:02:26 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65421>
Summary: patch/cdata does not work.
Group: GNU Octave
Submitter: lt1234
Submitted: Wed 06 Mar 2024 01:02:26 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: lt1234
Originator Email:
Open/Closed: Open
Release: 8.2.0
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 06 Mar 2024 01:02:26 PM UTC By: Liang Tang <lt1234>
patch/cdata does not work. It leads to an warning below, which should have
been an error. Thanks.
warning: opengl_renderer: some vertices in "faces" property are undefined.
Not rendering.
facevertexcdata is undocumented. But it works except RGB input.
P = [ 2.5 7.5
6.5 7.0
2.5 5.5
6.5 6.0
1.0 6.5
8.0 6.5]
T = [5 3 1;
1 4 2;
1 3 4;
4 6 2];
D=20;
D=round( 64*rand(size(P,1), 1)); % index to colormap
D=round(255*rand(size(P,1), 3)); % RGB
D=round(125*rand(size(P,1), size(T,1))); % don't make sense what this is
for
D=round(125*rand(size(T,1), size(P,1))); % Not an option in Octave
documentation; don't make sense what this is for
D=round( 64*rand(size(T,1), 1)); % Not an option in Octave
documentation
D=round(255*rand(size(T,1), 3)); % Not an option in Octave
documentation
% none would work
patch(...
'Vertices', P, ...
'CData', D, % 'FaceVertexCData', D, % Octave facevertexcdata is
undocumented.
'Faces', T,...
'FaceColor', 'interp',...
'EdgeColor', 'interp',...
'FaceAlpha', 0.5,...
'LineWidth', 2);
Documentation:
cdata: scalar | matrix, def. [](0x0)
Data defining the patch object color. Patch color can be defined for faces or
for vertices.
If cdata is a scalar index into the current colormap or a RGB triplet, it
defines the color of all faces.
If cdata is an N-by-1 vector of indices or an N-by-3 (RGB) matrix, it defines
the color of each one of the N faces.
If cdata is an N-by-M or an N-by-M-by-3 (RGB) matrix, it defines the color at
each vertex.
facevertexcdata is undocumented.
N is size of Vertices matrix. (P here)
colormap is 64x3.
RGB is 0-255.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65421>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65421] patch/cdata does not work.,
Liang Tang <=
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Nicholas Jankowski, 2024/03/06
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Liang Tang, 2024/03/06
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Nicholas Jankowski, 2024/03/06
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Nicholas Jankowski, 2024/03/07
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Liang Tang, 2024/03/07
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Liang Tang, 2024/03/07
[Octave-bug-tracker] [bug #65421] patch fails to render if cdata is specified before geometry, Dmitri A. Sergatskov, 2024/03/07