このanswerは、SciLabでスムーズなアニメーションを作成するのに適しています。私は今、2つの弦に取り付けられたボディのシミュレーションを書く必要があります(したがって、いくつかの追加の力に関する動き)。SciLabでの3つの図形の滑らかなアニメーション
リンク内のコードは、単一点の移動をレンダリングするのに適していますが、残念ながら、このメソッドを使用してポイント+2行のアニメーションを作成することはできませんでした。誰かが好奇心旺盛であれば、私はそれを行うには、このコードを試してみました:
frametime=(tk-t0)/Nt//defining the waitnig time
plot(Y(1,1),Y(2,1),"o")//plotting the point
plot([0;Y(1,1)],[0;Y(2,1)],style=1)
plot([D;Y(1,1)],[0;Y(2,1)],style=1)//plotting the two initial lines
h1_compound = gce();
h_point=h1_compound.children
h_point.mark_size = 20;
h_point.mark_background = 2;
h_line1=h_compound.children
h_line2=h_compound.children
//h_axes = gca();
//h_axes.data_bounds = [0,-1;10,1];
realtimeinit(frametime);
for i=1:Nt//my vectors have Nt points
realtime(i);//wait "frametime" seconds before drawing the new position
h_point.data=[Y(1,i),Y(2,i)];
h_line1.data=[[0;Y(1,i)],[0;Y(2,i)]]
h_line2.data=[[D;Y(1,i)],[0;Y(2,i)]]
end
質問です:任意の軸が点滅せずに3つの図形のアニメーションを作るための方法(これは、ウィンドウのリフレッシュであるとして)、または他のがあります奇妙なもの?