Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > c6be3df0a3ca437587d4b1998fca9889 > files > 155

asymptote-2.49-1.mga7.armv7hl.rpm

settings.autoplay=true;
settings.loop=true;

import graph3;
import animate;
currentprojection=orthographic(1,-2,0.5);

animation A;
int n=25;

for(int i=0; i < n; ++i) {
  picture pic;
  size3(pic,6cm);
  real k=i/n*pi;
  real f(pair z) {return 4cos(abs(z)-k)*exp(-abs(z)/6);}
  draw(pic,surface(f,(-4pi,-4pi),(4pi,4pi),Spline),paleblue);
  draw(pic,shift(i*6Z/n)*unitsphere,yellow);
  A.add(pic);
}

A.glmovie();