Monday, April 9, 2012

Simple Animation using Mathematica

Using Manipulate, we are able to create animation using Walfram's Mathematica. Basically it allow a variable to walk along its range.

Here the code, or, for me, a template to create animation.




Manipulate[
 Graphics[{
   Blue,
   Circle[{t, 0}, 1]
   },
  PlotRange -> {{-10, 10}, {10, -10}},
  ImageSize -> {400, 300},
  Background -> GrayLevel[0.9],
  Axes -> True
  ],
 {t, 0, 5}
 ]
and here the result