samedi 24 octobre 2020

How to plot rose randomly?

Is is possible to have a plot, something like This random triangle, but instead of . we have Roses? I mean, How can we plot the below Rose in random locations??

import numpy as np
import matplotlib.pyplot as plt
t,k = np.linspace(0,2*np.pi,1000),5


x = np.cos(k*t)*np.cos(t)
y = np.cos(k*t)*np.sin(t)


plt.plot(x,y,'r')
plt.axis('off')
plt.axis('square')
plt.show()

enter image description here




Aucun commentaire:

Enregistrer un commentaire