Epicycles, complex Fourier series and Homer Simpson's orbit

Hi, i was just looking this video (https://www.youtube.com/watch?v=qS4H6PEcCCA) its about Fourier Epicycles, I searched a lot but couldn’t find any good help on how I can do such stuff in grasshopper.

Any help would be appreciated :slight_smile:

Thanks!!
hqdefault

Good news: see attached.

Bad news: see attached (code based solution)

Curves_Hypo_V2A.gh (125.7 KB)

1 Like

hey @PeterFotiadis that’s what i was looking , but can’t this be done in grasshopper(no codes) ?

thanks!!

It can I guess (by some other good Samaritan).

BTW: your tag “Python” means that you are after a P driven solution?

here you can find the theory involved in fourier transforms…

3 Likes

not really P driven, my first choice would be in grasshopper, but if can’t be done in gh , then no other choice.

thanks @beremiz.2000

Hello
here is a good script to replicate that, without the circles at the moment. I made a big mistake with complex multiplication. Here I use complex which are embedded in Grasshopper.


Epicycles, complex Fourierv 2.gh (13.0 KB)
And here an implementation to blend between 2 shapes, that is very simple to do with this method as each curve is represented by a set of coefficients.
Frame_
Like in this tweet
Epicycles, complex Fourier.gh (30.8 KB)

An animation with 100 points
Frame_

An animations with 1 to 201 Fourier coefficients
Frame_GH
An animations with 1 to 61 Fourier coefficients, one per second
Frame_

13 Likes

Sorry for this late response!! That was spot on Laurent…
thanks a lot!!!

And if you want the circles
Epicycles, complex Fourier.gh (33.2 KB)



3 Likes


And here is the 3d version. You can download the plugin here: https://github.com/CecilieBrandt/harmonics

8 Likes

Could you actually use surface harmonics to fit to an arbitrary shape like a 3d equivalent of what Laurent showed above? Would be interesting to see

Yes, that’s exactly what’s going on actually. I created a surface patch of the original British Museum geometry and back-calculated the 10 most significant modes and their weights to approximate this target surface from a flat mesh.

3 Likes

Could this work with a sphere and an arbitrary mesh with the topology of a sphere? (eg the Stanford bunny)