<< Chapter < Page Chapter >> Page >

The magnitude of the average velocity vector, identified by the variable named vecVelMag , is compute by dividing the magnitude of the displacement vector by the total time. This results in a value havingunits of feet/second as shown by the comments.

The direction of the average velocity vector

The direction of the average velocity vector, identified by the variable named vecVelAng , is recognized as being the same as the direction of the overall displacement vector with units of degrees.

Display the results

Finally, the document.write method is called several times in succession to display theoutput text shown in Figure 3 .

Multiple concurrent velocities

When a body has multiple concurrent velocities, the overall velocity of the body is equal to the vector sum of the individual velocities. You can computethat vector sum in any way that works for you, including the parallelogram rule, a tail-to-head vector diagram, or the mathematical techniques that we will usehere.

Relative velocity

In this section, we will also be dealing with a topic called relative velocity . For example, suppose we see a man walking down the aisle in a passenger car of a train that is moving slowly at a uniform velocity along astraight track. How fast is the man moving?

The frame of reference

The answer to that question depends on the frame of reference of the observer. For example, to another passenger in the same rail car, it may appear that the man is moving at about3 feet per second, which is a reasonably comfortable walking speed.

However, to someone standing on the ground outside of the passenger car (pretend that the side of the car is transparent), it may appearthat the man is moving much faster or much slower than 3 feet per second, depending on which direction the man is moving relative to the motion of thetrain.

It could even turn out that insofar as the outside observer is concerned, the man isn't moving at all, or is moving backwards.

Exercise #1 for a man on a train

A man is walking along the aisle in a passenger car of a train that is moving at 1 mile per hour toward the east. The man is walking in the same direction thatthe train is moving. The man is walking at a uniform velocity of 2.933 feet per second. (You will see shortly why I chose such a strange walking speed for the man.) What is the man's overall velocitywith reference to the ground?

Figure 4 shows a vector diagram for the man onthe train. The units for both velocity vectors must be the same. Therefore, the length ofthe velocity vector for the man is based on a conversion from 2.933 feet per second to 2 miles per hour.

Figure 4 - Vector diagram for a man on a train.

Missing image

JavaScript code

Please copy the code shown in Listing 3 into an html file and open the file in your browser.

Listing 3 . Exercise #1 for a man on a train.

<!---------------- File JavaScript03.html ---------------------><html><body><script language="JavaScript1.3">document.write("Start Script<br/>"); //The purpose of this function is to receive the adjacent// and opposite side values for a right triangle and to // return the angle in degrees in the correct quadrant.function getAngle(x,y){ if((x == 0)&&(y == 0)){ //Angle is indeterminate. Just return zero.return 0; }else if((x == 0)&&(y>0)){ //Avoid divide by zero denominator.return 90; }else if((x == 0)&&(y<0)){ //Avoid divide by zero denominator.return -90; }else if((x<0)&&(y>= 0)){ //Correct to second quadrantreturn Math.atan(y/x)*180/Math.PI + 180; }else if((x<0)&&(y<= 0)){ //Correct to third quadrantreturn Math.atan(y/x)*180/Math.PI + 180; }else{//First and fourth quadrants. No correction required. return Math.atan(y/x)*180/Math.PI;}//end else }//end function getAngle//------------------------------------------------------------// //The purpose of this function is to add two vectors, given// the magnitude and angle (in degrees) for each vector. // The magnitude and angle (in degrees) of the resultant// vector is returned in a two-element array, with the // magnitude in the element at index 0 and the angle in the// element at index 1. Note that this function calls the // getAngle function, which must also be provided in the// script. To use this function to subtract one vector from // another, add 180 degrees to the angle for the subtrahend// vector before passing the angle to the function. To use // this function to add more than two vectors, add the first// two vectors as normal, then add the output from this // function to the third vector, etc., until all of the// vectors have been included in the sum. function vectorSum(vecAmag,vecAang,vecBmag,vecBang){var vecResult = new Array(2); //Compute the horizontal and vertical components// of each vector. var vecAh = vecAmag*Math.cos(vecAang*Math.PI/180);var vecAv = vecAmag*Math.sin(vecAang*Math.PI/180); var vecBh = vecBmag*Math.cos(vecBang*Math.PI/180);var vecBv = vecBmag*Math.sin(vecBang*Math.PI/180); //Compute the sums of the horizontal and vertical// components from the two vectors to get the // horizontal and vertical component of the// resultant vector. var vecResultH = vecAh + vecBh;var vecResultV = vecAv + vecBv; //Use the Pythagorean theorem to compute the magnitude of// the resultant vector. vecResult[0]= Math.sqrt(Math.pow(vecResultH,2) + Math.pow(vecResultV,2));//Compute the angle of the resultant vector in degrees. vecResult[1]= getAngle(vecResultH,vecResultV); return vecResult;}//end vectorSum function //------------------------------------------------------------////The main script body begins here. //Establish the magnitude and angle for each vector.var vecTrainMag = 1;//magnitude of velocity of train in miles/hr var vecTrainAng = 0;//angle of velocity of train in degreesvar vecManMag = 2.933*3600*(1/5280);//Magnitude of velocity of // man (ft/sec)*(sec/hr)*(mile/ft)// = miles/hour var vecManAng = 0;//angle of velocity of man in degrees//Add the two vectors var resultant = vectorSum(vecTrainMag,vecTrainAng,vecManMag,vecManAng); //Display the magnitude and direction of the resultant vector.document.write("Velocity magnitude = " + resultant[0].toFixed(2) + " miles/hour<br/>"); document.write("Velocity angle = " +resultant[1].toFixed(2) + " degrees<br/>"); document.write("End Script");</script></body></html>

Questions & Answers

what is microbiology
Agebe Reply
What is a cell
Odelana Reply
what is cell
Mohammed
how does Neisseria cause meningitis
Nyibol Reply
what is microbiologist
Muhammad Reply
what is errata
Muhammad
is the branch of biology that deals with the study of microorganisms.
Ntefuni Reply
What is microbiology
Mercy Reply
studies of microbes
Louisiaste
when we takee the specimen which lumbar,spin,
Ziyad Reply
How bacteria create energy to survive?
Muhamad Reply
Bacteria doesn't produce energy they are dependent upon their substrate in case of lack of nutrients they are able to make spores which helps them to sustain in harsh environments
_Adnan
But not all bacteria make spores, l mean Eukaryotic cells have Mitochondria which acts as powerhouse for them, since bacteria don't have it, what is the substitution for it?
Muhamad
they make spores
Louisiaste
what is sporadic nd endemic, epidemic
Aminu Reply
the significance of food webs for disease transmission
Abreham
food webs brings about an infection as an individual depends on number of diseased foods or carriers dully.
Mark
explain assimilatory nitrate reduction
Esinniobiwa Reply
Assimilatory nitrate reduction is a process that occurs in some microorganisms, such as bacteria and archaea, in which nitrate (NO3-) is reduced to nitrite (NO2-), and then further reduced to ammonia (NH3).
Elkana
This process is called assimilatory nitrate reduction because the nitrogen that is produced is incorporated in the cells of microorganisms where it can be used in the synthesis of amino acids and other nitrogen products
Elkana
Examples of thermophilic organisms
Shu Reply
Give Examples of thermophilic organisms
Shu
advantages of normal Flora to the host
Micheal Reply
Prevent foreign microbes to the host
Abubakar
they provide healthier benefits to their hosts
ayesha
They are friends to host only when Host immune system is strong and become enemies when the host immune system is weakened . very bad relationship!
Mark
what is cell
faisal Reply
cell is the smallest unit of life
Fauziya
cell is the smallest unit of life
Akanni
ok
Innocent
cell is the structural and functional unit of life
Hasan
is the fundamental units of Life
Musa
what are emergency diseases
Micheal Reply
There are nothing like emergency disease but there are some common medical emergency which can occur simultaneously like Bleeding,heart attack,Breathing difficulties,severe pain heart stock.Hope you will get my point .Have a nice day ❣️
_Adnan
define infection ,prevention and control
Innocent
I think infection prevention and control is the avoidance of all things we do that gives out break of infections and promotion of health practices that promote life
Lubega
Heyy Lubega hussein where are u from?
_Adnan
en français
Adama
which site have a normal flora
ESTHER Reply
Many sites of the body have it Skin Nasal cavity Oral cavity Gastro intestinal tract
Safaa
skin
Asiina
skin,Oral,Nasal,GIt
Sadik
How can Commensal can Bacteria change into pathogen?
Sadik
How can Commensal Bacteria change into pathogen?
Sadik
all
Tesfaye
by fussion
Asiina
what are the advantages of normal Flora to the host
Micheal
what are the ways of control and prevention of nosocomial infection in the hospital
Micheal
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Game 2302 - mathematical applications for game development. OpenStax CNX. Jan 09, 2016 Download for free at https://legacy.cnx.org/content/col11450/1.33
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Game 2302 - mathematical applications for game development' conversation and receive update notifications?

Ask