texlive[54708] Master: tikz-planets (31mar20)
commits+karl at tug.org
commits+karl at tug.org
Mon Apr 13 00:29:09 CEST 2020
Revision: 54708
http://tug.org/svn/texlive?view=revision&revision=54708
Author: karl
Date: 2020-04-13 00:29:08 +0200 (Mon, 13 Apr 2020)
Log Message:
-----------
tikz-planets (31mar20)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/tikz-planets/
trunk/Master/texmf-dist/doc/latex/tikz-planets/README.md
trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.pdf
trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.tex
trunk/Master/texmf-dist/tex/latex/tikz-planets/
trunk/Master/texmf-dist/tex/latex/tikz-planets/planets.sty
trunk/Master/tlpkg/tlpsrc/tikz-planets.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/tikz-planets/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-planets/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-planets/README.md 2020-04-12 22:29:08 UTC (rev 54708)
@@ -0,0 +1,27 @@
+# Description
+These files provide the TikZ-planets package that makes it easy to illustrate celestial mechanics and the solar system.
+
+# Installation
+
+ Move the package (.sty file) to a latex search directory if
+ you want to be able to use it from any directory. Ask you
+ system administrator if you need help.
+
+# Requirements
+TikZ-planets requires the following standard packages:
+
+- xcolor
+- tikz
+- xstring
+- pgfkeys
+
+# Contents
+This repository contains the following files:
+
+- planets.sty, the package
+- planets-doc.pdf, the full documentation for the package
+- planets-doc.tex, the sorce for the documentation
+- README.md, the current file
+
+# License
+Files are shared under the CC-BY-SA 4.0 license.
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-planets/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.pdf 2020-04-12 22:27:59 UTC (rev 54707)
+++ trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.pdf 2020-04-12 22:29:08 UTC (rev 54708)
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.tex 2020-04-12 22:29:08 UTC (rev 54708)
@@ -0,0 +1,202 @@
+\documentclass[12pt, twocolumn]{article}
+
+\usepackage{url}
+
+\usepackage{planets}
+
+\usepackage[top=2cm, bottom=2cm, right=1.7cm, left=1.7cm]{geometry}
+
+\title{The TikZ-planets package}
+\author{Isabelle M. Santos}
+\date{Version 1.0.1 -- 2020/03/30}
+
+\begin{document}
+\maketitle
+\tableofcontents
+
+\section{Introduction}
+I initially created this package to illustrate celestial mechanics for an astronomy course I taught in 2019.
+It makes it easy to add sketches of solar system objects to illustrate seasons, moon phases,...
+The commands provided by this package are to be used in a \verb|tikzpicture| environment.
+
+This package is a work in progress and is my first attempt at creating a TikZ package. I would be really happy to receive suggestions on how to improve it.
+
+\subsection{Installation}
+Move the package (.sty file) to a latex search directory (usually \url{~/texmf/} on a Unix-type system) if you want to be able to use it from any directory.
+Ask you system administrator if you need help.
+
+\subsection{Requirements}
+Tikz-planets requires the following standard packages to be installed
+\begin{itemize}
+\item xcolor
+\item pgfkeys
+\item xstring
+\item tikz
+\end{itemize}
+
+\subsection{License}
+The package can be found at \url{https://framagit.org/Moutmout/tikz-planets.git}. It is under the CC-BY-SA license.
+
+\section{Usage}
+\subsection{Drawing a planet}
+Drawing one of the eight solar system planets is rather straightforward, use \verb|\planet[surface=earth]|, replacing the option \verb|earth| with the name of any planet.
+Although they are not planets, the \verb|\planet| command can also be used to draw the Sun and the Moon, by setting the \verb|surface| option.
+
+\begin{verbatim}
+\planet[surface=sun]
+\planet[surface=earth]
+\planet[surface=moon]
+\planet[surface=mars]
+\end{verbatim}
+\begin{tikzpicture}
+\planet[surface=sun]
+\planet[surface=earth, centerx=2.2]
+\planet[surface=moon, centerx=4.4]
+\planet[surface=mars, centerx=6.6]
+\end{tikzpicture}
+
+If you need a planet that isn't in the solar system, you can make a generic one with a solid color surface.
+
+\begin{verbatim}
+\planet
+\planet[color=brown]
+\end{verbatim}
+\begin{tikzpicture}
+\planet
+\planet[color=brown, centerx=2.2]
+\end{tikzpicture}
+
+\subsection{Rings}
+The four gas giants in the solar system sport a ring.
+In the current version of the package, only Saturn is shown with a ring.
+
+\subsection{Rotational characteristics}
+Most planets rotate around a set axis that can be tilted with respect to the plane of orbit.
+The rotation axis of the Earth, for instance, is tilted by 23.5 degrees.
+Uranus spins on its side, with a rotation axis tilted at 90 degrees.
+This can be illustrated using the \verb|tilt| and the \verb|rotation| options.
+
+\begin{verbatim}
+\planet[surface=earth, tilt=23.5]
+\planet[surface=uranus, tilt=90, rotation]
+\planet[surface=venus, retrograde, rotation]
+\end{verbatim}
+\begin{tikzpicture}
+\planet[surface=earth, tilt=23.5]
+\planet[surface=uranus, tilt=90, rotation, centerx=3.3]
+\planet[surface=venus, rotation, retrograde, centerx=6.6]
+\end{tikzpicture}
+
+Venus rotates in the opposite direction compared to the other planets in the solar system.
+This can be illustrated with the \verb|retrograde| option.
+
+\subsection{Phases}
+Half of a planet or moon in in the shadow of the Sun. This can be illustrated with the \verb|phase| keyword, which can take the following values: \verb|new|, \verb|first crescent|, \verb|first half|, \verb|waxing gibbous|, \verb|full|, \verb|waning gibbous|, \verb|last half| or \verb|last crescent|.
+
+\hspace{1em}
+
+\begin{tikzpicture}
+ \planet[surface=moon, phase=new, centerx=0]
+ \node[red] at (0, 0) {new};
+ \planet[surface=moon, phase=first crescent, centerx=2]
+ \node[red, align=center] at (2, 0) {first \\ crescent};
+ \planet[surface=moon, phase=first half, centerx=4]
+ \node[red, align=center] at (4, 0) {first \\ half};
+ \planet[surface=moon, phase=waxing gibbous, centerx=6]
+ \node[red, align=center] at (6, 0) {waxing \\ gibbous};
+ \planet[surface=moon, phase=full, centery=-2, centerx=6]
+ \node[red, align=center] at (6, -2) {full};
+ \planet[surface=moon, phase=waning gibbous, centerx=4, centery=-2]
+ \node[red, align=center] at (4, -2) {waning \\ gibbous};
+ \planet[surface=moon, phase=last half, centerx=2, centery=-2]
+ \node[red, align=center] at (2, -2) {last \\ half};
+ \planet[surface=moon, phase=last crescent, centerx=0, centery=-2]
+ \node[red, align=center] at (0, -2) {last \\ crescent};
+\end{tikzpicture}
+
+\subsection{Size and position}
+By default, a planet has a radius of $1$ and is centered at $(0, 0)$.
+
+To draw schematics illustrating celestial mechanics, it is useful to use several \verb|\planet|s in one figure.
+The position of the center of the planet can be set using the \verb|centerx| and the \verb|centery| keywords.
+The size of the planet is set with the \verb|scale| keyword.
+
+\onecolumn
+\section{Complete examples}
+\subsection{The seasons}
+Season's are caused by the tilt of Earth's axis.
+This is why summer in the northern hemisphere happens at the same time as winter in the southern hemisphere.
+
+\begin{verbatim}
+ \planet[surface=sun]
+
+ \planet[surface=earth, phase = first half, rotation, tilt=23.5, centerx=-5]
+ \planet[surface=earth, phase = last half, rotation, tilt=23.5, centerx=5]
+ \planet[surface=earth, phase = new, rotation, tilt=23.5, centery=-3]
+ \planet[surface=earth, phase = full, rotation, tilt=23.5, centery=3]
+\end{verbatim}
+\begin{tikzpicture}
+ \planet[surface=sun]
+
+ \planet[surface=earth, phase = first half, rotation, tilt=23.5, centerx=-5]
+ \planet[surface=earth, phase = last half, rotation, tilt=23.5, centerx=5]
+
+ \planet[surface=earth, phase = new, rotation, tilt=23.5, centery=-3]
+ \planet[surface=earth, phase = full, rotation, tilt=23.5, centery=3]
+\end{tikzpicture}
+
+\subsection{The phases of the Moon}
+Half of the Moon is in the shadow of the Sun.
+Since the Moon goes around the Earth, the shadows on the near-side of the Moon change.
+
+\begin{verbatim}
+ \planet[surface=earth]
+ \planet[surface=sun, centerx=10, scale=2]
+
+ \planet[surface=moon, phase=first half, centerx=-2.5, scale=.5]
+ \planet[surface=moon, phase=first half, centerx=2.5, scale=.5]
+ \planet[surface=moon, phase=first half, centery=-2.5, scale=.5]
+ \planet[surface=moon, phase=first half, centery=2.5, scale=.5]
+\end{verbatim}
+\begin{tikzpicture}
+ \planet[surface=earth]
+ \planet[surface=sun, centerx=10, scale=2]
+
+ \planet[surface=moon, phase=first half, centerx=-2.5, scale=.5]
+ \planet[surface=moon, phase=first half, centerx=2.5, scale=.5]
+ \planet[surface=moon, phase=first half, centery=-2.5, scale=.5]
+ \planet[surface=moon, phase=first half, centery=2.5, scale=.5]
+\end{tikzpicture}
+
+\subsection{The solar system}
+You might have learned "My Violent Evil Monster Just Scared Us Nuts" or some other mnemonic to remember the order of the eight (or nine if you're old enough) planets in the solar system.
+The distances in the following sketch are not to scale, but the radii roughly are.
+
+\begin{verbatim}
+ \clip (0,-3) rectangle (20, 3);
+ \planet[surface=sun, scale=28, centerx=-27]
+ \planet[surface=mercury, centerx=1.5, scale=.1]
+ \planet[surface=venus, centerx=2.5, scale=.25]
+ \planet[surface=earth, centerx=3.5, scale=.25]
+ \planet[surface=mars, centerx=4.5, scale=.13]
+ \planet[surface=jupiter, centerx=8, scale=2.75]
+ \planet[surface=saturn, centerx=12, scale=2.3]
+ \planet[surface=uranus, centerx=15, scale=1]
+ \planet[surface=neptune, centerx=16.8, scale=.97]
+\end{verbatim}
+\begin{tikzpicture}
+ \clip (0,-3) rectangle (20, 3);
+ \planet[surface=sun, scale=28, centerx=-27]
+ \planet[surface=mercury, centerx=1.5, scale=.1]
+ \planet[surface=venus, centerx=2.5, scale=.25]
+ \planet[surface=earth, centerx=3.5, scale=.25]
+ \planet[surface=mars, centerx=4.5, scale=.13]
+ \planet[surface=jupiter, centerx=8, scale=2.75]
+ \planet[surface=saturn, centerx=12, scale=2.3]
+ \planet[surface=uranus, centerx=15.5, scale=1]
+ \planet[surface=neptune, centerx=17.3, scale=.97]
+\end{tikzpicture}
+
+
+
+\end{document}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-planets/planets-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/tikz-planets/planets.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-planets/planets.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/tikz-planets/planets.sty 2020-04-12 22:29:08 UTC (rev 54708)
@@ -0,0 +1,326 @@
+\ProvidesPackage{planets}
+
+\RequirePackage{tikz}
+\RequirePackage{xstring}
+
+% Colors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{xcolor}
+\definecolor{mercury_crater_edge}{rgb}{.44, .42, .41}
+\definecolor{mercury_crater}{rgb}{.55, .54, .54}
+\definecolor{venus1}{rgb}{1, 1, .85}
+\definecolor{venus2}{rgb}{1, .87, .68}
+\definecolor{venus3}{rgb}{.96, .87, .7}
+\definecolor{uranus_gray}{rgb}{.69, .77, .87}
+\definecolor{uranus_blue}{rgb}{.69, .93, .98}
+\definecolor{neptune1}{rgb}{.27, .51, .71}
+\definecolor{neptune2}{rgb}{.25, .41, .88}
+\definecolor{neptune3}{rgb}{.53, .85, .95}
+\definecolor{neptune4}{rgb}{.12, .56, 1}
+\definecolor{neptune5}{rgb}{.42, .35, .8}
+\definecolor{neptune_white}{rgb}{94, 1, 1}
+
+\definecolor{brownish}{rgb}{.7, .58, .42}
+\definecolor{wheat}{rgb}{.96, .87, .7}
+\definecolor{yellowish}{rgb}{1, 1, .88}
+\definecolor{orangish}{rgb}{.82, .71, .55}
+\definecolor{pinkish}{rgb}{1, .85, .73}
+\definecolor{sienna}{rgb}{.50, .26, .14}
+\definecolor{greenish}{rgb}{.8, .78, .64}
+\definecolor{whiteish}{rgb}{.98, .92, .84}
+
+% Keys %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifrotation
+\newif\ifretrograde
+\newif\ifring
+
+\RequirePackage{pgfkeys}
+\pgfkeys{
+ /planet/.is family, /planet,
+ surface/.estore in = \surface,
+ tilt/.estore in = \tilt,
+ phase/.estore in = \phase,
+ rotation/.is if = rotation,
+ retrograde/.is if = retrograde,
+ color/.estore in = \mycolor,
+ centerx/.estore in = \centerx,
+ centery/.estore in = \centery,
+ scale/.estore in = \scale,
+ default/.style = {
+ surface = none,
+ tilt = 0,
+ phase = full,
+ rotation = false,
+ retrograde = false,
+ color = cyan,
+ centerx = 0,
+ centery = 0,
+ scale = 1,
+ }
+}
+
+% Decorators %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\addaxis}{%
+ \draw [ultra thick] (0,2) --(0, -2);
+}
+
+\newcommand{\addequator}{%
+ % Equateur
+ \draw [dashed] (-1, 0) -- (1, 0);
+}
+
+\newcommand{\addrotation}{%
+ % equator arrow
+ \ifretrograde
+ \draw [->, very thick] (0, 0) -- (-0.4, 0);
+
+ % axis arrow
+ \draw [->] (.3, 1.5) arc (320 : 220 : 0.4) ;
+ \else
+ % equator arrow
+ \draw [->, very thick] (0, 0) -- (0.4, 0);
+
+ % axis arrow
+ \draw [->] (-.3, 1.5) arc (220 : 320 : 0.4) ;
+ \fi
+}
+
+\newcommand{\addphase}[1]{%
+ \IfEqCase{#1}{%
+ {new}{\fill [opacity=0.6, black] (0, 0) circle (1);}
+ {first half}{\fill [opacity=0.6, black] (90:1) arc (90:270:1) -- cycle;}
+ {last half}{\fill [opacity=0.6, black] (90:1) arc (90:-90:1) -- cycle;}
+ {first crescent}{\fill [opacity=0.6, black] (270:1) arc (135:225:-1.41) -- (90:1) arc (90:270:1) -- cycle;}
+ {last crescent}{\fill [opacity=0.6, black] (90:1) arc (90:-90:1) -- (-90:1) arc (225:135:1.41) -- cycle;}
+ {waxing gibbous}{\fill [opacity=0.6, black] (90:1) arc (90:270:1) -- (270:1) arc (225:135:1.41) -- cycle;}
+ {waning gibbous}{\fill [opacity=0.6, black] (90:1) arc (90:-90:1) -- (-90:1) arc (135:225:-1.41) -- cycle;}
+ {top half}{\fill [opacity=0.6, black] (0:1) arc (0:-180:1) -- (-180:1) -- cycle;}
+ {bottom half}{\fill [opacity=0.6, black] (0:1) arc (0:180:1) -- (180:1) -- cycle;}
+ {full}{}
+ }
+}
+
+% Surfaces %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\sun}{%
+ \draw [yellow!50, ultra thick, fill=yellow!85!red] (0, 0) circle (1);
+}
+
+\newcommand{\mercury}{%
+ \draw [gray!70!black, ultra thick, fill=gray] (0, 0) circle (1);
+
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.5 , 0.56 ) circle ( 0.094 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.23 , 0.31 ) circle ( 0.08 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.03 , 0.65 ) circle ( 0.06 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.17 , 0.79 ) circle ( 0.03 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.15 , 0.15 ) circle ( 0.02 );
+
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.17 , -0.07 ) circle ( 0.09);
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.01 , -0.28 ) circle ( 0.08 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.33 , -0.42 ) circle ( 0.07 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.01 , -0.54 ) circle ( 0.06 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.63 , -0.3 ) circle ( 0.06 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.02 , -0.88 ) circle ( 0.06 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.85 , -0.05 ) circle ( 0.04 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.61 , -0.14 ) circle ( 0.03 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( 0.7 , -0.16 ) circle ( 0.01 );
+
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.32 , -0.29 ) circle ( 0.02 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.47 , -0.41 ) circle ( 0.08 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.2 , -0.87 ) circle ( 0.07 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.78 , -0.17 ) circle ( 0.03 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.57 , -0.66 ) circle ( 0.02 );
+
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.38 , 0.49 ) circle ( 0.1 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.17 , 0.69 ) circle ( 0.09 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.16 , 0.26 ) circle ( 0.09 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.8 , 0.06 ) circle ( 0.08 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.83 , 0.28 ) circle ( 0.007 );
+ \draw [mercury_crater_edge, fill=mercury_crater] ( -0.23 , 0.51 ) circle ( 0.006 );
+}
+
+\pgfdeclareverticalshading{Venus}{2cm}{
+ color(0cm)=(venus1);
+ color(0.3cm)=(venus2);
+ color(1cm)=(venus3);
+ color(1.7cm)=(venus2!90!black);
+ color(1.9cm)=(venus1)
+}
+\newcommand{\venus}{%
+ \draw [color=brown!40, shading=Venus, ultra thick] (0, 0) circle (1);
+}
+
+\newcommand{\earth}{
+ % Globe
+ \draw [fill=cyan] (0,0) circle (1);
+
+ % Continents
+ \draw [very thin, green, fill=green!70!black] (0.5, 0.45) circle (.3 and .2) ;
+ \draw [very thin, green, fill=green!70!black] (0.7, -.2) circle (.2 and .5) ;
+
+ \draw [very thin, green, fill=green!70!black] (-.6, 0.4) circle (.25 and .2) ;
+ \draw [very thin, green, fill=green!70!black] (-0.6, -.2) circle (.3 and .4) ;
+
+ % Poles
+ \fill [white] (-0.423, 0.906) arc (115 : 65 : 1) -- cycle ;
+ \fill [white] (-0.423, -0.906) arc (65 : 115 : -1) -- cycle ;
+
+ % Edge
+ \draw [neptune3, ultra thick] (0,0) circle (1);
+}
+
+\newcommand{\moon}{%
+ % Disque
+ \draw [fill=gray!30] (0, 0) circle (1);
+
+ % Crateres
+ \draw [gray!60, ultra thick, fill=gray!55] (-.55, .2) circle (.4);
+ \draw [gray!65, ultra thick, fill=gray!60] (-.1, .65) circle (.3);
+
+ \draw [gray!15, ultra thick, fill=gray!20] (-.2, -.5) circle (.1);
+
+ \draw [gray!75, ultra thick, fill=gray!70] (.4, .5) circle (.15);
+ \draw [gray!75, ultra thick, fill=gray!70] (.6, .3) circle (.15);
+
+ \draw [gray!55, ultra thick, fill=gray!50] (.2, -.2) circle (.2);
+
+ % Petits crateres
+ \draw [gray, very thick, fill=gray!80] (.1, -.7) circle (.05);
+ \draw [gray, very thick, fill=gray!80] (.8, -.2) circle (.05);
+ \draw [gray, very thick, fill=gray!80] (-.3, .7) circle (.05);
+ \draw [gray, very thick, fill=gray!80] (-.1, .6) circle (.05);
+ \draw [gray, very thick, fill=gray!80] (-.2, 0) circle (.05);
+
+ % Bord
+ \draw [gray!40, ultra thick] (0, 0) circle (1);
+}
+
+\newcommand{\mars}{%
+ \draw [fill=red!50!brown] (0, 0) circle (1);
+
+ % Poles
+ \fill [white] (110:1) arc (110 : 70 : 1) -- cycle ;
+ \fill [white] (-110:1) arc (70 : 110 : -1) -- cycle ;
+
+ % Edge
+ \draw [color=red!60!black, ultra thick] (0, 0) circle (1);
+}
+
+\pgfdeclareverticalshading{Jupiter}{2cm}{
+ color(0cm)=(brownish);
+ color(0.2cm)=(wheat!55!sienna);
+ color(0.4cm)=(yellowish);
+ color(0.7cm)=(orangish);
+ color(0.9cm)=(white);
+ color(1cm)=(whiteish!70!orangish);
+ color(1.1cm)=(wheat);
+ color(1.3cm)=(sienna);
+ color(1.5cm)=(pinkish);
+ color(1.6cm)=(brownish);
+ color(1.7cm)=(white);
+ color(1.9cm)=(wheat!90!black)
+}
+\newcommand{\jupiter}{%
+ \draw [color=brown!80!yellow, shading=Jupiter, ultra thick] (0, 0) circle (1);
+
+ % Spot
+ \draw [brownish!50!orangish, thick, fill=orange!50!red] (-0.4, -0.25) circle (.13 and .1);
+}
+
+\pgfdeclareverticalshading{SaturnBottom}{2cm}{
+ color(0cm)=(whiteish!55!black);
+ color(0.2cm)=(greenish!50);
+ color(0.3cm)=(whiteish);
+ color(0.5cm)=(greenish);
+ color(0.6cm)=(whiteish!50!orangish);
+ color(1.2cm)=(greenish);
+ color(1.4cm)=(wheat!90!black);
+ color(1.7cm)=(wheat);
+ color(1.9cm)=(pinkish)
+}
+\pgfdeclareverticalshading{SaturnTop}{2cm}{
+ color(0cm)=(pinkish);
+ color(.1cm)=(wheat);
+ color(.3cm)=(wheat!90!black);
+ color(.6cm)=(greenish);
+ color(1cm)=(whiteish!50!orangish);
+ color(1.4cm)=(yellowish!70!orangish);
+ color(1.8cm)=(whiteish!55!sienna)
+}
+\newcommand{\saturn}{%
+ % Top half
+ \fill [color=yellowish, shading=SaturnTop, ultra thick] (0:1) arc (0:180:1) -- cycle;
+ \draw [yellowish, ultra thick] (0:1) arc (0:180:1);
+
+ % Ring
+ \path[inner color=black,outer color=yellowish,even odd rule]
+ (0, 0) circle [x radius = 1.5, y radius = .25]
+ (0, 0) circle [x radius = 1.7, y radius = .3]
+ (0, 0) circle [x radius = 1.75, y radius = .33]
+ (0, 0) circle [x radius = 1.95, y radius = .38];
+
+ % Bottom half
+ \fill [color=yellowish, shading=SaturnBottom, ultra thick] (180:1) arc (180:360:1) -- cycle;
+ \draw [yellowish, ultra thick] (180:1) arc (180:360:1);
+
+}
+
+\newcommand{\uranus}{%
+ \draw [color=uranus_gray, fill=uranus_blue, ultra thick] (0, 0) circle (1);
+}
+
+\pgfdeclareverticalshading{Neptune}{2cm}{
+ color(0cm)=(neptune1!90!black);
+ color(0.35cm)=(neptune2);
+ color(0.4cm)=(neptune_white);
+ color(0.45cm)=(neptune2);
+ color(1.2cm)=(neptune3);
+ color(1.6cm)=(neptune4);
+ color(1.9cm)=(neptune5)
+}
+\newcommand{\neptune}{%
+ \draw [color=blue!40, shading=Neptune, ultra thick] (0, 0) circle (1);
+}
+
+\newcommand{\addsurface}[1]{%
+ \IfEqCase{#1}{%
+ {earth}{\earth}
+ {moon}{\moon}
+ {sun}{\sun}
+ {mars}{\mars}
+ {mercury}{\mercury}
+ {venus}{\venus}
+ {jupiter}{\jupiter}
+ {saturn}{\saturn}
+ {uranus}{\uranus}
+ {neptune}{\neptune}
+ {none}{}
+ }
+}
+
+
+% Main command %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\planet}[1][]{%
+ \pgfkeys{/planet, default, #1}
+
+ \begin{scope}[shift = {(\centerx, \centery)}, scale = \scale]
+
+ % Circle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \draw [color=white!50!\mycolor, ultra thick, fill=\mycolor] (0, 0) circle (1);
+
+ \begin{scope}[rotate=\tilt]
+ \addsurface{\surface}
+ \end{scope}
+
+ \ifrotation
+ \begin{scope}[rotate=\tilt]
+ \addaxis
+ \addequator
+ \addrotation
+ \end{scope}
+ \fi
+
+ \addphase{\phase}
+
+ \end{scope}
+}
+
Property changes on: trunk/Master/texmf-dist/tex/latex/tikz-planets/planets.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2020-04-12 22:27:59 UTC (rev 54707)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2020-04-12 22:29:08 UTC (rev 54708)
@@ -718,7 +718,8 @@
tikz-bayesnet tikz-cd tikz-3dplot tikz-dependency tikz-dimline
tikz-feynhand tikz-feynman tikz-imagelabels tikz-inet
tikz-kalender tikz-karnaugh tikz-ladder tikz-layers
- tikz-nef tikz-network tikz-opm tikz-optics tikz-palattice tikz-qtree
+ tikz-nef tikz-network tikz-opm tikz-optics
+ tikz-palattice tikz-planets tikz-qtree
tikz-relay tikz-sfc tikz-timing tikz-trackschematic tikz-truchet
tikzcodeblocks tikzducks tikzinclude tikzlings
tikzmark tikzmarmots tikzorbital
Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2020-04-12 22:27:59 UTC (rev 54707)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2020-04-12 22:29:08 UTC (rev 54708)
@@ -161,6 +161,7 @@
depend tikz-optics
depend tikz-page
depend tikz-palattice
+depend tikz-planets
depend tikz-qtree
depend tikz-relay
depend tikz-sfc
Added: trunk/Master/tlpkg/tlpsrc/tikz-planets.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.