Contour with parametric surface ?

Pascal Grandeau pgrandeau at wanadoo.fr
Mon Aug 10 13:22:22 CEST 2009


I have a parametric surface x=x(u,v);y=y(u,v);z=z(u,v); I know how to 
plot it with eval3dp, for example, or surf but I don't know how to draw 
2d contours for such a surface.
So, I need the Scilab equivalent of contour(x,y,z,n) in Matlab when x, y 
and z are matrices of the grid.
In Scilab, it seems that contour2d(x,y,z,n) needs x and y as vectors but 
with a parametric surface, how can I get x and y as vectors ?
It is easy to get x,y and z as matrices (the grid) but this cannot be 
used with contour2d in Scilab.

I get the plot of the surface with the code  :

r = 0:0.1:1;
s = -%pi/4:0.1:%pi/4;
[u,v] = meshgrid(r,s);
F=x(u,v);
G=y(u,v);
H=z(u,v);
surf(F,G,H);

but so, F, G and H are matrices so I cannot use them with contour2d.

Can you help me ?
Thank you.

Pascal Grandeau





More information about the users mailing list