Live data from Hacker News

My Fourier Epicycles

myfourierepicycles.com

11–20 of 25 posts

Re: My Fourier Epicycles

#13
post #5

This is fun but I think it's a bit buggy. Trying to draw lines parallel and close to more than one border generates a lot of nonsense. Try with a square almost as big as the canvas.

Same thing happens when I try (emphasis on try, it wasn't that good) to draw a circle, which should be the easiest shape.

Re: My Fourier Epicycles

#15
post #14

Could this be a way to compress vectors?

My (poor) understanding of existing compression techniques is that you have to know what frequencies are OK to discard, otherwise the amount of information remains the same. For things like mp3 or jpg, this depends a lot on human perception of sound and images.

Re: My Fourier Epicycles

#16
post #14

Could this be a way to compress vectors?

Depending on what you mean by vectors, yes. I don't know how it, if at all, it would apply to svg files, but you can absolutely take a vector and take its Fourier transform, and only keep the first few components to get a compressed representation. That is one way to do image compression.

Re: My Fourier Epicycles

#17
post #3

Why does it use two sets of vectors? One sum of vectors is enough to trace any continuous line.

I implemented such a version in Scratch back in 2016! https://scratch.mit.edu/projects/117304786/

Here’s a gif of that if the project player doesn’t work for you: https://github.com/kach/gifblocks/blob/master/gallery/fourie...

Re: My Fourier Epicycles

#18
post #3

Why does it use two sets of vectors? One sum of vectors is enough to trace any continuous line.

Yeah, this is pretty annoying. Starting with a function from the circle to the complex plane, the Fourier series decomposes it into a sum of exponentials, which are circular motions about 0. This version with x and y coordinates separated overcomplicates and confuses. And with a four-dimensional output, there are 2 unused dimensions whose values are arbitrary.

I wonder if this means the problem is under-determined (too many degrees of freedom) and that leads to numerical instability. Certainly one set of equations is enough, as 3Blue1Brown’s Fourier transform video shows.

Re: My Fourier Epicycles

#19
post #9
post #3

Why does it use two sets of vectors? One sum of vectors is enough to trace any continuous line.

Perhaps so the animations are outside of the drawing area?

And I would guess you get fewer artifacts - the version linked in a sibling comment with just one end has a lot of factors and yet is not very accurate.
Post reply on HN