# Fitting of Closed Curve in the Polar Coordinate.

I know how to fit a curve when given some data points in the cartesian coordinate. Recently, I encountered a model that needs to fit a closed curve in the polar coordinate. I'm thinking of deducing a similar formula using Maximum Likelyhood, but the problem is I don't know what kind of hypothesis to choose.

In Cartesian coordinate, we can use the hypothesis of Polynomials $y=a_nx^n+...+a_0$, but this cannot be extended to my model because the "polynomial" in the polar coordinate $r=a_n\theta^n+...+a_0$ may not be closed.

What can I do?

-
Possibly I'm crazy, but why don't you try expasion in $\sin(n~\theta)$ and $cos(n~\theta)$? –  H. Kabayakawa Jun 6 '12 at 19:31

## 1 Answer

Is there a reason why you think taylor series won't work? Look at this Wolfram Alpha plot. It will diverge eventually, but you can use the same taylor series math to determine how many terms you need for it to converge within the range you want. With closed (i.e. periodic) functions I'd imagine it would be easier, since you're essentially done if it appears to go around the loop once since you can reuse previous values.

-
I've found a better way to do so: using Fourier Seires which guarantees the closeness of the curve :) –  Strin Jun 10 '12 at 15:15