Question: 2D Acceleration on Slop: Getting the block to slide back

Hey guys, here is the absolute last question concerning my project. I'm so close to the end line I can taste it, yet this final problem is preventing me from opening that bottle of champagne. The Objective: Getting Maple to animate a block to slide up a 30 degree slope given a users initial velocity and mass. The Method: A sequence of frames using rectangles with Plot package. An array to store all the vector information for vector arrows. The Problem: The box goes up, however does not come down. The Root Reason: I don't know how to tell the sequence to go down, only forward. The code. restart: > with(plots): > with(plottools): > with(ListTools): > with(geometry,square): > > IPLaunch:= proc(v0,m) > local g,a,t,h,T,S,flooredT, v, n, Vx, Vy,Ax,Ay, c, Xcomp, Ycomp,d,e,f,vd,ceiledS: > g:=9.81: # Earth's gravitational acceleration (m/s^2) > a:=g*sin(convert(30*degrees,radians)): # Acceleration of the block > t:=v0/a: # Time until the block stops > S:=v0*t-(a*t^2)/2: # Position (m) in which the block stops > h:=S*sin(convert(30*degrees,radians)): # Height achieved by the block in the inclined plane > T:=t*2: # Time the block takes to return to the original position > > Xcomp:=evalf(cos(convert(30*degrees,radians))): > Ycomp:=evalf(sin(convert(30*degrees,radians))): > > ceiledS:=ceil(S): #number of frames > > v := array(0..ceiledS*2): > vd := array(0..ceiledS): > for n from 0 to ceiledS do v[n] := [evalf((v0-a*(t/(ceiledS))*n)*cos(convert(30*degrees,radians))),evalf((v0-a*(t/(ceiledS))*n)*sin(convert(30*degrees,radians)))] end do: #Iterate from 0 to 64 frames > for n from ceiledS+1 to ceiledS*2 do v[n] := [evalf((v0-a*(t/(ceiledS))*n)*cos(convert(30*degrees,radians))),evalf((v0-a*(t/(ceiledS))*n)*sin(convert(30*degrees,radians)))] end do: #Iterate from 0 to 64 frames > print(Xcomp); > > c := display(seq(PLOT(arrow( Thanks to all the help gained thus far. I hope somebody can help me wrap this sucker up!
Please Wait...