AN ALTERNATE UNIVERSE

> restart:with(plots):with(linalg):with(stats):with(statplots):with(plottools):

Warning, new definition for norm

Warning, new definition for trace

Warning, new definition for transform

16. Force field
Yes Star Trek fans, there really is such a thing as a force field. A force field f defines at each point (x,y) in the plane what the force acting on an object would be if it were at that point. For 3 dimensions it would of course use three coordinates. The force field defined below is independent of time (a static force field) , but usually a force field also has time as a variable, that is the field changes with time. We will only consider the case of a static force field. One can plot a force field using the fieldplot command. It uses arrows to show the force that would be acting at a given point (x,y) by a vector drawn at that point. It cannot of course actually plot the force at every point. A fieldplot is of type plot and so can be displayed with any other graph of type plot.

> f(x,y):=[x*y,-x*y];

[Maple Math]

> fieldplot(f(x,y),x=-8..12,y=-8..10, arrows=thick,color=blue);

[Maple Plot]

> p2:=%:

The force field shown above does not as far as I know exist in the world. Note it has the peculiarity that the force is zero on the axes and very weak near the axes. It gets much stronger the further one goes from the axes. In Quadrants 1, 3 and 4 it pushes objects roughly towards the axes, but in quadrant 2 it pushes objects towards infinity. Since the acceleration is the force divided by the mass, and the force at point (x,y) is [x*y,-x*y] the acceleration of the object located at (s1,s2) is 1/m*[s1*s2,-s1*s2]. This is broken into components with subscripts in the do loop below. Since DELTA t is .01, each step is .01 time units later than the previous step. In the graph, however, not all steps are plotted. The do loop was re-edited after conversion to html to have the block form a loop ought to have. It is impossible to actually use good programming style in Maple itself, because it won't let you. The arrow command draws the initial velocity vector, the scatterplot plots some of the points (every 10th one) and the fieldplot plots the force field. An arrow is of type plot and so all three graphs can be displayed together showing the orbit of the object in the force field.

> `Initial time`;t[0]:=0;`initial position`;s1[0]:=4;s2[0]:=6;`initial velocity`;v1[0]:=-1;v2[0]:=0;`Time step`;DELt:=.01;`Mass of object`;m:=10;

>

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

m := 10

> V:=arrow([4,6],vector(2,[-1,0]),.2,.4,.4,color=green):

> for i from 1 to 800 do


t[i]:=t[i-1]+DELt;
a1[i]:=1/m*s1[i-1]*s2[i-1];
a2[i]:=-1/m*s2[i-1]*s1[i-1];
v1[i]:=v1[i-1]+a1[i]*DELt;
v2[i]:=v2[i-1]+a2[i]*DELt;
s1[i]:=s1[i-1]+v1[i]*DELt;
s2[i]:=s2[i-1]+v2[i]*DELt;

od:

> S1:=[seq(s1[10*i],i=0..80)]:

> S2:=[seq(s2[10*i],i=0..80)]:

> scatterplot(S1,S2,symbol=circle, color=red,title=`Initial Position = [4,6] Initial velocity = [-1,0] Time difference between points = 0.1`):

> p1:=%:

> display(V,p1,p2);

[Maple Plot]

>

Some other orbits with various initial positions and velocities moving in this field are shown below. All Maple code has been edited out, but they were done the same way the above orbit was done.

[Maple Plot]

[Maple Plot]

[Maple Plot]

[Maple Plot]

[Maple Plot]

[Maple Plot]