restart: #clears memory
y := sin(x^2 * t);
with(plots): #includes plotting abilities
t := 5; #define t
plot(y, x = -Pi..Pi);
t:='t'; #undefine t
animate(y, x = -Pi..Pi, t=-5..5, numpoints=100); #animations
t:=sin(u * v): #redefine t
y; #prints current y function
animate3d(y, x=-1..1, u=-2..2, v=-5..5, numpoints=1000, frames=100);
plotsetup(gif, plotoutput="M:\1.gif", plotoptions='transparent'); #sets rendering to animated gif
animate3d(y, x=-1..1, u=-2..2, v=-5..5, numpoints=1000, frames=100);
plotsetup(default); #returns rendering to screen