[Scilab-users] plot3d and param3d

Carrico, Paul paul.carrico at esterline.com
Tue Nov 6 12:28:47 CET 2018


Dear All

I'm trying to superimpose a basic line onto a 3D surface, but none of the parameters (color, thickness and so on)  I'm trying to implement works: what I'm doing wrong?

Thanks for your support

Paul


mode(0);
clear

function [z]=saddle(x, y)
    z = x^2 - y^2
endfunction

n = 100;
x = linspace(-2,2,n)'; // (n,1) matrix
y = linspace(-1,3,n)'; // (n,1) matrix
z = feval(x, y, saddle); // (n,n) matrix

Line = [1 -2 -3 ; -2 -2 -3];

// plot
scf(0);
drawlater();
f = gcf();
f.figure_size = [1000, 1000];
f.background = color(255,255,255);
a = gca();
a.font_size = 2;
a.x_label.text = '$X$';
a.x_label.font_size = 4;
a.y_label.text = '$Y$';
a.Y_label.font_size = 4;
a.z_label.text = "$\sigma$";
a.z_label.font_size = 4;
plot3d(x, y, feval(x, y, saddle));
surf = gce();
curve=gce();

param3d(Line(:,1),Line(:,2),Line(:,3));
e2 = gce();
p2 = e2.children;
p2.thickness = 2 ;
p2.foreground = color(255,0,0);
p2.line_Style = 1;
p2.mark_mode="on";
p2.mark_style = 0;
p2.mark_size_unit="tabulated";
p2.mark_size = 1;
p2.mark_foreground = color(255,0,0);
p2.mark_background = color(255,0,0);

drawnow();

EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data

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


More information about the users mailing list