Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to plot 3D Earth in Python?

I'm trying to plot a satellite orbit around the Earth. This is what I currrently have:

enter image description here

I made this plot using the Axes3D function in mpl_toolkits.mplot3d. Ideally what I would like to do, is to replace the simple sphere with an actual Earth with topology.

If you're not sure what I mean, take a look at a MATLAB implementation:

http://uk.mathworks.com/matlabcentral/fileexchange/13823-3d-earth-example

The Basemap package could be of help (especially the bluemarble() function), but unforunately I can't make it work on 3D objects. There is a similar question here, but the answer to that question results in a projection of a 3D sphere on a 2D plot. I want a 3D sphere on a 3D plot, so that I'm able to rotate around it.

Does anybody know of another package/implementation. Or is there a way to make Basemap work with 3D objects?

---EDIT---

Somebody asked the same question, but nobody has answered it yet

like image 960
MichaelDeSanta Avatar asked Jan 17 '16 12:01

MichaelDeSanta


1 Answers

I have asked something similar some times ago

PyOpenGL sphere with texture

If I were you I would pick a OpenGL and use a texture of Earth on it just like this one

enter image description here https://i.stack.imgur.com/ojwD8.jpg

In any case there is my second thread where I needed to make a Mars planet which is basically the same as you want except different texture:

Why my texture is not showing PyOpenGL

like image 91
Michael Tesař Avatar answered Oct 03 '22 00:10

Michael Tesař