Exponential sums are an area of math represented by a series with terms that are complex exponentials. These types of sums are related to Fourier analysis and number theory. Plotting exponential sums produces various designs based on the type of input function.
An exponential sum is represented by the following equation
where the exponential is a complex number. The function f(n) is a real-valued function defined for a sequence of positive integers. The Python package expsum plots the exponential sum in the complex plane as a progression of partial sums. The x-axis on the plot is the real part and the y-axis is the imaginary part.
This project is inspired by John Cook's article "Exponential sums make pretty pictures".
Requires Python 3, NumPy, and Matplotlib.
Clone this repository and run the following command:
>>> python expsum func1 2000 10 7 17Create an animated plot by passing the optional --anim argument:
>>> python expsum func1 2000 10 7 17 --animExamples of the functions available in the expsum package are shown below.
>>> python expsum func1 2000 10 7 17>>> python expsum func1 8000 11 21 31>>> python expsum func2 1200 100>>> python expsum func2 4000 800>>> python expsum func3 1000>>> python expsum func3 4000>>> python expsum func4 4000 4python expsum func5 4000 50 100>>> python expsum func6 2000 4>>> python expsum func7 8000 4Submit a Pull Request if you would like to contribute to this project. Questions and other comments can be submitted on the Issues page.
Support this project by making a donation at paypal.me/gavinwiggins. Thank you 😁
- John D. Cook. Exponential sums make pretty pictures. October 7, 2017.
- David Angell. Exponential sums. School of Mathematics and Statistics, UNSW. Accessed July 7, 2019.
- Wikipedia contributors. Exponential sum. In Wikipedia, The Free Encyclopedia. Accessed July 20, 2019.