The polar coordinate system is an alternative to Cartesian coordinates for representing position in a plane. Instead of the (x,y) coordinates most people are more familiar with, points are represented by (r,theta) coordinates; r being the distance on a straight line to the origin, and theta the angle, usually in radians, between that straight line and another line from the origin that is designated the 0 angle.

The angles are always measured in the same direction; an angle measured in the opposite direction would be a negative angle. The theta coordinate is cyclic; adding 2pi to it gives the same point. Usually polar coordinates are written with the thetas constrained to an interval 0 to 2pi or -pi to pi, but in some contexts the "wrapping around" of the theta coordinate is used; for instance, in the graph of the spiral represented by the equation r=theta.

The r is normally limited to non-negative numbers, but negative r is sometimes used to represent a point at an angle pi apart from the theta specified.

The nrt strikes again!

Some quick and dirty C code for converting from cartesian to polar coordinates.

dist  = sqrt( deltaX * deltaX + deltaY * deltaY );
angle = acos( deltaX / dist );

if( angle < 0 )
   angle = -angle;
else if( deltaX <=0 &&   deltaY  < 0  )
   angle=-angle;
else if( deltaX < 0 && !(deltaY <= 0) )
   angle=-angle;

And the other way:polar to cartesian

newX = dist * cos ( angle ); newY = dist * sin ( angle );
Intro to polar coordinates

To understand polar coordinates, we must first think of the most fundamental and well known coordinate system - the Cartesian plane. In this plane, points are represented by a unique pair of coordinates along a x (horizontal) and y (vertical) axis. For example,
                           y  
                           |
                           |   .(3,2)
                           |  
                     ------|------x
                          O|
                           |
                           |
The drawing above represents a typical point in the Cartesian Plane. The coordinate pair (3, 2) means the point is 3 units to the right on the x-axis and 2 units up the y-axis. The O represents the point (0, 0) which is referred to as the origin.

To define coordinates in the polar plane though, we first fix an origin O (like in the Cartesian Plane) called the pole and an initial ray from that origin O.
                           |
                           |
                           |
                     ------|------> Initial ray (θ = 0)
                          O|
                           |
                           |
Thus, each point P can be located by assigning it a polar coordinate pair (r , Θ). In this pair, r gives the directed distance from O to P and Θ gives the directed angle from the initial ray to ray OP.

To complicate matters further, each point P can be represented in infinitely many ways, unlike in the Cartesian plane. Since Θ is positive when measured counterclockwise and negative when measured clockwise, the angle associated with a given point is not unique.

Thus, (2, π/6) can be represented as (2, -11π/6) or generally as (2, π/6 + 2kπ) or (2, -11π/6 - 2kπ )

Converting Polar Coordinates to Cartestian coordinates

When we use both polar and Cartesian coordinates in a plane, we place the two origins O together and take the polar initial ray as the positive x-axis. Therefore, the ray Θ = π/2 becomes the positive y-axis. The two coordinate systems are then related through the following equations.

x = r cos Θ
y = r sin Θ
x ² + y ² = r ²
Thus, Polar (r, Θ) = Cartesian (r cos Θ, r sin Θ)



We can use these equations and some trigonometry/algebra to rewrite polar coordinates and polar equations into Cartesian coordinates and equations and vice-versa.

Common Polar Graphs

1.) Θ = k
This equation represents a line through the origin that follows the angle from the initial ray of k.

2.) r = k
This equation represents a circle with center O and of radius k. Its Cartesian equivalent is x ² + y ² = k ²

3.) A ± B (sin or cos) Θ
This formula has four subsets, depending on the absolute value of the ratio of A to B ( |A / B| ). The sine and cosine functions effect the axis of symmetry (cosine yields symmetry with the x-axis, sine yields symmetry along the y-axis).

3.1) If | A / B | < 1
This polar graph is called a limaçon with a loop or a looped limaçon. It has an inner loop when graphed on the polar plane. The word limaçon comes from the French word meaning "snail-like".

3.2) If | A / B | = 1
This polar curve is named a cardioid because of its heart shape. If B is positive, the dimple of the heart is in the negative half of the plane, whereas if B is negative the dimple lies in the positive half of the plane. The inward point of the heart is at the origin.

3.3) If 1 < | A / B | < 2
The equation above represents a dimpled limaçon. The dimple comes from the cardioid shape but because A is slightly larger, the dimple does not reach the origin like in the case of a cardioid.

3.4) If | A / B | ≥ 2
Because of the even larger A, the dimple disappears completely and the graph becomes a convex limaçon. Where the dimple would be in the case of a cardioid and the dimpled limaçon, there is now a horizontal or vertical line.

Calculus of Polar Curves

Slope
The slope of the tangent line to a polar curve r = ƒ(Θ) is given by dy / dx, not by r' = / . To see why, think of the graph of ƒ as the graph of the parametric equations:

x = r cos Θ = ƒ(Θ) cos Θ
and
y = r sin Θ = ƒ(Θ) sin Θ
(Hereafter referred to as "the above equations")

If ƒ is a differentiable function of Θ, then so are x and y and when dx / ≠ 0, we can calculate dy / dx from the parametric formula for slope:

dy    dy / dΘ
-- =  --------
dx    dx / dΘ

      d/dΘ (ƒ(Θ) sin Θ)
   =  -----------------
      d/dΘ (ƒ(Θ) cos Θ)

      dƒ/dΘ sin Θ + ƒ(Θ) cos Θ
   =  ------------------------         (Product Rule)
      dƒ/dΘ cos Θ - ƒ(Θ) sin Θ

Therefore,

dy    ƒ'(Θ) sin Θ + ƒ(Θ) cos Θ
-- =  ------------------------
dx    ƒ'(Θ) cos Θ - ƒ(Θ) sin Θ

Area in Polar Coordinates
In a region bounded by the rays θ = α and θ = β and the curve r = ƒ(θ). We can then approximate the region with n non-overlapping circular sectors based on a partition P of the angle (β - α). The typical sector has radius r = ƒ(θ) and a central angle of radian measure ΔΘ.
Its area is:
     1          1
A =  - r²ΔΘ  =  - (ƒ(Θ))²ΔΘ
     2          2

Thus, the area of our region is approximately

     n
    ---   1
    \     _ ƒ(Θ ))²ΔΘ
A = /          k
    ---   2
    k=1

If ƒ is continuous, we expect the approximations to improve as n -> ∞, and we are led to the following formula for the region's area:

         n
        ---   1
A = lim \     _ ƒ(Θ ))²ΔΘ
    n→∞/          k
        ---   2
        k=1

Using the Riemann Sum Definition, this turns into:
    α 1
A = ∫ - r² dθ
    β 2

Length of a Polar Curve
We can obtain a polar coordinate formula for the length of a curve r = ƒ(θ), where α ≤ θ ≤ β, by parametrizing the curve using the same method as above for the slope as well as the area. Then, by substituting these formulae into the parametric length formula:
    β  _________________________
L = ∫  √ (dx / dθ)² + (dy / dθ)²  dθ
    α  

we get:

    β  _________________
L = ∫  √ r² + (dr / dθ)²  dθ
    α

When the parameterized equations are substituted for x and y.
Nota Bene: This only is valid if ƒ(θ) has a continuous first derivative for α ≤ θ ≤ β and if the point P(r, θ) traces the curve r = ƒ(θ) exactly once as θ runs from α to β.

Area of a Surface of Revolution
Once again, we parametrize the curve ƒ(θ) with the above equations and substitute them into the parametric surface area equation, yielding:
Revolution about the x-axis (y ≥ 0):

    β            ________________
S = ∫ 2πr sin θ √ r² + (dr / dθ)²  dθ
    α

Revolution about the y-axis (x ≥ 0):

    β            ________________
S = ∫ 2πr cos θ √ r² + (dr / dθ)²  dθ
    α
Nota Bene: This also only is valid if ƒ(θ) has a continuous first derivative for α ≤ θ ≤ β and if the point P(r, θ) traces the curve r = ƒ(θ) exactly once as θ runs from α to β.

Log in or register to write something here or to contact authors.