Question: Parsing a value to Int, arrays in procedures

First a thank you is in order for gkokovidis for helping me with a problem earlier. The brief story is I am trying to animate a certain box on a 30 degree slope. In order to put it together, I need to be able to turn it into a an array. In order to set an array, I need to be able to parse a certain value to an integer. Let me show you the code thus far. restart: with(plottools): with(plots): c := rectangle([0,1], [1,0]): d := rectangle([1,2], [2,1]): e := rectangle([2,3], [3,2]): f := rectangle([3,4], [4,3]): g := rectangle([4,5], [5,4]): IPLaunch:=proc(v0,m) local g,a,t,S,h,T: 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 #need to parse t into an integer here #intT := parse()t#? v := array(1..t): for i to t do v[i] := i^2 end do: print(v); end: display(c,d,e,f,g, scaling=constrained, style=patch, axes=boxed,insequence=true); now what i'm really interested in is to parse that real value of "t" which is time, into an integer, and then create an array with t + 1 spots (this is so that I can have the 0.xx at the end) With that taken care of, I have just one other question, is it possible to produce array frames? I'd like to then replicate the size of the time array for the frames, so that I can fill each frame with the necessary data pertaining to that second. Thank you so much for your time, if I can get answers to this question, I have fully planned out and completed this small project.
Please Wait...