SHARE
TWEET

Untitled

a guest Oct 21st, 2019 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. from mpl_toolkits.mplot3d import Axes3D
  4.  
  5.  
  6. # calc
  7. L, M = np.meshgrid(np.linspace(0, 1, 1000), np.linspace(0, 1, 1000))
  8. L = 4 * L + 4
  9. area_top = L * (L - 4)
  10. area_left = L * M * 4
  11. area_right = L * L * (1 - M)
  12. depth = (area_top - area_left) ** 2 \
  13.       + (area_top - area_right) ** 2 \
  14.       + (area_left - area_right) ** 2
  15.  
  16. # plot
  17. fig = plt.figure()
  18. ax = fig.add_subplot(111, projection='3d')
  19. ax.invert_yaxis()
  20. ax.plot_wireframe(L, M * L, np.log(depth))
  21. plt.show()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top