I have written a Fortran program that uses 2 random numbers (spherical angles theta and phi) to create a 3-component unit vector called

It similarly creates another 2 vectors,

It then calculates

(It is a well known result that the cross product of 2 vectors creates a third vector which will be perpendicular to both original vectors.

Thus both

This process is repeated 5,000 times and each time we use our 3 main vectors, (

In order to have a visual check that my flow field is randomly distributed, I have written an IDL program to plot the co-ordinates of my flow. I have chosen to plot 2d slices of my field, as this makes the results easier to understand.

Here are the results for the xy-plane, and also the xz-plane.

My fortran program also calculates the dot product of

If each pair are truely perpendicular, their dot products should be zero.

The average of these 5,000 quantities was of the order of -19 for each, so both are very close to zero.

I have written an alternative Fortran program that uses 2 random numbers to create a 3-component unit vector called

We can then use

We can then define a plane in our new co-ordinate system that will have

Once we have our plane, we need only 1 random number to define a new vector

We then re-express

Thus

This process is repeated 5,000 times, and as with METHOD 1, I have created graphs of the co-ordinates in the xy-plane, and in the xz-plane.

This fortran program also calculated the dot product of