Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Plot the positions of solar system objects in 3D
| ResourceFunction["SolarSystemPlot3D"][primitives] represents a three-dimensional graphical image for the current date that works with solar system entities as well as standard 3D graphics primitives and directives. | |
| ResourceFunction["SolarSystemPlot3D"][primitives,date] represents a three-dimensional graphical image for the specified date that works with solar system entities as well as standard 3D graphics primitives and directives. | |
| ResourceFunction["SolarSystemPlot3D"][primitives,{date1,date2}] represents a three-dimensional graphical image for the specified range of dates that works with solar system entities as well as standard 3D graphics primitives and directives. | 
| "EclipticPlaneStyle" | Directive[GrayLevel[1],Opacity[0.2]] | style to use for drawing the ecliptic plane | 
| "IncludeEclipticPlane" | True | whether to draw the ecliptic plane | 
| "IncludeReferenceObjects" | False | whether to include important background reference objects | 
| "IncludeSun" | True | whether to include the Sun | 
| LabelingFunction | Automatic | how to label points | 
| LabelingSize | Automatic | size to use for callout and label | 
| "OrbitsToInclude" | Automatic | list of entities whose orbits to include | 
| "OrbitStyle" | Automatic | style to use for drawing orbits | 
| "SunStyle" | Automatic | style directives to use for rendering the Sun | 
Plot the position of a planet:
| In[1]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Red, Sphere[Entity["Planet", "Neptune"], 1]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/7dc7f9f231d424e7.png) | 
| Out[1]= |  | 
Plot the position of a minor planet:
| In[2]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Pink, Sphere[Entity["MinorPlanet", "Pluto"], 1]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/6fd751d64706eb46.png) | 
| Out[2]= |  | 
Plot the position of a comet:
| In[3]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Red, Sphere[Entity["Comet", "Comet1PHalley"], 1]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/0ced77e7046ab7d0.png) | 
| Out[3]= |  | 
Plot the position of a deep space probe:
| In[4]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Green, Sphere[Entity["DeepSpaceProbe", "NEWHorizons"], 1]}, PlotRangePadding -> 1]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/4aa20257ac7ddeae.png) | 
| Out[4]= |  | 
Plot the position of a planet on a specific date:
| In[5]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Neptune"], 2]}, DateObject[{1986, 1, 3}, "Day", "Gregorian", -6.`], PlotRangePadding -> 2]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/0de22482784f4914.png) | 
| Out[5]= |  | 
Plot the positions of multiple solar system objects:
| In[6]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Neptune"], 2], Pink, Sphere[Entity["MinorPlanet", "Pluto"], 1], Green, Sphere[Entity["DeepSpaceProbe", "NEWHorizons"], 1], Red, Sphere[Entity["Comet", "Comet1PHalley"], 1]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/3d46674f416c45e6.png) | 
| Out[6]= |  | 
Plot the positions of multiple solar system objects on a specified date:
| In[7]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Neptune"], 2], Pink, Sphere[Entity["MinorPlanet", "Pluto"], 1], Red, Sphere[Entity["Comet", "Comet1PHalley"], 1]}, DateObject[{1986, 1, 3}, "Day", "Gregorian", -6.`]]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/783f837c6ba84005.png) | 
| Out[7]= |  | 
"OrbitsToInclude" can be used to specify which orbits should be included in the scene:
| In[8]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Neptune"], 2]}, "OrbitsToInclude" -> {Entity["Planet", "Neptune"], Entity["MinorPlanet", "Pluto"]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/57bd65962dfbc8e9.png) | 
| Out[8]= |  | 
"OrbitStyle" can be used to style the orbits according to arbitrary styles and directives:
| In[9]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Neptune"], 1]}, "OrbitStyle" -> Red]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/49896849ce2aab4d.png) | 
| Out[9]= |  | 
"IncludeSun" can be used to remove the Sun from the scene:
| In[10]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Earth"], .1], White, Sphere[Entity["Planet", "Venus"], .1], Gray, Sphere[Entity["Planet", "Mercury"], .1]}, "IncludeSun" -> False, PlotRange -> 1.7]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/0e610fdc6cbb80c9.png) | 
| Out[10]= |  | 
"SunStyle" can be used to change the directives and primitives used to create the Sun. By default, the Sun is drawn to scale as a yellow sphere:
| In[11]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Earth"], .1], White, Sphere[Entity["Planet", "Venus"], .1], Gray, Sphere[Entity["Planet", "Mercury"], .1]}, "SunStyle" -> {Red, Lighting -> {{"Ambient", GrayLevel[.3]}, {"Directional", White, ImageScaled[{0, 0, 1}]}}, Sphere[{0, 0, 0}, .1]}, PlotRange -> 1.7]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/677e8757e1c787f6.png) | 
| Out[11]= |  | 
"IncludeEclipticPlane" is False by default, but can be set to True:
| In[12]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Earth"], .1], White, Sphere[Entity["Planet", "Venus"], .1], Gray, Sphere[Entity["Planet", "Mercury"], .1]}, "IncludeEclipticPlane" -> True, PlotRange -> 1.7, "IncludeReferenceObjects" -> False]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/7c0603b54032767b.png) | 
| Out[12]= |  | 
"EclipticPlaneStyle" can be used to specify the directives to use in styling the ecliptic plane:
| In[13]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Earth"], .1], White, Sphere[Entity["Planet", "Venus"], .1], Gray, Sphere[Entity["Planet", "Mercury"], .1]}, "IncludeEclipticPlane" -> True, "EclipticPlaneStyle" -> Directive[Blue, Opacity[.5]], "IncludeReferenceObjects" -> False, PlotRange -> 1.7]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/093a3a45e79a3ef1.png) | 
| Out[13]= |  | 
Force all callout labels to display:
| In[14]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Cyan, Opacity[.2], EdgeForm[], Cone[{1.5 (Entity["Comet", "CometC2022E3ZTF"]), Entity["Comet", "CometC2022E3ZTF"]}, .05]}, DateObject[{2023, 1, 13}], ViewAngle -> Pi/200,
 "SunStyle" -> {Yellow,
   Lighting -> {
     {"Ambient", GrayLevel[.3]},
     {"Directional", White, ImageScaled[{0, 0, 1}]}
     }, Sphere[{0, 0, 0}, .05]}, LabelingFunction -> Callout]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/1a80b98fefb30163.png) | 
| Out[14]= |  | 
"IncludeReferenceObjects" can be set to False to avoid computing the positions of background reference objects:
| In[15]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Orange, Sphere[Entity["Planet", "Jupiter"], .3]},
  "IncludeReferenceObjects" -> False, PlotRangePadding -> .2]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/6a06e9526453a0c4.png) | 
| Out[15]= |  | 
Visualize comet 46P/Wirtanen as it passes near the Earth:
| In[16]:= | ![With[{comet = Entity["Comet", "Comet46PWirtanen"]}, ResourceFunction[
  "SolarSystemPlot3D"][{LightBlue, Sphere[Entity["Planet", "Earth"], .02], Cyan, Sphere[comet, .01], EdgeForm[], Cone[{1.1 comet, comet}, .02]}, DateObject[{2018, 12, 15}, "Day", "Gregorian", -6.`], "OrbitStyle" -> Gray, "SunStyle" -> {ColorData["BlackBodySpectrum"][5770], Lighting -> {{"Ambient", GrayLevel[.3]}, {"Directional", White, ImageScaled[{0, 0, 1}]}}, Sphere[{0, 0, 0}, .1]}, Background -> Black, Boxed -> False, PlotRange -> 1.2, SphericalRegion -> True, ViewCenter -> {.6, .85, .5}, ViewAngle -> Pi/20, Lighting -> {{"Point", White, {0, 0, 0}}}, "IncludeReferenceObjects" -> False]]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/7d551012a90f6ac1.png) | 
| Out[16]= |  | 
Track Elon Musk's Tesla in space:
| In[17]:= | ![With[{tesla = Entity["DeepSpaceProbe", "FalconHeavyDemonstrationMission"]},
 ResourceFunction[
  "SolarSystemPlot3D"][{Text["Tesla", tesla, {-1.5, 0}], PointSize[.02], Red, Point[tesla]}, DateObject[{2020, 9, 1}], PlotRange -> 2.1, ViewPoint -> Above, Boxed -> False, ViewAngle -> Pi/7, "SunStyle" -> {Hue[.14], Lighting -> {{"Ambient", GrayLevel[.3]}, {"Directional", White, ImageScaled[{0, 0, 1}]}}, Sphere[{0, 0, 0}, .1]}]]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/3fc8337051063c35.png) | 
| Out[17]= |  | 
The coordinates of some objects may not be available or may have restrictions on which dates they are available, which can result in invalid coordinates for a 3D scene:
| In[18]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Green, Sphere[Entity["DeepSpaceProbe", "NEWHorizons"], 1]}, DateObject[{1986, 1, 3}, "Day", "Gregorian", -6.`]]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/2572f90e912593b3.png) | 
| Out[18]= |  | 
Simulate the inner planets being illuminated by the Sun:
| In[19]:= | ![ResourceFunction[
 "SolarSystemPlot3D"][{Blue, Sphere[Entity["Planet", "Earth"], .1], White, Sphere[Entity["Planet", "Venus"], .1], Gray, Sphere[Entity["Planet", "Mercury"], .1]}, PlotRange -> 1.7, ViewPoint -> Top, Boxed -> False, Background -> Black, "OrbitStyle" -> Gray, Lighting -> {{"Ambient", GrayLevel[.2]}, {"Point", White, {0, 0, 0}}},
  "IncludeReferenceObjects" -> False]](https://www.wolframcloud.com/obj/resourcesystem/images/ae1/ae1361de-8cda-4b0f-a67e-0ca9d214f7d6/2c6e2a5bd650283d.png) | 
| Out[19]= |  | 
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License