[Scilab-users] 3D animated plot

grivet grivet at cnrs-orleans.fr
Tue Apr 1 16:14:09 CEST 2014


Le 01/04/2014 14:34, Adrien Vogt-Schilb a écrit :
> On 01/04/2014 07:47, grivet wrote:
>>
>> //exemple de param3d
>> t=0:0.1:5*%pi;
>> npt = size(t,"*");
>> param3d(sin(t(1:2)),cos(t(1:2)),t(1:2)/10,35,45,"X at Y@Z");
>>
>> he=gce(); //the handle on the 3D polyline
>> he.foreground=color('red');
>>
>> ha=gca(); //the handle on the axes
>> ha.rotation_angles=[60 80];
>> ha.data_bounds = [-1,-1,0;1,1,5];
>>
>> for j = 1:npt
>>     drawlater();
>>     he.children(1).data = [sin(t(1:j));cos(t(1:j)); t(1:j)]';
>>     drawnow();
>> end; 
>
> hi
>
> any chance you just get confused between he and ha?
> line 3 starting from the end of your code, he has no children. using 
> ha instead produces a figure in my computer, not sure if it is the 
> figure you want
>
> for j = 1:npt
>     drawlater();
>     ha.children(1).data = [sin(t(1:j));cos(t(1:j)); t(1:j)]';
>     drawnow();
> end;
>
>
>
Wonderful, you spotted my error at first look. In fact, I'm  sure that 
I've never completely understood
the meaning of the various handles!
Thank you
JP Grivet



More information about the users mailing list