ScratchData LogoScratchData
Back to MegaApuTurkUltra's profile

Cats Circling Cats Fourier Transform

MEMegaApuTurkUltra•Created January 24, 2016
Cats Circling Cats Fourier Transform
53
28
949 views
View on Scratch

Description

Draw any pattern you want on screen, and have it approximated by cats circling cats circling cats.... Written mostly in ApuC so I didn't have to spend so much time dragging blocks out and debugging. See the stage for the ApuC source. (This is probably the first project I have ever made where ApuC worked for its intended purpose - implementing fourier stuff was trivial but it expanded to a huge mess of scratch blocks :P) Press these keys (I was too lazy to make a gui): 1: Draw a pattern 2: Calculate Fourier coefficients 3: Render approximated function 4: Start/Stop cats spinning animation 5: Reset screen Start with 1, draw a pattern, then press 2, then press 4. Adjust the sliders when the animation is playing. The sizes of the cats in the animation correspond to the amplitude of their oscillation. Note: The cats aren't exactly circling. I didn't bother to correct that. There are probably more efficient ways to calculate Fourier coefficients. I literally just integrated f(x) f(x)sin(nx) and f(x)cos(nx) 100 times.

Project Details

Project ID95256025
CreatedJanuary 24, 2016
Last ModifiedNovember 3, 2016
SharedJanuary 24, 2016
Visibilityvisible
CommentsAllowed