[Scilab-users] 3D animated plot
grivet
grivet at cnrs-orleans.fr
Mon Mar 31 16:38:33 CEST 2014
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
More information about the users
mailing list