Ein Kugelnetz mit Matplotlib auftretenPython

Python-Programme
Anonymous
 Ein Kugelnetz mit Matplotlib auftreten

Post by Anonymous »

In Matplotlib möchte ich eine Kugel mit einem Netz auf der Oberfläche zeichnen, die in kugelförmigen Koordinaten in 30 Grad Schritte unterteilt ist.from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

u = np.linspace(0, 2 * np.pi, 13)
v = np.linspace(0, np.pi, 7)

x = 10 * np.outer(np.cos(u), np.sin(v))
y = 10 * np.outer(np.sin(u), np.sin(v))
z = 10 * np.outer(np.ones(np.size(u)), np.cos(v))
ax.plot_surface(x, y, z, rstride=1, cstride=1, color='w', shade=0)

plt.show()
< /code>

Erzeugt die Abbildung: < /p>

Image


How can I plot lines on a smooth sphere that are um 30 Grad getrennt?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post