marcpartensky / fourier Goto Github PK
View Code? Open in Web Editor NEWMake fun of fourier transform.
License: MIT License
Make fun of fourier transform.
License: MIT License
It would be a good idea to support SVG files so that you don't have to manually draw the path. SVG files are vector images, so the path can be extracted and used to create the drawing.
Fourier/fourier_drawing/__init__.py
Lines 1 to 5 in 0e8213f
I followed the README to run your code. But it seems that the config file is missing. The idea of the project is great. I am really wondering how you implement the extraction of outline of people in the image. I try to read your code, but I did not find it.
On Mac OS with python 3.7:
rohart.jpg
path: /Users/me/tmp/Fourier/FourierImages/rohart.jpg
[Application of the Fourier Transform.] Window has been created.
Traceback (most recent call last):
File "main.py", line 37, in
fourier()
File "/Users/me/tmp/Fourier/fourier_drawing/fourier.py", line 156, in call
self.events()
File "/Users/me/tmp/Fourier/fourier_drawing/fourier.py", line 170, in events
self.setMode((self.mode + 1) % 3)
File "/Users/me/tmp/Fourier/fourier_drawing/fourier.py", line 319, in setMode
self.setConstructionMode()
File "/Users/me/tmp/Fourier/fourier_drawing/fourier.py", line 334, in setConstructionMode
self.coefficients = Fourier.transform(self.sample, self.coefficients_number)
File "/Users/me/tmp/Fourier/fourier_drawing/fourier.py", line 34, in transform
cn /= npts
ZeroDivisionError: division by zero
How do I simulate the epicycles just like the demo video?
I just want to make a video out of it without the image or the yellow drawing dots
Have you tried using pygame.gfxdraw for smooth shapes?
And also is there a way to get video output of the drawing? Sharing the work is all the fun
I would like to try this out but upon loading it into windows ubuntu
python3 ./Fourier/main.py saint jalm.jpg
it just gives me this error
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
path: /home/hunter/FourierImages/saint
[Application of the Fourier Transform.] Window has been created.
Traceback (most recent call last):
File "./Fourier/main.py", line 27, in
context = Context(name="Application of the Fourier Transform.", fullscreen=False)
File "/home/hunter/Fourier/fourier_drawing/context.py", line 418, in init
draw = Draw(**kwargs)
File "/home/hunter/Fourier/fourier_drawing/draw.py", line 35, in init
window = Window(**kwargs)
File "/home/hunter/Fourier/fourier_drawing/window.py", line 49, in init
self.build(size)
File "/home/hunter/Fourier/fourier_drawing/window.py", line 65, in build
self.info = pygame.display.Info()
pygame.error: video system not initialized
Its possible i'm just missing something but I have spent a couple of hours just getting here since for whatever reason nothing wanted to install properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.