Live data from Hacker News

My Fourier Epicycles

myfourierepicycles.com

1–10 of 25 posts

Re: My Fourier Epicycles

#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.

Re: My Fourier Epicycles

#6
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.

Re: My Fourier Epicycles

#7

The second pass makes the line darker. Is it on purpose or just a numeric error?

It may also be a result of the canvas drawing anti-aliased lines. Since an anti-aliased line contains some partially transparent pixels, drawing exactly the same line a second time will darken those pixels.

Re: My Fourier Epicycles

#10
Shameless plug: A friend of mine and I made a game[1] for a jam that works the other way around. The goal is to manually fiddle with the coefficients to recreate a given shape.

It gives an easy way to play with the coefficients and hopefully allows the player to gain some intuitions. For example how some combinations of frequencies lead to rotational symmetry and why negative frequencies are necessary.

It's not very polished, though. I made a mistake while writing the algorithm that checks whether the shape is matching. It causes some false negatives in certain situations. There might also be some issues with dragging the controls on Mac OS.

[1] https://coldiv.itch.io/fouriershaper

Post reply on HN