# How to draw a earth

This topic is 2708 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, guys!

I want to draw a earth as to overlay some interest on it .
but you know that the earth is [font=Arial]

## spheroid and[/font][font=Arial][size=2] [/font][font=Arial][size=2]semi-major axis is longer than the other.[/font] [font=Arial][size=2][/font] [font=Arial][size=2]anybody who give some ideas? 3ks here.[/font]

##### Share on other sites
So kinda like this?
http://learningwebgl.com/blog/?p=1778

basically a sphere with a texture of earth sphere-mapped to it.

Your post is hard to decipher.

##### Share on other sites
The Earth is a planet, not a spheroid. Its precise mathematical model is rather complex.
For the most precise approximation of the mean sea level you should use geoid. The geoid is changing. It depends on the magnetic field of the Earth, but also depends on the Sun and the Moon. You can download some pretty precise geoid models of the Earth.

Less precise, but more common is the approximation that uses ellipsoid. WGS84 ellipsoid is used for GPS navigation and is very common these days.

The least accurate approximation of Earth curvature is a sphere. I have no idea what your visualization would serve for, but in 99.99% you will not see the difference between the shpere and WGS84 ellipsoid. You have noticed that there are differences between axis, but that difference is only 0.3%!!! The difference can be noticeable only when placing satellites high above the Earth, since calculated geographic position of the point beneath would significantly depend on the chosen approximation.

Also you would need same DEM data. For precise modeling you need several terabytes of data (both textures and DEM).

If the overlay is in a specific projection, you'll also need assistance of some GIS tool, or reprojecting library.

##### Share on other sites
@Aks9: Kudos for pointing out WGS84.

Though I really believe that it's entirely impossible for any of us to see a difference between a sphere and WGS84 in this situation. At 26'' screen resolution, a fullscreen earth would have a difference of 4 pixels between horizontal and vertical diameters. I'm pretty sure that even if shown both images side by side, I would be unable to tell one from the other. And in a "placebo controlled" experiment, I would probably be wrong 50% of the time :-)

##### Share on other sites

The Earth is a planet, not a spheroid. Its precise mathematical model is rather complex.
For the most precise approximation of the mean sea level you should use geoid. The geoid is changing. It depends on the magnetic field of the Earth, but also depends on the Sun and the Moon. You can download some pretty precise geoid models of the Earth.

Less precise, but more common is the approximation that uses ellipsoid. WGS84 ellipsoid is used for GPS navigation and is very common these days.

The least accurate approximation of Earth curvature is a sphere. I have no idea what your visualization would serve for, but in 99.99% you will not see the difference between the shpere and WGS84 ellipsoid. You have noticed that there are differences between axis, but that difference is only 0.3%!!! The difference can be noticeable only when placing satellites high above the Earth, since calculated geographic position of the point beneath would significantly depend on the chosen approximation.

Also you would need same DEM data. For precise modeling you need several terabytes of data (both textures and DEM).

If the overlay is in a specific projection, you'll also need assistance of some GIS tool, or reprojecting library.

I think I need a precise mathematical model to the earth, because I am a gis programmer. I can expertly use professional gis tool, but lack of 3d knowledge.
At first I want to model the earth reference to google earth or worldwind earth.
the most precise approximation of the mean sea level is changing at any time, that's exactly rather complex for me.
I preliminary plan to use ellipsoid and refer to WGS84, as it is commonly and widely used in the world. we can cplit the earth by longitude and latitude.
In WGS84,the parameters described as the semi-major axis is 6378137.0,and the slope is 298.257223563.

I bought the ?opengl super bible?forth editon.In the book,it uses the glut libs. but i do not find a api to draw a ellipsoid.
could you give more advices? thanks.

##### Share on other sites
You can only draw triangles. So take your math model and turn it into triangles - probably thousands of them

##### Share on other sites
in the physics section on my website you will find a video tutorial that shows how you can render a planet

1. 1
2. 2
Rutin
20
3. 3
khawk
16
4. 4
A4L
14
5. 5

• 11
• 16
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633756
• Total Posts
3013710
×