Skip to content

wigging/exponential-sums

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exponential Sums

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".

Installation and Usage

Requires Python 3, NumPy, and Matplotlib.

Clone this repository and run the following command:

>>> python expsum func1 2000 10 7 17

Create an animated plot by passing the optional --anim argument:

>>> python expsum func1 2000 10 7 17 --anim

Examples

Examples of the functions available in the expsum package are shown below.

Function 1

>>> python expsum func1 2000 10 7 17

>>> python expsum func1 8000 11 21 31

Function 2

>>> python expsum func2 1200 100

>>> python expsum func2 4000 800

Function 3

>>> python expsum func3 1000

>>> python expsum func3 4000

Function 4

>>> python expsum func4 4000 4

Function 5

python expsum func5 4000 50 100

Function 6

>>> python expsum func6 2000 4

Function 7

>>> python expsum func7 8000 4

Contributing

Submit a Pull Request if you would like to contribute to this project. Questions and other comments can be submitted on the Issues page.

Support

Support this project by making a donation at paypal.me/gavinwiggins. Thank you 😁

References

  1. John D. Cook. Exponential sums make pretty pictures. October 7, 2017.
  2. David Angell. Exponential sums. School of Mathematics and Statistics, UNSW. Accessed July 7, 2019.
  3. Wikipedia contributors. Exponential sum. In Wikipedia, The Free Encyclopedia. Accessed July 20, 2019.

About

Generate plots and animations of exponential sums

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages