
Warm water evaporates and rises, forming clouds and releasing heat into the air. First they require warm water and warm, moist air - abundant in the mid and southern Atlantic Ocean regions. When these winds collide, they will swirl clockwise in the south, and counterclockwise in the north.Ī variety of factors influence how hurricanes form. In the Southern Hemisphere, winds traveling toward the equator will move eastward, and winds traveling toward the South Pole will curve west. In the Northern Hemisphere, winds moving north are diverted eastward, and winds moving south are diverted westward. This is what happens to the winds that travel to and from the poles. The same thing would happen in the Northern Hemisphere if someone were to throw a ball from south to north, only the ball would end up east of its intended target. Since the equatorial region is moving faster than the North Pole, the ball would end up to the west of its target - somewhere in the Pacific Ocean, probably. Imagine if a person were to stand at the North Pole and throw a ball far enough to reach the equator - say, to a person standing in Quito, Ecuador - the ball would not actually reach that person because it would not travel in a straight line. Winds passing to and from the North and South Poles and the equator are subject to this effect. But if the plate was spinning, the marble would follow a curved pattern as it traveled from the center to the edge. If you placed a marble in the center of a flat plate and then tried to push that marble to the edge of the plate, the marble would move in a straight line, as long as the plate was still. The same is true of anything that spins or rotates - the outside edge of something (in this case, the equator) always spins faster than the inside edge. It works this way: Like a record on a turntable, the earth spins at a different speed at the equator than it does at the North Pole.

The reason is something called the Coriolis effect, or Coriolis force, named for the French mathematician Gaspard-Gustave de Coriolis, who published work on the effect in the 19th century.
CLOCKWISE COUNTERCLOCKWISE CODE
Those are exactly the two values your code is comparing.In fact, tropical cyclones - the general name for the storms called typhoons, hurricanes or cyclones in different parts of the world - always spin counterclockwise in the Northern Hemisphere, and spin in the opposite direction in the Southern Hemisphere. This number is positive ( B is clockwise of A) if x v > y u. Note that in a coordinate system with the x-axis pointing right and the y-axis pointing down, we can rotate a vector 90° clockwise as (x,y)' = (-y,x), ergo: A' Once again, in blue vectors B that would yield a positive A' We do have this information we want if we carry out the dot product of B and a different reference vector: A rotated ninety degrees clockwise (we'll call it A'). It doesn't tell us if the vector points left or right with respect to the reference.

In the Math & Physics primer chapter there's a listing of the declaration of a class used to represent 2D vectors.

I'm reading Programming Game AI by Example by Mat Buckland.
