# Question:Animate a Scene

## Question:Animate a Scene

Maple
I need to put all these things together to make a scene, I would like to keep the house,and the clouds as a background plot, and have the tornado and tire move. Sort of like the tornado picks up the tire and then drops it. here is my code its to big for me to save it on here. Using like the animate code, and display codes. Packages: with(plots):with(plottools): Tornado: Actual Tornado: tubeplot([20*t*cos(t),20*t*sin(t),20*t], t=0..20*Pi, radius=-100*exp(.00001*t), tubepoints=10, numpoints=100, color=grey, frames=30): Animated Tornado: rotating around: animate(tubeplot,[[20*t*cos(t+s),20*t*sin(t+s),20*t+s], t=0..20*Pi, radius=-100*exp(.00001*t), tubepoints=10, numpoints=100, color=grey,frames=30], s = 0 .. 2*Pi): Clouds: Cloud1: a := 3: b := 2: x0 := 0: y0:=0: cloud1:= ellipse([x0,y0], a, b, filled=true, color=blue): display3d(cloud1,scaling=constrained): Cloud2: c:=14: d:=8: x1:=9: y1:=0: cloud2:=ellipse([x1,y1], c, d, filled=true, color=navy): display3d(cloud2,scaling=constrained): Tire: actual tire: tire:=plot3d( [cos(u)*(3+cos(v)), sin(u)*(3+cos(v)), sin(v)], u=0..2*Pi, v=0..2*Pi, style=patchnogrid, grid=[50,80], color=black): animated tire: tirea:=animate([t+cos(u),sin(u),u=0..2*Pi], t=-Pi..2*Pi, color=black,thickness=23, frames=20,axes=none, scaling=constrained): House: bottom: cube:=polygonplot3d({ [[1,1,1],[1,1,-1],[1,-1,-1],[1,-1,1]], [[-1,1,1],[-1,1,-1],[-1,-1,-1],[-1,-1,1]], [[1,1,1],[-1,1,1]],[[1,1,-1],[-1,1,-1]], [[1,-1,1],[-1,-1,1]],[[1,-1,-1],[-1,-1,-1]] },style=patch,scaling=constrained, thickness=5, color=blue): display(cube); top: tri := (x1,x2,x3)->polygonplot3d( map( (x->convert(x,list)), [x1,x2,x3] ), thickness=2 ): Rz:=theta->array([ [cos(theta),-sin(theta),0],[sin(theta),cos(theta),0],[0,0,1]]): Rz(theta): r:=(sin(Pi/2)): h:=sqrt(1+r^2): sides:=display( {seq(tri( evalm(Rz(Pi/2)^(k)&*[r,1,1]), evalm(Rz(Pi/2)^(k+1)&*[r,1,1]), [0,0,h]), k=1..4) } ): display3d(sides,axes=normal): display3d({cube,sides},style=patch, orientation=[61,43],color=red, scaling=constrained, axes=none);
﻿