Hi Calixte,<br><br>thank you for the code snippet. It works well, but may I ask another question?<br>I want to "turn" the plot with alpha and theta angle. I want to do that to take screencapters from each position for an animation.  but when I do that with a simple for and try to plot them, the colors are not there or every sphere has the same color.<br>
could you please tell me how to achieve that?<br><br>best regards,<br><br>Andreas<br><br><div class="gmail_quote">2012/1/29 Calixte <span dir="ltr"><<a href="mailto:calixte.denizet@scilab-enterprises.com">calixte.denizet@scilab-enterprises.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    On 29/01/2012 20:06, Constellation Athome wrote:
    <blockquote type="cite">Hi there,<br>
    </blockquote>
    <br>
    Hi,<br>
    <br>
    In taking the example given in plot3d.html, you can make something
    like:<br>
    <br>
    deff("[x,y,z]=sph(alp,tet)",["x=r*cos(alp).*cos(tet)+orig(1)*ones(tet)";..
    <br>
         "y=r*cos(alp).*sin(tet)+orig(2)*ones(tet)";.. <br>
         "z=r*sin(alp)+orig(3)*ones(tet)"]); <br>
    r=1; orig=[0 0 0]; <br>
    [xx,yy,zz]=eval3dp(sph,linspace(-%pi/2,%pi/2,40),linspace(0,%pi*2,20));
    <br>
    clf();<br>
    plot3d(xx,yy,zz)<br>
    plot3d(xx,yy,zz + 2.5)<br>
    <br>
    a=gca();<br>
    a.children(1).color_mode = 3;<br>
    a.children(2).color_mode = 5;<br>
    <br>
    You should have a look at:<br>
    <a href="http://help.scilab.org/docs/5.3.3/en_US/surface_properties.html" target="_blank">http://help.scilab.org/docs/5.3.3/en_US/surface_properties.html</a><br>
    <br>
    Regards,<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Calixte</font></span><div><div class="h5"><br>
    <br>
    <br>
    <blockquote type="cite"><br>
      I would like to give each sphere in my plot3d1 plot a different
      color so that I can distinguish them better.<br>
      I played around with <a href="http://help" target="_blank">http://help</a>.<span>scilab</span>.<span>org</span>/docs/<span style="color:rgb(51,51,255)">5.3</span><span style="color:rgb(51,51,255)">.3</span>/en_US/plot3d.<span>html</span>
      but couldn't find a way to change it to rgb colours or whatever,
      to have a red, a green and another colour.<br>
      <br>
      It would be great, if you could help me.<br>
      And another question is, how to add opacity so that they will be
      translucent.<br>
      <br>
      Thanks in advance,<br>
      <br>
      Andreas<br>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br>