Hey! It's back-to-class time, and after a long vacation, we return with a lot of ideas and energy!
This time, I want to share with you two mini-projects that indulge my math-artistic side. I have to be honest; these ideas come from Instagram reels, and I thought that trying to replicate them in a p5.js sketch could be a nice exercise.
The first sketch idea come from a @math.magazine reel. This video shows a graphic visualization of Fourier Series by the sum of trigonometric functions. I haven't studied Fourier Series yet, but to me, the basic idea is a chain of circles orbiting themselves. On the left side is the simulation, and on the right side is the current y position of the final circle printing trail.
The final result is amazing.
The p5js web editor allows me to share this little sketch with you. Here's the link.
The second one from a @fascinating.fractals reel about prime number visualization. Here, the idea is to give each ring an orbiting line with an angular velocity given by the prime numbers. In the core is the 1 rpm circle, then the 2 rpm, 3, 5, 7, 11, etc. You can adjust the first n prime numbers you want to visualize. The original video shows the simulation with the first 10 prime numbers but with multiple lines in each ring. In my case, I only draw one line, and I think you can understand better (the effect remains really well):
I can lose my look for minutes watching this. Here in Chile, there's a TV show with a little journalist dog that says, “This is mysterious... and unknown ─ Mario Hugo. 31 minutos”. This next is with 60 rings:
Here is the link to the sketch so you can test the numbers, the rings, and the time you want. It's very interesting. I really don't know if the spirals that come from the simulation have a math explanation, but I can't avoid thinking about the mysteries in the nature of the prime numbers and the beauty of creation.
I hope these two mini-projects inspire you to take action with little things. Making these was really satisfying to me and let the big ideas breathe. See you!