Animations

Please notice that, at the present time, the following animations are only visible when run within TeXmacs.

1.Animations that remain in the document

Mmx]  
use "graphix"
Mmx]  
$o == $point (0, 0);
Mmx]  
$p (t) == $point (2 * cos t, 2 * sin t);
Mmx]  
$red x == $color ("red", x);
Mmx]  
$animation ($hold ("0.04sec", $red $line ($o, $p (t/10))) | t in 0 to 63)

2.Animations that operate on the document

Mmx]  
demo (view: Dynamic, sec: Double): Void == {
  start: Double == time ();
  while time () - start < (1000 * sec) do {
    t: Double == (time () - start) / 1000;
    g: Graphics == $graphics $red $line ($o, $p (t));
    assign (view, as_document 
            $grid (0, 0, 1, $size ("0.3par", "0.3par", g)));
    flush mmout; } };
Mmx]  
view == dynamic (as_document $grid (0, 0, 1,
                   $size ("0.3par", "0.3par", $graphics ())))

Mmx]  
demo (view, as_double 10.0);
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.