-
-
Save stephengruppetta/d42b3a695dc90fc1a726f2bec9ed1333 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
x = np.linspace(-1, 1, 500) | |
X, Y = np.meshgrid(x, x) | |
radius = 0.5 | |
disc = (X ** 2) + (Y ** 2) < radius ** 2 | |
plt.imshow(disc, cmap="gray") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment