[Scilab-users] Stacked 2D plot in 3D

Jean-Philippe Grivet jean-philippe.grivet at wanadoo.fr
Mon Feb 5 12:28:45 CET 2018


Hi Claus,
I tried to post an example of a stacked 2D plot but my post was held up 
due to a too large graphic
file (postscript). I have now converted this plot to png format. Here it 
is. Ypu may still be interested
in using the xpoly function, despite seeing Samuel's beautiful examples 
with param3d.
Cheers
Jean-Philippe

Le 03/02/2018 à 21:27, Samuel Gougeon a écrit :
> Le 03/02/2018 à 20:11, Claus Futtrup a écrit :
>> Hi Samuel
>>
>> Thank you. This thing with the direction of the lines is difficult to 
>> "discover" by accident. :-)
>>
>> ... And thanks for the good help for param3d(1). I hope Scilab will 
>> adopt it.
>
> When parts of curves are behind each others, there is a mess due to 
> the perspective.
> Here is a way to avoid this (i will also add it in the page):
>
> [Xo,  Yo]  =  ndgrid(-10:0.5:10);
> R  =  sqrt(Xo.*Xo  +  Yo.*Yo)  +  %eps;
> Zo  =  sin(R)./R;
>
> clf
>
> // Simple plot with messed curves in the perspective
> subplot(1,  3,  1)
> param3d1(Xo,  Yo,  Zo,  150,  85,  flag=[2,4])
>
> // With a curtain and filled curved (to avoid messed areas)
> subplot(1,3,2)
> nc  =  size(Xo,"c");
> zmin  =  min(Zo);
>
> X  =  [Xo(1,:)  ;  Xo  ;  Xo($,:)];
> Y  =  [Yo(1,:)  ;  Yo  ;  Yo($,:)];
> Z  =  [zmin*ones(1,nc)  ;  Zo  ;  zmin*ones(1,nc)];
>
> param3d1(X,  Y,  Z,  150,  85,  flag=[2,4])
> e  =  gce();
> e.children.fill_mode  =  "on";
>
> // Try to mask the curtain with %nan
> // =>unsuccessful due to the bug http://bugzilla.scilab.org/11803
> subplot(1,3,3)
> X  =  [Xo([1  1],:)  ;  Xo  ;  Xo([$  $],:)];
> Y  =  [Yo([1  1],:)  ;  Yo  ;  Yo([$  $],:)];
> Z  =  [[zmin  ;  %nan]*ones(1,nc)  ;  Zo  ;  [%nan  ;  zmin]*ones(1,nc)];
>
> param3d1(X,  Y,  Z,  150,  85,  flag=[2,4])
> e  =  gce();
> e.children.fill_mode  =  "on";
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180205/133b062e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ienkeelbbkjkgmal.png
Type: image/png
Size: 18027 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20180205/133b062e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ech.png
Type: image/png
Size: 7582 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20180205/133b062e/attachment-0001.png>


More information about the users mailing list