Io satellite in graphics

This commit is contained in:
ulaulaman 2020-09-06 00:21:05 +02:00
parent fb6a914527
commit 115823cb03
2 changed files with 37 additions and 0 deletions

37
graphics/io.tex Executable file
View File

@ -0,0 +1,37 @@
\documentclass{standalone}
%
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usepackage{tkz-euclide}
\usetkzobj{all}
%
\definecolor{space}{HTML}{0A2543}
\definecolor{io}{HTML}{a8a546}
\definecolor{iocrater}{HTML}{61582d}
\definecolor{ioborder}{HTML}{f4e96d}
%
\title{Io}
\begin{document}
\tikzset{
partial ellipse/.style args = {#1:#2:#3}{insert path={+ (#1:#3) arc (#1:#2:#3)}},
}
\begin{tikzpicture}[background rectangle/.style={fill=space},show background rectangle]
\tkzDefPoint(6.5,0){A}
\tkzDrawCircle[R,color=io,fill=io](A,4.5cm)
\tkzClipCircle[R](A,4.5cm)
\foreach \i in {1,2,...,10}{
\newcommand{\cX}{6.5}
\newcommand{\cY}{0}
\newcommand{\cR}{4.5}
\pgfmathparse{70*rnd+30}
\edef\tmp{\pgfmathresult}
\pgfmathrandominteger{\x}{300}{1000}
\pgfmathrandominteger{\y}{-450}{450}
\pgfmathparse{0.01*\x}\let\x\pgfmathresult
\pgfmathparse{0.01*\y}\let\y\pgfmathresult
\pgfmathparse{ifthenelse((\x-\cX)^2 + (\y-\cY)^2 <= \cR^2,"iocrater","white")}
\fill[\pgfmathresult] (\x,\y) circle (0.1);
\draw[color=ioborder] (\x,\y) circle (0.1);
}
\end{tikzpicture}
\end{document}

BIN
graphics/pdf/io.pdf Normal file

Binary file not shown.