Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import numpy as np
  2. import scipy.optimize
  3. from scipy.optimize import fsolve
  4. import math
  5.  
  6.  
  7.  
  8.  
  9. def cycloid(a,p) :
  10. x,y = p
  11. func = a*np.arccos(1-y/a)-sqrt(y*(2*a-y)) - x
  12. return func
  13.  
  14.  
  15.  
  16. a0 = fsolve(cycloid , 1.0 , (6.0 , 0.0))
  17.  
  18. print a0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement