Slexy.org is shutting down and stopped accepting new Pastes on May 4th, 2021.
Existing Pastes will stop being available on or after May 10th, 2021.
Author: Not specified Language: python
Description: Not specified Timestamp: 2018-03-29 21:08:50 +0000
View raw paste Reply
## Python 2.7.10 + numpy
## Output results to screen
import numpy as np
R = 8.0
r = 1.0
a = 4.0
n = 16
# Center SMG123 @ 34.021221, -118.289221
x0 = 34.021221
y0 = -118.289221
for t in np.arange(0, np.pi*n, 0.01):
    x = (R+r)*np.cos((r/R)*t) - a*np.cos((1+r/R)*t)
    y = (R+r)*np.sin((r/R)*t) - a*np.sin((1+r/R)*t)
    print '%.6f,%.6f' % (float(y0+y/1000), float(x0+x/1000))
View raw paste Reply