A student asks,
How can I write the equation of a regular polygon using polar coordinates?
MathHelp replies,

Consider the equation of just one side of an n-gon with radius 1. Better yet, consider the equation of just one half of one side of the n-gon. It's the side of a right triangle opposite angle A = π/n. The hypotenuse of this triangle is 1 (the radius of the n-gon), so the equation of this one side is cos(π/n)/cos(θ), where θ goes from 0 to π/n. The other half of this side has the same equation, so we're already at the point where we know the equation of one side of the n-gon:

r = cos(π/n) / cos(θ), -π/n ≤ θ ≤ π/n

Next, we will need to develop a function of θ that "normalizes" θ to be within plus or minus π/n. This is accomplished by the "floor" function, as follows:

B = θ - 2 π/n floor((n θ + π)/(2 π))

Putting it together, the equation of an n-gon is r = cos(A)/cos(B), which is

r = cos(π/n)/cos(θ - 2 π/n floor((n θ + π)/(2 π)))

External referencesEdit