Fourier ShapeΒΆ
Animate a fourier series of different shapes
Highlights:
integrate
,sample
,Trail
Inspiration: 3Blue1Brown
A Fourier Series of n terms is an approximation of a given function using sine waves of frequencies upto n. We can represent shapes (curves) using complex functions. We find the amplitudes of the frequencies forming the function by finding its Fourier transform
Given a (complex) function \(u(t) : [a, b] \to C\) The amplitude of a frequency f as a function of f is given by the fourier transform \(\widehat{u}(f)\) :
We compute this by using the Reimann sum of the integral instead: the function `math::integrate`
To find the function for an arbitrary shape
trace over the shape in Blender
export as a
.obj
fileuse
obj_to_pts
to import and parse theobj
use
ShapeFnFromPts
to make a function which interpolates between the points and returns a complex number.