Plot3d1 with spheres in diffrent colors, how?

philippe rouxph.22 at gmail.com
Wed Feb 1 08:27:58 CET 2012


Le 30/01/2012 14:10, Constellation Athome a écrit :
> Hi Calixte,
> 
> thank you for the code snippet. It works well, but may I ask another
> question?
> 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.
> could you please tell me how to achieve that?


example :

  phi=[0:0.1:2*3.15];
  theta=[2*3.15:-0.05:0];
  [x,y,z]=eval3dp(tore,theta,phi);
  plot3d(x,y,z,alpha=75,theta=45)
  a=gca();//"axes" courant
  p=a.children(1);//Plot3d
  p.color_mode=10;//dessus bleu

  //on ajoute une sphère au tore
  [x,y,z]=eval3dp(sphere,theta,phi);
  plot3d(x,y,z,alpha=75,theta=45)
  p=a.children(1);//Plot3d
  p.color_mode=4;//dessus cyan

other graphics examples available at
http://perso.univ-rennes1.fr/philippe.roux/scilab/graphiques/fiche_graphiques.html

it's in french sorry


Philippe.




More information about the users mailing list