Skip to content

anvaka/e-sum

Repository files navigation

e-sum

Art project to visualize complex exponential sums. Demo.

demo

To create an interesting pattern, click "Create new Image" until you like it. It may take a few attempts before you stumble upon something pretty with intricate patterns.

demo

I couldn't come up with better rules to generate nice looking patterns more consistently, so if you have suggestions - please let me know.

When you find something you like copy a link to the page - and share it :). A few examples that I found pretty:

What is going on here?

An exponential sum is the following expression:

Exponential sum

When we translate it to complex plane we get both x and y coordinates:

x = cos(2 π f(x))
y = sin(2 π f(x))

Sequence of partial sums is plotted as sequence of connected points by this visualization.

Known issues

If you see your visualization "runs away" - it could be either a floating point error, or "diverging" sum. To avoid the errors - reduce the Total steps value in the visualization settings, so that summation stops earlier.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

Thank you!

The project was inspired by a small conversation on Twitter.

If you liked it please let me know. Give it a star, or become a patron.

I hope you find it amusing :).

License

MIT