3D Earth and Celestial Bodies (planet3D)

版本 5.4.0.0 (173.7 MB) 作者: Tamas Kis
Creates high-resolution renderings of the Earth and the major celestial bodies in our solar system for space mechanics applications.
1.6K 次下载
更新时间 2023/5/21

编者注: This file was selected as MATLAB Central Pick of the Week

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 astrodynamics applications.

Syntax

planet3D
planet3D(planet)
planet3D(planet,opts)
planet_surface = planet3D(__)

Description

planet3D draws the Earth with clouds. Units are in meters by default.

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', 'Earth Coastlines', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', or 'Pluto'. Units are in meters by default.

planet3D(planet,opts) does the same as the syntax above, but allows for the specification of optional plotting parameters. opts is a struct that has the following fields:

  • Clipping'on' if surfaces should be "clipped" to fit axes, 'off' otherwise (defaults to off)
  • Color → specifies line color
  • FaceAlpha → specifies how transparent the celestial body is (0 for 100% transparency, 1 for 100% opacity)
  • LineWidth → specifies line width
  • LineStyle → specifies line style
  • Position → specifies the position of the center of the celestial body
  • RefPlane → 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).
  • RotAngle → specifies the rotation angle about the 3rd axis of the celestial body (in degrees)
  • Units → specifies the units the celestial body should be drawn in. Units available are 'AU', 'ft', 'km', 'm', 'mi', and 'nmi'.

planet_surface = planet3D(__) does the same as the previous two syntaxes, but also returns the Surface object defining the planet.

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.
  • If you want to produce separate plots on separate figures using the planet3D function, always use the drawnow command before initializing a new figure to ensure that the correct plots are drawn on the correct figures.
  • All fields of opts do NOT have to be defined; when a field is left undefined, the rest of the plot settings are set to default values. Additionally, Color, LineWidth, and LineStyle are only relevant when plotting the Earth's coastlines.





background

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

Syntax

background(spec)

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'.

Note

  • The function call on background must occur before the function call on planet3D.





Examples and Additional Documentation





Installation

  • Open 3D Earth and Celestial Bodies (planet3D).mltbx in the INSTALL folder to install as a toolbox. MATLAB will automatically perform the installation and add all the functions, images, and data to the MATLAB search path.
  • Alternatively, the "planet3D" folder can be copy and pasted into the folder containing the script that you want to use the functions in. At the beginning of the script, include addpath('planet3D') to add all functions, images, and data to the MATLAB search path.

引用格式

Tamas Kis (2024). 3D Earth and Celestial Bodies (planet3D) (https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.4.0), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2021b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

planet3D

版本 已发布 发行说明
5.4.0.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.4.0

5.3.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.3.0

5.2.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.2.0

5.1.1

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.1.1

5.1.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.1.0

5.0.4

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.0.4

5.0.3

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.0.3

5.0.2

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/5.0.2

5.0.1

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v5.0.1

5.0.0.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/5.0.0
See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/5.0.0

4.1.1

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/4.1.1

4.1.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/4.1.0

4.0.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v4.0.0

3.0.1

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v3.0.1

3.0.0.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v3.0.0
See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v3.0.0

2.0.8

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.8

2.0.7

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.7

2.0.6

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.6

2.0.5

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.5

2.0.4

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.4

2.0.3

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.3

2.0.2

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.2

2.0.1.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.1
See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.1

2.0.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v2.0.0

1.1.0

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v1.1.0

1.0.2

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v1.0.2

1.0.1

See release notes for this release on GitHub: https://github.com/tamaskis/planet3D-MATLAB/releases/tag/v1.0.1

1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库