Анимация гоафика

Форум пользователей пакета Maple

Модератор: Admin

Гарик
Сообщения: 5
Зарегистрирован: Вт мар 04, 2014 12:21 pm

Анимация гоафика

Сообщение Гарик » Ср май 27, 2015 12:04 am

Ребята, как анимировать график?

Код: Выделить всё

restart;

with(plottools); with(plots); argum := proc (z) options operator, arrow; piecewise(0 < Re(z) and 0 < Im(z), arctan(Im(z)/Re(z)), Re(z) < 0 and 0 < Im(z), Pi+arctan(Im(z)/Re(z)), Re(z) < 0 and Im(z) < 0, -Pi+arctan(Im(z)/Re(z)), 0 < Re(z) and Im(z) < 0, arctan(Im(z)/Re(z)), Re(z) = 0 and 0 < Im(z), (1/2)*Pi, Re(z) = 0 and Im(z) < 0, -(1/2)*Pi, 0 < Re(z) and Im(z) = 0, 0, Re(z) < 0 and Im(z) = 0, Pi) end proc;

k := 1/2;
f1 := proc (z, k) options operator, arrow; int((1/(abs((-t^2+1)*(1+(-1)*.25*t^2))*exp(((1/2)*I)*argum((-t^2+1)*(1+(-1)*.25*t^2)))))^(1/2), t = 0 .. z) end proc;
f2 := proc (z, k) options operator, arrow; I*(int((1/(abs((t^2-1)*(1+(-1)*.25*t^2))*exp(((1/2)*I)*argum((t^2-1)*(1+(-1)*.25*t^2)))))^(1/2), t = 1 .. z)) end proc;
f3 := proc (z, k) options operator, arrow; int((1/(abs((t^2-1)*(.25*t^2-1))*exp(((1/2)*I)*argum((t^2-1)*(.25*t^2-1)))))^(1/2), t = 1/k .. z) end proc;
assume(t, real); n := 400; i := 0; m1 := array(0 .. n); m2 := array(0 .. n); z := array(0 .. n); z[0] := 0; m1[0] := 0; m2[0] := 0;
for i from 0 to 99 do
 z[i+1] := z[i]+1/100;
 m1[i+1] := evalf(f1(z[i+1],k));
 m2[i+1] := -evalf(f1(z[i+1],k));
end do:

for i from 100 to 199 do
 z[i+1] := z[i]+1/100;
 m1[i+1] := evalf(f1(1,k)+f2(z[i+1],k));
 m2[i+1] := evalf(-f1(1)+f2(z[i+1],k));
end do:
for i from 200 to n-1 do
 z[i+1] := z[i]+1/100;
 m1[i+1] := evalf(f1(1,k)+f2(1/k,k)-f3(z[i+1],k));
 m2[i+1] := evalf(-f1(1,k)+f2(1/k,k)+f3(z[i+1],k));
end do:
L1:=[seq(m1[i], i=0..n), seq(m2[i], i=0..n)]:
complexplot(L1, x = -2.5 .. 2.5, style = point);