Created
May 3, 2022 11:34
-
-
Save wolfmanjm/6a77382b59079cdddc0d22f21ecf1cad 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 matplotlib.pyplot as plt | |
x0=0 # First Position (Start) | |
xd=100 # Second Position (End) | |
T=100 # Time | |
x= [0] * 101 | |
for t in range(0,101): | |
x[t]= x0+(xd-x0)*(10*((t/T)**3)-15*((t/T)**4)+6*((t/T)**5)) | |
plt.plot(x) | |
plt.title('S-Curve for Motion') | |
plt.xlabel('Time') | |
plt.ylabel('Position') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment