Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # kruznice
- r = 1
- t = np.linspace(0, 2*np.pi, 1000)
- R = r * np.ones(len(t))
- obsah = np.trapz(R, t) # integral R(t) dt
- print(obsah)
- x = R * np.cos(t)
- y = R * np.sin(t)
- # vas obrazec
- r, a, n = 30, 5, 2
- t = np.linspace(0, 2*np.pi, 1000)
- R = r + a * np.sin(n * t)
- obsah = np.trapz(R, t) # integral R(t) dt
- print(obsah)
- x = R * np.cos(t)
- y = R * np.sin(t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement