Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. %matplotlib inline
  2. import numpy as np
  3. import cv2
  4. import matplotlib.pyplot as plt
  5. from mpl_toolkits.mplot3d import Axes3D
  6. from PIL import ImageTk,Image
  7. from tkinter import *
  8.  
  9. fig = plt.figure()
  10. ax = fig.add_subplot(111, projection='3d')
  11.  
  12. # Make data
  13. u = np.linspace(0, 2 * np.pi, 100)
  14. v = np.linspace(0, np.pi, 100)
  15. x = 20 * np.outer(np.cos(u), np.sin(v))
  16. y = 20 * np.outer(np.sin(u), np.sin(v))
  17. z = 20 * np.outer(np.ones(np.size(u)), np.cos(v))
  18.  
  19.  
  20.  
  21. # Plot the surface
  22. ax.plot_surface(x, y, z, alpha=.5)
  23.  
  24.  
  25. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement