#幾何拼貼
import matplotlib.pyplot as plt
import numpy as np
plt.figure(figsize=(10,10),dpi=80)
plt.xlim(-100, 900)
plt.ylim(-100, 900)
for i in range(0,5):
for j in range(0,5):
X=[0,20,80,100]
Y=[0,60,40,100]
X = np.array(X)
Y = np.array(Y)
plt.plot(X+200*i,Y+200*j,color="blue",linewidth=2)
plt.plot(X+200*i,-Y+200*j,color="blue",linewidth=2)
plt.plot(-X+200*i,Y+200*j,color="blue",linewidth=2)
plt.plot(-X+200*i,-Y+200*j,color="blue",linewidth=2)
plt.plot(Y+200*i,X+200*j,color="green",linewidth=2)
plt.plot(Y+200*i,-X+200*j,color="green",linewidth=2)
plt.plot(-Y+200*i,X+200*j,color="green",linewidth=2)
plt.plot(-Y+200*i,-X+200*j,color="green",linewidth=2)
X=[0,65,35,100]
Y=[100,65,35,0]
X = np.array(X)
Y = np.array(Y)
plt.plot(X+200*i,Y+200*j,color="red",linewidth=2)
plt.plot(X+200*i,-Y+200*j,color="red",linewidth=2)
plt.plot(-X+200*i,Y+200*j,color="red",linewidth=2)
plt.plot(-X+200*i,-Y+200*j,color="red",linewidth=2)
plt.plot(Y+200*i,X+200*j,color="red",linewidth=2)
plt.plot(Y+200*i,-X+200*j,color="red",linewidth=2)
plt.plot(-Y+200*i,X+200*j,color="red",linewidth=2)
plt.plot(-Y+200*i,-X+200*j,color="red",linewidth=2)
plt.show()
#幾何拼貼
訂閱:
文章 (Atom)