import numpy as np import matplotlib.pyplot as plt def plot_speed_line(K): theta = np.linspace(-3*np.pi, 3*np.pi, 100) x = K * (theta - np.sin(theta)) y = K * (1 - np.cos(theta)) plt.figure(figsize=(8,6)) plt.axis('equal') plt.plot(x, y, 'r', linewidth=2.0) plt.show() plot_speed_line(8) |
|