Jon’s PhD Journal

April 18, 2007

Wednesday: playing with vectors…

Filed under: Coding — JDE @ 5:55 pm

~~~~~~~~~~~~~~~~~~~~
Today more investigation around what the velocity data means.  (BTW I looked at the velocity data for one dimension last night: agreeing with my assumptions, the data proved not to be Gaussian)..

Now I’m thinking that the velocity should be related to how quickly a bird is moving in each time step.  From looking at the positional data generated by the simulation, I’ve spotted that if you take the positional data for one dimension at one time step, and the velocity data for one dimension at the same time step, and sum these, you get the positional data for this dimension at the next time step.  This is pretty obvious when you think about it, but I’ve only just noticed that this is what happens.

However, now I’m back to my original question: how do you calculate the polarisation of the flock as a whole?  Let’s imagine one axis for the time being: let’s say that this axis is that the x axis, running perfectly parallel to the floor.  A positive velocity would move something along the right of this axis; a negative velocity would move something in the opposite direction to the left.

Let’s say you have two agents, i and j.  i has a velocity of +1; j. has a velocity of +4. This means that the direction of their velocities is the say: they are both going to move towards the right-hand side of the axis.  However, the magnitude of i is four times greater than that of j.  So how do you compare their polarisation?  Surely it’s identical?

Now as a quick definition, I’m using polarisation here to describe whether the birds are pointing in the same direction or not.  In the above example of i and j., they are both moving the same direction: so I would describe their percentage polarisation as 0% — there’s no difference between them, as they are pointing in the same direction.  The only difference is the difference between magnitudes.

However, I think my notes that I took on Friday will come to the rescue here.  My vectors are not free vectors, in that they are not rooted at the origin.  Also they are not normalised/unit vectors, because from what I can tell they do not have a length equal to one: I’m working on this principle because all vectors are less than one.  From Friday’s notes, a unit vector is a vector with the length equal to one: it can store direction with out regard to the velocity, or should I say magnitude, of the vector.  And if I’m only dealing with unit vectors, surely these will be easier to compare…?

Needless to say, when I tried calculating the unit vectors of these, it didn’t quite work as I hoped… more tomorrow.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.