Seasons of Earth due to Earth’s tilted axis of rotation w.r.t. its orbital plane.
Main idea
One can use pic
to predefine a picture of Earth:
\documentclass[border=3pt,tikz]{standalone}\tikzset{pics/earth/.style={ % Earth in orbit (argument #1 = polar angle)code={\message{^^JEarth polar angle=#1}\draw[black,very thin,fill=blue!50!cyan!50](#1:{\ROx} and {\ROy}) circle(\RE);}}}\begin{document}\begin{tikzpicture}\def\RE{0.4} % Earth radius\def\ROx{3.0} % orbit horizontal radius\def\ROy{0.9} % orbit vertical radius\foreach \ang in {0,90,180,270}{\pic {earth=\ang};}\end{tikzpicture}\end{document}
Using \ifnum .. \fi
, one can define special cases:
\documentclass[border=3pt,tikz]{standalone}\tikzset{pics/earth/.style={ % Earth in orbit (argument #1 = polar angle)code={\message{^^JEarth polar angle=#1}\coordinate (-O) at (#1:{\ROx} and {\ROy});\begin{scope}[shift={(-O)}]\fill[blue!50!cyan!50] (0,0) circle(\RE); % Earth fill (even)\fill[blue!20!black!50,rotate=0,opacity=0.9] % Earth shadow\ifnum #1=0 (90:\RE) arc(90:-90:\RE) \fi % right shadow\ifnum #1=180 (90:\RE) arc(90:270:\RE) \fi % left shadow\ifnum #1=270 (0,0) circle(\RE) \fi; % full shadow\draw[black,very thin] (0,0) circle(\RE); % Earth outline\end{scope}}}}\begin{document}\begin{tikzpicture}\def\angE{23} % Earth axis tilt\def\RE{0.4} % Earth radius\def\ROx{3.0} % orbit horizontal radius\def\ROy{0.9} % orbit vertical radius\foreach \ang in {0,90,180,270}{\pic {earth=\ang};}\end{tikzpicture}\end{document}
To create a transparent halo, we use fading:
\documentclass[border=3pt,tikz]{standalone}\usetikzlibrary{fadings}\begin{tikzfadingfrompicture}[name=halo]\shade[inner color=transparent!0,outer color=transparent!100] (0,0) circle (0.9);\end{tikzfadingfrompicture}\begin{document}\begin{tikzpicture}\fill[blue!60!black] (-5,-5) rectangle (5,5);\fill[path fading=halo,orange!80!yellow!80] % solar halo/corona(0,0) circle (5);\draw[very thin,orange!80!yellow!80,fill=orange!50!yellow!40] % Sun(0,0) circle (2);\end{tikzpicture}\end{document}
Full code
Edit and compile if you like:
% Author: Izaak Neutelings (January 2024)\documentclass[border=3pt,tikz]{standalone}\usetikzlibrary{arrows.meta,bending} % for arrow head size\usetikzlibrary{calc} % for calculating coordinates\usetikzlibrary{decorations.pathmorphing} % for random steps\usetikzlibrary{fpu} % for higher precision in "random steps"% FADINGS\usetikzlibrary{fadings}\begin{tikzfadingfrompicture}[name=halo]\shade[inner color=transparent!0,outer color=transparent!100] (0,0) circle (0.9);\end{tikzfadingfrompicture}%\begin{tikzfadingfrompicture}[name=bright spot]% \shade[inner color=transparent!50,outer color=transparent!100] (0,0) circle (0.6);%\end{tikzfadingfrompicture}% COLORS\usepackage{xcolor}\colorlet{water}{blue!70!cyan!80}\colorlet{grass}{green!70!teal!90!black}\colorlet{sand}{yellow!70!brown!90!black}\colorlet{shadow}{water!60!black}% STYLES & MACROS\def\angE{23} % Earth axis tilt\def\RE{0.4} % Earth radius\def\ROx{3.0} % orbit horizontal radius\def\ROy{0.9} % orbit vertical radius\def\drawmap{ % map of earth\fill[land=grass,rotate=-2] % land mass(-30:0.36*\RE) ellipse({0.22*\RE} and {0.50*\RE}) % Africa south(45:0.17*\RE) ellipse({0.39*\RE} and {0.21*\RE}) % North Africa{[rotate=22] (31:0.83*\RE) ellipse({0.45*\RE} and {0.28*\RE})} % Asia{[rotate=38] (54:0.55*\RE) ellipse({0.33*\RE} and {0.09*\RE})} % West Europa{[rotate=22] (65:0.79*\RE) ellipse({0.19*\RE} and {0.04*\RE})} % North Europa{[rotate=-10] (216:1.10*\RE) ellipse({0.22*\RE} and {0.40*\RE})} % South America;\fill[land=sand] % sahara(46:0.18*\RE) ellipse({0.35*\RE} and {0.16*\RE});\fill[land=sand,rotate=22] % Middle East(24:0.69*\RE) ellipse({0.26*\RE} and {0.07*\RE});
Click to download: astronomy_earth.tex • astronomy_earth.pdf
Open in Overleaf: astronomy_earth.tex.
Very nice art, but it seems like there is a mistake. In the solstices, the shadow should be vertical, not tilted with earth’s axis.
Hi Tal,
Thank you for the correction! It’s fixed now…
Cheers,
Izaak