You are here:

Advanced Math/Modelling movment speed and direction of animals

Advertisement


Question
QUESTION: Dear Sherry,

I wonder if you cn help with this:

Imaging the movement of a particle in x,y coordinate system, with the direction of movement expressed as the angle from North. I am looking for the relation ship between the velocity in x-direction, the velocity in y-direction and the direction of movement. To give you an example: If xvelocity = yvelocity and both are positive and larger than zero then the resulting direction of movement is 45 degrees from North, this follows from vector addition. However, I need this relationship to be such that I can first specify the direction of movement, and then determine values for the x and yvelocity that satisfy the condition of this direction. As in the above example I would prescribe the movement direction as 45 degrees from North, and then find that x and velocity need to be both positive and larger than zero. Now the direction of movement can vary from 0 to 360 degrees. I first thought the relationship should be specified by using the ratio between x and y velocity, which would be 1 for the above example. But the ratio would cause difficulties when the denominator is zero. Is there another way of doing this ?

I would be grateful for any ideas.


Regards,

Juliane

ANSWER: Hi Juliane~
     I have a few ideas for you. First the tanx = sinx/cosx and the only times cosx is 0 is when x = +_pi/2 which is equivalent to saying when you have a vertical angle, pointing directly north or south. So as long as the tanx is defined you can find that angle. When a vector is pointing straight up or straight down we don't need to know y because y takes on an infinite number of values and that is why when we write the equation of a vertical line it is always in terms of x only. The tanx is positive when both sinx and cosx have the same sign and it is negative when one (and only one) of sinx or cosx is negative. In your statement I quote "both are positive and larger than zero" when both are positive thus neither is 0 and certainly larger than 0, so all that really needs to be said is that they are both positive. Suppose for example that the angle is 120 degrees and you want to know about x and about y and their directions. 120 degrees is in the 2nd quadrant which means x is negative (cos x is negative) and y is positive (sin x is postive).So you see if you have the angle you can determine each of w and y direction and if you have each of x and y direction you can determine the angle.I hope this helps clear up a e few ideas for you.

Math Prof

---------- FOLLOW-UP ----------

QUESTION: Dear Mathprof,

sorry for the delay but it took me some time to get my head round this. I have now programmed my movement like this : I first determine the direction in steps of 45 degrees from North, I then sample the resultant movement velocity, say from the uniform distribution between 0 and 1 (thisvelocity needs to be bilogically meaningful and it is determined by the speed at which animals move), and I then calulate the x and y velocity using cos and sin, making them negative as required depending on the quadrant as you explained (given by the angle). This seems to give useful results. However, one thing still bothers me:Because I am using steps of 45 degrees,  the maginitude of and x and y velocity are either equal or one of them is zero. In reality, the angle of movment could take any value between zero and 360 degrees, not just steps of 45 degrees, and I am not quite sure how to deal with x and y velocity then. But if I give it another go maybe I can figure it out. I am also looking for a better way of programming this. Would it be possible to define x and y velocity as two equations only, given the angle and the overall velocity of movement ? Many thanks for your interest and patience.

Juliane

Answer
Hi Juliane~
    I am not sure what your math background is but it seems you have some trig background. You can write any angle between 0 and 360 using vectors for x and y. For example let the angle be unknown, call it theta. And then let the vector have magnitude r (the length of the vector, sqrt(x^2+y^2)). The vector can sweep through any angle. So let's pretend r is 1 and we have theta so y = r sin(theta) and x = r cos(theta). Recall that sin of an angle is equal to the cos of (90-angle)and vice versa. So you could say y = r sin(theta) and x = r sin(90-theta). You choose an angle and you can determine x or y and the magnitude r is also solvable. If you know x and y then you can find the angle. Does this help you at all?

Advanced Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Sherry Wallin

Expertise

I can answer most questions up through Calculus and some in Number Theory and Abstract Algebra.

Experience

I have had my Bachelor's Degree since 1987 and have been a teacher since 1988. I earned my Masters Degree in Mathematics May 2010. I have been teaching at the same community college since 2002.

Education/Credentials
I have taught 12 years at the community college level, medical college, and technical college as well as a high school instructor and alternative education instructor and charter school instructor.

Awards and Honors
Master's GPA 3.56 Bachelor's GPA 3.34 Post grad work not degree related GPA 4.0

©2012 About.com, a part of The New York Times Company. All rights reserved.