Motion in One , Two and Three Dinentions
By : Ali Mohamed Abu Oam asam295@hotmail.com
The purpose of this worksheet is to model the motion in one , two and three dimentions, and to study varies examples in the three cases. In fact the motion in two or three dimentions is, in princible, no more difficult than motion in one dimention. The trick in 3-D motion is to break up a problem into two or three separate problems, one for each dimention of interest, and then solve the corresponding one-dimentioal problems.
Motion in one dimention :
We will model in this case the motion of a particle in case, the acceleration given by a piecewise, quasi-discontinuous function which is somewhat difficult. The acceleration is given by a piecewise, quasi-discontinuous function as shown below. The velocity is calculated by integrating the acceleration, i.e., v = v[0]+int(r,t); , and position is calculated integrating the velocity, r = r[0]+int(v,t); . In this case we take v[0] = 0; and r[0] = 0; . By quasi-discontinuous function, I meant to say that there is a linear function connecting two discontinuous parts of the acceleration function. This quasi-discontinuity functions are required to produce the plots. Now we load the maole's packages:
The following set of plots show the signals position, velocity, and acceleratio, individually, as well as in a single plot. This information can be used to define scales for the position, velocity, and acceleration vectors produced laters. The fourth plot shows the all plots together.
Details of the animation development :
The next execution group contains a do loop that creates the different graphics used in the animation. Variable pMove contains the list of graphs that show the moving particle as a function of time. The following variables are used: * pSize = determines the size of the particle in the plot (=15 in this case) * vecL, vecH, vecR are parameters determining the size of the vectors representing position, velocity and acceleration. These parameters are used in the call to function plottools[arrow]. vecL is the thickness of the base of the vector, vecH is the size of the head of the vector, and vecR is the ratio of the head length to the vector length. In this case we use vecL = 0.05, vecH = 0.20, vecR = 0.1. * rFactor = distance from the vector to the label "r" identifying the vector * vFactor, aFactor = multiplicative factors to scale the velocity and acceleration vectors * pPoint, pPlabel, pR, pV, pVlabel, pA, pAlabel = variables holding the intermediate plots *pAll = a display collecting all the plots at a given time step * rt, vt, at = current values of position, velocity, and acceleration Note: In the line that starts with t:='t':pC:= ... etc., the option view = [1.1*rL..tf,-30..30] represents the view window for the plot produced. The x-component of that view window, namely, 1.1*rL..tf, should remain the same for all animations. The y-component of the view window should be adjusted to whatever is necessary to show the entire animation. The limits in y can be figured out from the r-vs-t, v-vs-t, and a-vs-t graphs shown above. A range of -30..30 is good enough for this case.
Motion in two dimentions :
Here in this case we will model a projective motion. The projective motion of a particle as been a subject of study for over 2000 yrs. Projectile motion is an important class of 2-dimentional problems. In these tybes of problem, a particle is given an initial velocity and the objective is to caculate the trajectory of the particle. In general these problems can be quite complex since one must also account for air ressistance near the surface of the earth.
The simulation of particle motion in this examples is achieved by creating a number of graphics that are then shown one after the next in a continuous fashion. The motion of a particle in two-dimensions is described by the vector : r(t) = [x(t), y(t)], in the interval t[0]< t < t[f]; where t[f] = t[0]+(n-1)*Deltat; Deltat; is a time increment, and n is the number of time increments (or the number of graphs used in the animation).
Next, we calculate t[f], the velocity and acceleration vectors (v = dr/dt and a = dv/dt), and we define a function mag to calculate the magnitude of a three dimensional vector x = [x[1],x[2],x[3];], namely for 2-dimentional case , mag(x) = sqrt(x[1]^2+x[2]^2);
The next step is to produce plots of the magnitudes of the position, velocity, and acceleration vectors as functions of time in the interval t[0] < t < t[f];, with the purpose of determining their relative sizes. This information will be used later to produce plots of the vectors themselves. The vector plots are based on the coordinate system where the path of the motion is plotted. Thus, to produce vectors for position, velocity, and acceleration that are visible (and reasonably sized) in the plots, we may need to scale the actual vectors up or down to make them fit the coordinate system where the motion path is plotted.
The next step is to produce a plot of the particle's trajectory, which is displayed below and saved into variable pCurve:
The next execution group contains a do loop that creates the different graphics used in the animation. Variable pMove contains the list of graphs that show the moving particle as a function of time. The following variables are used: * pSize = determines the size of the particle in the plot (=10 in this case) * vecL, vecH, vecR are parameters determining the size of the vectors representing position, velocity and acceleration. These parameters are used in the call to function plottools[arrow]. vecL is the thickness of the base of the vector, vecH is the size of the head of the vector, and vecR is the ratio of the head length to the vector length. In this case we use vecL = 4, vecH = 8, vecR = 0.1. * rFactor = distance from the vector to the label "r" identifying the vector * vFactor, aFactor = multiplicative factors to scale the velocity and acceleration vectors * pPoint, pPlabel, pR, pV, pVlabel, pA, pAlabel = variables holding the intermediate plots *pAll = a display collecting all the plots at a given time step * rt, vt, at = current values of position, velocity, and acceleration.
The collection of plots is displayed after this do loop by using function plots[display] with the option insequence=true. After the graph is shown, click on the graph and press the play button [>] in the animation menu bar shown. The animation shows not only the particle moving in time and its velocity and acceleration vectors, but also the projections of the particle motion on the x and y axes.
Motion in three dimentions :
In this case we will model the motion in 3-dimentions for plane Lisajous figure under the equation r(t) = [sin(t/3), cos(t/2), 5] . Lisajous figures result from combining harmonic motions (i.e., motions involving sine and cosine functions) in two perpendicular axes , in this case the x and y directions.
The simulation of particle motion in this case is achieved by creating a number of graphics that are then shown one after the next in a continuous fashion. The motion of the particle is described by the vector r(t) = [x(t), y(t), z(t)], in the interval t[0] < t < t[f], where t[f] = t[0]+(n-1)*Deltat; Deltat; is a time increment, and n; is the number of time increments (or the number of graphs used in the animation).
Next, we calculate t[f], the velocity and acceleration vectors (v = dr/dt and a = dv/dt), and we define a function mag to calculate the magnitude of a three dimensional vector x = [x[1],x[2],x[3];], namely, mag(x) = sqrt(x[1]^2+x[2]^2+x[3]^2):
The next step is to produce plots of the magnitudes of the position, velocity, and acceleration vectors as functions of time in the interval t[0] < t < t[f], with the purpose of determining their relative sizes. This information will be used later to produce plots of the vectors themselves. The vector plots are based on the coordinate system where the path of the motion is plotted. Thus, to produce vectors for position, velocity, and acceleration that are visible (and reasonably sized) in the plots, we may need to scale the actual vectors up or down to make them fit the coordinate system where the motion path is plotted.
The next execution group contains a do loop that creates the different graphics used in the animation. Variable pMove contains the list of graphs that show the moving particle as a function of time. The following variables are used: * pSize = determines the size of the particle in the plot (=10 in this case) * vecL, vecH, vecR are parameters determining the size of the vectors representing position, velocity and acceleration. These parameters are used in the call to function plottools[arrow]. vecL is the thickness of the base of the vector, vecH is the size of the head of the vector, and vecR is the ratio of the head length to the vector length. In this case we use vecL = 4, vecH = 8, vecR = 0.1. * rFactor = distance from the vector to the label "r" identifying the vector * vFactor, aFactor = multiplicative factors to scale the velocity and acceleration vectors * pPoint, pPlabel, pR, pV, pVlabel, pA, pAlabel = variables holding the intermediate plots *pAll = a display collecting all the plots at a given time step * rt, vt, at = current values of position, velocity, and acceleration