File Exchange

image thumbnail

3D Earth and Celestial Bodies (planet3D)

version 2.0.8 (87.6 MB) by Tamas Kis
Creates high-resolution renderings of the Earth and the major celestial bodies in our solar system for space mechanics applications.

27 Downloads

Updated 09 Jun 2021

From GitHub

View Version History

View license on GitHub

planet3D View 3D Planets and Celestial Bodies (planet3D) on File Exchange

Creates high-resolution renderings of the Earth and the major celestial bodies in our solar system for space mechanics applications.

Syntax

planet3D(planet)
planet3D(planet,position,gmst,reference_plane,units,transparency)
planet_surface = planet3D(__)

NOTE: All parameters except for planet are optional. If you "skip over" parameters, you need to use empty bracket (i.e. []) as placeholders, otherwise you can emit parameters altogether. For example, if you don't want to specify position, but do want to specify units, then you would use the syntax planet3D(planet,[],[],[],units). Alternatively, if we wanted to specify just the position, we could use the syntax planet3D(planet,position).

NOTE: Use the background function (see below) to set the plot background. When using background to set the plot background, the function call on background must occur before the function call on planet3D, otherwise the background will be plotted over the celestial body.

Description

planet3D(planet) draws the celestial body specified by planet, which can be input as 'Sun', 'Moon', 'Mercury', 'Venus', 'Earth', 'Earth Cloudy', 'Earth Night', 'Earth Night Cloudy', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', or 'Pluto'.

planet3D(planet,position,gmst,reference_plane,units,transparency) draws the celestial body specified by planet, with the additional formatting/plotting options, all of which are optional:

  • position: Specifies the position of the celestial body. If position is not specified, the function defaults to [0,0,0]. NOTE: If you are also specifying units, make sure you input position in the correct units (i.e. in the units you intend to use).
  • gmst: Specifies the Greenwich mean sidereal time (the angle from the direction of the vernal equinox to 0 degrees longitude, measured in degrees).
  • reference_plane: Specifies which reference plane the celestial body is drawn with respect to. If specified as equatorial, the reference plane is taken to be the equatorial plane of the celestial body. If specified as ecliptic, the celestial body will be tilted by the obliquity (i.e. the angle between the ecliptic plane and the equatorial plane).
  • units: Specifies the units the celestial body should be drawn in. Units available are km, AU, m, ft, mi, nmi.
  • transparency: Specifies how transparent the celestial body is (0 for 100% transparency, 1 for 100% opacity).

planet_surface = planet3D(__) draws the celestial body and returns the Surface object defining the celestial body.





background

Sets the plot background for drawing celestial bodies in 3D.

Syntax

background(spec)

NOTE: The function call on background must occur before the function call on planet3D.

Description

background(spec) sets the plot background for drawing celestial bodies in 3D. spec refers to the specified background, and can be set to 'Black', 'Stars', or 'Milky Way'.





Examples and Additional Documentation

Cite As

Tamas Kis (2021). 3D Earth and Celestial Bodies (planet3D) (https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.8), GitHub. Retrieved .

Comments and Ratings (2)

Luke Neise

Adam Smith

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!