Polar & Fourier Curves
Standard cosine summation
Bounded numerical curves. Cosine a₀ adds to the constant term.
The explicit sum is y = sum(cos(n*x)/n,n,1,40). The index runs from 1 to 40, and the general term is cos(nx)/n.
The infinite sum equals −ln|2 sin(x/2)| except at multiples of 2π, where the terms do not settle. Forty terms already show the sharp dips near those points. A smaller upper limit smooths the dips out.
Equation
y = sum(cos(n*x)/n,n,1,40)
Graph preview
What the Fourier sum is doing
A Fourier pattern builds a complicated shape from simple waves. For a polar Fourier curve, the radius is a constant plus a cosine sum from n = 0 and a sine sum from n = 1. The cosine coefficient a₀ is an extra constant, added on top of the constant parameter, because cos(0·θ) is 1.
A larger N keeps more harmonics. Early terms decide the broad shape. Later terms are usually smaller and add finer wobble. The same idea appears in the ordinary sum y = Σ cos(nx)/n, whose infinite form is −ln|2 sin(x/2)| away from multiples of 2π.
Reading the input
y = sum(cos(n*x)/n,n,1,40)— This line defines an explicit function. The left side is the vertical coordinate, and the right side is evaluated for each x.
Try a change
- Cut N in half and generate again. The broad shape stays and the fine wobble disappears.
- Change a coefficient formula from 1/(n+1) to 1/(n+1)^2. The extra harmonics become much smaller.
Generate Graph posts the expression to the studio graph engine and draws the result on the homepage. The editable field is the entire input, including every line.