[Scilab-users] plot3d and param3d

classic Classic list List threaded Threaded
4 messages Options
Carrico, Paul Carrico, Paul
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] plot3d and param3d

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

 


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: plot3d and param3d

Hello,

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

S.

Le 06/11/2018 à 12:28, Carrico, Paul a écrit :

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

 



_______________________________________________
users mailing list
[hidden email]
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

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Re : plot3d and param3d

In reply to this post by Carrico, Paul
Hello Paul,

Your polyline is directly e2, not any child p2.

Samuel
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Carrico, Paul Carrico, Paul
Reply | Threaded
Open this post in threaded view
|

Re: [EXTERNAL] Re : plot3d and param3d

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:[hidden email]] De la part de [hidden email] 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
[hidden email]
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
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users