[Scilab-users] Facet color in Vers. 5.5.2

Rafael Guerra jrafaelbguerra at hotmail.com
Sat Nov 12 23:44:51 CET 2016


Jens,

Quite interesting finding about the facets' orientation which does not seem to be documented.
The definition of "hiddencolor" as the color of the "rear" face loses then its meaning...
Is this a bug or an undocumented feature?

Regards,
Rafael

From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom
Sent: Saturday, November 12, 2016 8:55 PM
To: users at lists.scilab.org
Subject: Re: [Scilab-users] Facet color in Vers. 5.5.2

Hi Rafeal,
Your code is fine. However I was looking for a more general use of plot3d beyond a rectangular mesh.
In the meantime I have found the solution. It is just the realisation that the hidden color can be the obvious one. See the following snippet.

plot3d([0 2 0]',[0 0 1]',[0 0 0.2 ]')
ce=gce();
ce.color_mode=5;// red
ce.hiddencolor=3; //green
//
plot3d([0 0 2]',[0 1 0]',0.5+[0 0 -0.2 ]')//same points, reverse orientation
ce=gce();
ce.color_mode=5;// red
ce.hiddencolor=3;//green
ca=gca(); ca.rotation_angles = [85,-60];

It seems that the data points sequence generates an oriented facet. Its positive side is painted by the "hidden" color.  But this is a surmise only.

Regards
Jens
-------------------------------------------------------------
Am 12.11.2016 13:49, schrieb Rafael Guerra:
Hi Jens,

You need a proper input to plot3d (x and y monotonous with length n1 and n2, and z with size n1 x n2):

clear; clf();
plot3d([0 1],[0 1],[0 0; 0 0])
ce=gce();
ce.color_flag=0;
ce.color_mode=5;  // 5 = red; 1 = black

Regards,
Rafael

From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom
Sent: Saturday, November 12, 2016 12:00 PM
To: Users mailing list for Scilab <users at lists.scilab.org><mailto:users at lists.scilab.org>
Subject: [Scilab-users] Facet color in Vers. 5.5.2

Hi Scilab experts,
please help me to get the facet black, not cyan.

plot3d([0 1 1 0]',[0 0 1 1 ]',[0 0 0 0]')
ce=gce();
ce.color_flag=0;// Help page says: "All facets are painted using the color index and method defined by color_mode"
ce.color_mode=1//Help page says: "The color of the facet when color_flag value is 0" Index 1 should produce Black, but CYAN is delivered.
//getcolor

Regards
Jens




_______________________________________________

users mailing list

users at lists.scilab.org<mailto:users at lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161112/a8872fb5/attachment.htm>


More information about the users mailing list