[Scilab-users] 3D animated plot

Samuel Gougeon sgougeon at free.fr
Tue Apr 1 00:36:13 CEST 2014


Hello,
It would be easier to debug with posting also t, xt
  and yt definitions, as well as
the copy/paste of the interrupted line with its error message.
Regards
Samuel

Le 31/03/2014 16:38, grivet a écrit :
> Dear all,
>
> I have been doing 2D animated plots using the following code 
> (abbreviated):
>
>     plot(xt(1:1), yt(1:1));
>     he = gce();
>     for j=1:nt
>         drawlater();
>         he.children(1).data = [xt(1:j); yt(1:j)]';
>         drawnow();
>   end
>
> Now, I would like to do the same in 3D, so that I write (example 
> modified from
> Scilab help)
>
> param3d(sin(t(1:2)),cos(t(1:2)),t(1:2)/10,35,45,"X at Y@Z");
> he=gce();
> for j = 1:npt
>     drawlater();
>     he.children(1).data = [sin(t(1:j));cos(t(1:j)); t(1:j)]';
>     drawnow();
> end;
>
> I had to plot a segment (t(1:2)) because param3d will not accept a 
> single point
> as in the first code fragment.
> The he.children(1).data assignment is not accepted,
>  with error message "function not defined for given arguments".
>
> Is there a way to generalize the 2D code ?
> Thanks in advance for your time and help.
> JP Grivet
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>



More information about the users mailing list