Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. # kruznice
  2. r = 1
  3. t = np.linspace(0, 2*np.pi, 1000)
  4. R = r * np.ones(len(t))
  5. obsah = np.trapz(R, t)  # integral R(t) dt
  6. print(obsah)
  7. x = R * np.cos(t)
  8. y = R * np.sin(t)
  9.  
  10. # vas obrazec
  11. r, a, n = 30, 5, 2
  12.  
  13. t = np.linspace(0, 2*np.pi, 1000)
  14. R = r + a * np.sin(n * t)
  15.  
  16. obsah = np.trapz(R, t)  # integral R(t) dt
  17. print(obsah)
  18.  
  19. x = R * np.cos(t)
  20. y = R * np.sin(t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement