Discussion:
[Scilab-users] plot3d and param3d
Carrico, Paul
2018-11-06 11:28:47 UTC
Permalink
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
Stéphane Mottelet
2018-11-06 11:31:47 UTC
Permalink
Hello,

have you checked that the line is not *behind* the surface ?

S.
Post by Carrico, Paul
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();
/**Cet email ne contient pas de données techniques
This email does not contain technical data*
_______________________________________________
users mailing list
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
s***@free.fr
2018-11-06 11:55:56 UTC
Permalink
Hello Paul,

Your polyline is directly e2, not any child p2.

Samuel
Carrico, Paul
2018-11-06 12:53:58 UTC
Permalink
Indeed, thanks to all

Still there're some aspects I'veto go deeper in under to master it

Paul

-----Message d'origine-----
De : users [mailto:users-***@lists.scilab.org] De la part de ***@free.fr Envoyé : mardi 6 novembre 2018 12:56 À : Users mailing list for Scilab Objet : [EXTERNAL] [Scilab-users] Re : plot3d and param3d

Hello Paul,

Your polyline is directly e2, not any child p2.

Samuel
_______________________________________________
users mailing list
***@lists.scilab.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DwICAg&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=06xjdU3im4DE2mvBZxSuYXRyj8lt8TS2dyTCsEsq1z4&s=ViFKyLfML08_3_lTNfsFMm6wOq8_vdGAM4Qg8IBGLd8&e=

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

Loading...