Skip to content

Instantly share code, notes, and snippets.

@kumanna
Created February 21, 2024 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumanna/245bddf4363c380f6456cde7277b0426 to your computer and use it in GitHub Desktop.
Save kumanna/245bddf4363c380f6456cde7277b0426 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
t = np.arange(-10, 10, 0.001)
r = np.zeros_like(t);N = 100;
for i in range(-N, N + 1):
r = r + np.exp(1j * 2 * np.pi * t * i)
plt.plot(t, np.real(r));plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment