Mandalas are diagrams often used for astrological spiritual guidance in certain religions like Hinduism and Buddism among others. Regardless of the scientific relevance of such constructs, the patterns that result are often intricate and beautiful even if you don’t believe in any meaning that can be derived from such a diagram. So, how are mandalas constructed? A new Wolfram Function Repository item (WFR) has been published allowing the construction of mandalas from the positions of planets and asteroids in the solar system.
Here is some code that illustrates how solar system mandalas are constructed. In this case, I’ve computed the position of Jupiter and Saturn in the ecliptic reference frame and shifted to the solar system barycenter. A line is then drawn from one planet to the other as time is incremented continuously and only lines at a particular increment are kept.
In[]:=
Manipulate[​​Graphics[{Opacity[.3],Line[#,VertexColors->{Yellow,Pink}]&/@data[[1;;t]],Opacity[1,Red],{Thick,Line[data[[t]]]},{Darker[Gray],Line[data[[1;;t]][[All,1]]],Line[data[[1;;t]][[All,2]]]},{White,PointSize[.02],Point[data[[t]]]}},PlotRange->10,Background->Black],​​{{t,1,"frame"},1,Length[data],1,Appearance->"Labeled"},​​SynchronousInitialization->False,​​Initialization:>(​​dr=With[{now=DateObject[{1950,1,1,0,0,0}]},DateRange[now,now+5Entity["Planet","Jupiter"]["OrbitPeriod"],Quantity[6,"Months"]]];p1=Most[AstroPosition["SaturnBarycenter",{"Ecliptic",#,"SSB","GravitationalTimeDelay"->False},"Cartesian"]["Data"]]&/@dr;p2=Most[AstroPosition["JupiterBarycenter",{"Ecliptic",#,"SSB","GravitationalTimeDelay"->False},"Cartesian"]["Data"]]&/@dr;data=Transpose[{p1,p2}];​​)]
Out[]=
​
frame
1
For what its worth, the barycenter of these planet systems are used preferentially because precise positions are available for much further in time for barycenters. AstroPosition supports the more precise body centers which wobbles due to the effects of orbiting moons tugging on the planets, but such precise computations aren’t available in the far past or future. Barycenters are good enough for the purposes here.
The final resulting pattern can be viewed using the WFR as follows.
In[]:=
ResourceFunction["SolarSystemMandala"]
Saturn
PLANET
,
Jupiter
PLANET
,5
Jupiter
PLANET
["OrbitPeriod"],Quantity[6,"Months"],"LineOpacity"->.3,"LineColors"->{Yellow,Pink},AstroReferenceFrame->{"Ecliptic","SSB"}
Out[]=
The resulting pattern has a rather intricate spirograph-like appearance. The mandala can be styled and sampled in different ways to get many different intricate patterns, each depending on the bodies and reference frame it is constructed from.
Many patterns emerge with only relatively few orbits and a low sampling rate this the one above. Here’s another one that shows the pattern generated by Earth and Venus.
In[]:=
ResourceFunction["SolarSystemMandala"]
Earth
PLANET
,
Venus
PLANET
,10
Earth
PLANET
["OrbitPeriod"],Entity["Planet","Earth"]["OrbitPeriod"]26,AstroReferenceFrame->{"Ecliptic","SSB"},"LineColors"->Darker[Gray],Background->RGBColor[1,.95,.8]
Out[]=
Additional styling can be applied for more subtle effects such as having each line vary from one color to another, creating a gradient along each line, as shown here for Mars and Venus.
In[]:=
ResourceFunction["SolarSystemMandala"]
Mars
PLANET
,
Venus
PLANET
,5
Mars
PLANET
["OrbitPeriod"],Quantity[6,"Days"],AstroReferenceFrame->{"Ecliptic","SSB"},"LineOpacity"->.5,"LineColors"->{Darker[Red],LightBlue},PlotRange->1
Out[]=
Even widely separated objects like Pluto and Venus can create intricate patterns even when far less than one orbit of the outer objects is specified.
In[]:=
ResourceFunction["SolarSystemMandala"]
Pluto
MINOR PLANET
,
Venus
PLANET
,
Pluto
MINOR PLANET
["OrbitPeriod"]2,Quantity[3,"Months"],AstroReferenceFrame->{"Ecliptic","SSB"},"LineOpacity"->.2,"LineColors"->{Red,LightYellow},PlotRange->2
Out[]=
In[]:=
ResourceFunction["SolarSystemMandala"]
Pluto
MINOR PLANET
,
Venus
PLANET
,10
Pluto
MINOR PLANET
["OrbitPeriod"],Quantity[1,"Years"],AstroReferenceFrame->{"Ecliptic","SSB"},"LineOpacity"->.02,"LineColors"->{Red,LightYellow},PlotRange->2
Out[]=

Longer Orbit Periods and Smaller Increments

The following examples push things further and result in much more subtle lines, appearing more like continuous surfaces. As a result, some may take a bit longer to evaluate.

Venus and Mercury

With only 2 orbits of Venus, the pattern generated by Venus and Mercury doesn’t seem very regular.
Extending the time to 120 orbits of Venus, a subtle inner petal structure emerges.

Earth and Venus

Extending the number of orbits of Earth and Venus to 75 orbits of Earth results in significant symmetry.

Earth and Mercury

Over a single Earth orbit around the Sun, the pattern generated between Earth and Mercury is noticeable.
Extending this to 75 Earth orbits creates a corona-like effect.

Venus and Mercury

75 Venus orbits with Mercury creates a more structured corona-like effect.

Jupiter and Mars

Jupiter and Neptune create a very symmetrical pattern over 10 Jupiter orbits.

Jupiter and Neptune

Jupiter and Neptune create a very symmetrical pattern over 14 Jupiter orbits.

Mars and Mercury

Mars and Mercury create a star-shaped pattern over a single orbit of Mars.
Extending this to 2 Mars orbits creates an additional star-shaped pattern, but rotated with respect to the first.

Pluto and Neptune

Pluto and Neptune are known to have an orbital resonance with respect to each other. This combined with Pluto’s eccentric orbit creates a asymmetric pattern.
But if we extend this to 20 orbits of Pluto, an interesting nested shell appears above and right of center.

Ceres and Mars

Minor planets (a.k.a. asteroids) often have more eccentric orbits that the planets. This can result in an offset appearance to the pattern.

Ceres and Vesta

Minor planets can even be compared to other minor planets.

Asteroid Ganymed and Mars

Minor planet 1036 Ganymed has an eccentric orbit giving the outer structure an elliptical appearance compared to Mars.
The result of extending this to many more orbits is quite interesting.

Jupiter and Asteroid Ganymed

Instead of Jupiter’s moon, Ganymede, the following mandala uses the minor planet with a similar name (same used in the previous Mars example).

Mars Epicycles

In a variation of the above, we can also observe relative positions as viewed from Earth. In the simple case of a single planet, we get patterns like epicycles. The default AstroReferenceFrame is “Ecliptic” which is centered on Earth, so we don’t need to specify this option to have a “geocentric” point of view.

Jupiter and Mars

The following compares a solar system centered view and a geocentric view of Jupiter and Mars over a single Jupiter orbit. The geocentric view adds an additional wobble that results in tube-like structures.
Extending the previous example to 100 years creates a repeating structure in the inner region for the solar system centered view and a dandelion-like appearance for the geocentric view.
Removing the color from the geocentric view gives us a more traditional dandelion-like pattern.

Jupiter and Uranus

Jupiter and Uranus create a very symmetric star over one orbit period of Uranus in a solar system centered view, which gets blurry in the geocentric view.

Jupiter and Neptune

Similar to the previous example, Jupiter and Neptune provides a similar pattern but with more points to the star.

CITE THIS NOTEBOOK

Solar system mandalas: create intricate emergent patterns from the positions of planets & asteroids​
by Jeffrey Bryant​
Wolfram Community, STAFF PICKS, April 15, 2024
​https://community.wolfram.com/groups/-/m/t/3158410