Note
Click here to download the full example code
Create a rotating element¶
Create a rotating element.
0.0 [ 0.19634954 1.4529866 2.70962366 -2.31692458 -1.06028752]
1.0 [ 0.32724923 1.5838863 2.84052336 -2.18602489 -0.92938783]
2.0 [ 0.45814893 1.71478599 2.97142305 -2.05512519 -0.79848813]
from math import pi
import matplotlib.pyplot as plt
import freshkiss3d as fk
element = fk.Rotating(angles_number = 5,
angular_velocity = 2*pi/48.,
phase = 2.*pi/32.)
for time in [0., 1., 2.]:
element.rotates(time)
print(time, element.angles)
element.plot()
plt.legend()
plt.axis('scaled')
plt.xlim(-1.2, 1.2)
plt.ylim(-1.2, 1.2)
plt.show()
Total running time of the script: ( 0 minutes 0.111 seconds)