Skip to content

Commit

Permalink
extract tikz to separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
AShepelevv committed Jul 21, 2024
1 parent 851c748 commit 925299a
Show file tree
Hide file tree
Showing 17 changed files with 948 additions and 939 deletions.
32 changes: 32 additions & 0 deletions sections/geometrical-astronomy/dist-sizes.angular-size.tikz
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
\begin{tikzpicture}
\tkzDefPoint(0,0){C}
\tkzDefPoint(4,0){O}
\tkzDefPointBy[homothety=center C ratio .25](O) \tkzGetPoint{U}

\tkzDrawCircle[color=black, fill=gray!40, thick](C,U)
\tkzDefLine[tangent from = O](C,U) \tkzGetPoints{I1}{I2}
\tkzDrawSegments(C,I1 C,I2 C,O)
\tkzDrawSegments[thick](O,I2 O,I1)
\tkzMarkRightAngles[size=0.2](O,I1,C C,I2,O)
\tkzMarkAngle[size=1.2](I2,O,C)
\tkzMarkAngle[size=1.1](C,O,I1)

\tkzLabelSegment[left](C,I1){$R$}
\tkzLabelSegment[left](C,I2){$R$}
\tkzLabelSegment[above](C,O){$r$}

\DeclareCollectionInstance{angular-size-xfrac}{xfrac}{mathdefault}{math}{
denominator-bot-sep = -1pt,
slash-symbol = \scalebox{0.9}{/},
numerator-bot-sep = 3pt,
scaling = true,
slash-right-mkern = -2 mu,
slash-left-mkern = -1.5 mu
}
\UseCollection{xfrac}{angular-size-xfrac}

\tkzLabelAngle[pos=1.5](I2,O,C){$\sfrac{\rho}{2}$}
\tkzLabelAngle[pos=1.5](C,O,I1){$\sfrac{\rho}{2}$}

\tkzDrawPoints(C, O, I1, I2)
\end{tikzpicture}
19 changes: 19 additions & 0 deletions sections/geometrical-astronomy/dist-sizes.horizontal-parallax.tikz
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
\begin{tikzpicture}
\tkzDefPoint(0,0){O}
\tkzDefPoint(4,0){S}
\tkzDefPointBy[homothety=center O ratio .25](S) \tkzGetPoint{X}
\tkzDefPointBy[rotation=center O angle -90](X) \tkzGetPoint{C}

\tkzDrawCircle[color=black, fill=gray!40, thick](C,O)

\tkzDrawSegments[thick](O,S C,S)
\tkzDrawSegments(C,O)
\tkzMarkRightAngles[size=0.2](C,O,S)
\tkzMarkAngle(O,S,C)

\tkzLabelSegment[below](C,S){$r$}
\tkzLabelSegment[left=-2pt](C,O){$R_\oplus$}
\tkzLabelAngle[pos=1.3, font=\footnotesize](O,S,C){$p$}

\tkzDrawPoints(C, O, S)
\end{tikzpicture}
22 changes: 22 additions & 0 deletions sections/geometrical-astronomy/dist-sizes.scheme-of-parallax.tikz
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
\begin{tikzpicture}
\tkzDefPoint(0,0){Sun}
\tkzDefPoint(3,0){Star}
\tkzDefPoint(0,1){E}

\tkzLabelPoint[above](E){Земля}
\tkzLabelPoint[below](Sun){Солнце}
\tkzLabelPoint[below](Star){Звезда}

\tkzDrawCircle[dashed, black, line width=.5pt](Sun,E)
\tkzDrawPolygon[thick](Sun,Star,E)
\tkzMarkRightAngle[size=0.2](Star,Sun,E)
\tkzMarkAngle(E,Star,Sun)
\tkzLabelAngle[font=\footnotesize, pos=1.2](E,Star,Sun){$p$}

\earth(E)
\sun(Sun)
\pointStar(Star)

\tkzLabelSegment[below](Sun,Star){$r$}
\tkzLabelSegment[left=-2pt](Sun,E){1\,\text{а.\!\:е.}}
\end{tikzpicture}
82 changes: 6 additions & 76 deletions sections/geometrical-astronomy/dist-sizes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,9 @@ \subsection{Расстояние и размеры}
\centering
\vspace{-1.3pc}
\tikzsetnextfilename{scheme-of-parallax}
\begin{tikzpicture}
\tkzDefPoint(0,0){Sun}
\tkzDefPoint(3,0){Star}
\tkzDefPoint(0,1){E}

\tkzLabelPoint[above](E){Земля}
\tkzLabelPoint[below](Sun){Солнце}
\tkzLabelPoint[below](Star){Звезда}

\tkzDrawCircle[dashed, black, line width=.5pt](Sun,E)
\tkzDrawPolygon[thick](Sun,Star,E)
\tkzMarkRightAngle[size=0.2](Star,Sun,E)
\tkzMarkAngle(E,Star,Sun)
\tkzLabelAngle[font=\footnotesize, pos=1.2](E,Star,Sun){$p$}

\earth(E)
\sun(Sun)
\pointStar(Star)

\tkzLabelSegment[below](Sun,Star){$r$}
\tkzLabelSegment[left=-2pt](Sun,E){1\,\text{а.\!\:е.}}
\end{tikzpicture}
\input{sections/geometrical-astronomy/dist-sizes.scheme-of-parallax.tikz}
\caption{Схема годичного параллакса}
\label{pic:scheme-of-parallax}
\end{wrapfigure}
Первым методом определения расстояния до звёзд был \imp{годичный параллакс}, основанный на видимом движении звезды в результате орбитального движения Земли. \term{Годичный параллакс} $p$ объекта~--- это угол, под которым отрезок длины 1~\au из окрестностей данного объекта, применяется к объектам вне
Солнечной системы.
Expand Down Expand Up @@ -69,38 +49,7 @@ \subsection{Расстояние и размеры}
\vspace{-2pc}
\ifthenelse{\boolean{useLightPlotVersion}}{}{
\tikzsetnextfilename{angilar-size}
\begin{tikzpicture}
\tkzDefPoint(0,0){C}
\tkzDefPoint(4,0){O}
\tkzDefPointBy[homothety=center C ratio .25](O) \tkzGetPoint{U}

\tkzDrawCircle[color=black, fill=gray!40, thick](C,U)
\tkzDefLine[tangent from = O](C,U) \tkzGetPoints{I1}{I2}
\tkzDrawSegments(C,I1 C,I2 C,O)
\tkzDrawSegments[thick](O,I2 O,I1)
\tkzMarkRightAngles[size=0.2](O,I1,C C,I2,O)
\tkzMarkAngle[size=1.2](I2,O,C)
\tkzMarkAngle[size=1.1](C,O,I1)

\tkzLabelSegment[left](C,I1){$R$}
\tkzLabelSegment[left](C,I2){$R$}
\tkzLabelSegment[above](C,O){$r$}

\DeclareCollectionInstance{angular-size-xfrac}{xfrac}{mathdefault}{math}{
denominator-bot-sep = -1pt,
slash-symbol = \scalebox{0.9}{/},
numerator-bot-sep = 3pt,
scaling = true,
slash-right-mkern = -2 mu,
slash-left-mkern = -1.5 mu
}
\UseCollection{xfrac}{angular-size-xfrac}

\tkzLabelAngle[pos=1.5](I2,O,C){$\sfrac{\rho}{2}$}
\tkzLabelAngle[pos=1.5](C,O,I1){$\sfrac{\rho}{2}$}

\tkzDrawPoints(C, O, I1, I2)
\end{tikzpicture}
\input{sections/geometrical-astronomy/dist-sizes.angular-size.tikz}
}
\caption{Угловой размер}
\label{pic:angilar-size}
Expand All @@ -118,28 +67,9 @@ \subsection{Расстояние и размеры}
\centering
\vspace{-1.5pc}
\tikzsetnextfilename{horizontal-parallax}
\begin{tikzpicture}
\tkzDefPoint(0,0){O}
\tkzDefPoint(4,0){S}
\tkzDefPointBy[homothety=center O ratio .25](S) \tkzGetPoint{X}
\tkzDefPointBy[rotation=center O angle -90](X) \tkzGetPoint{C}

\tkzDrawCircle[color=black, fill=gray!40, thick](C,O)

\tkzDrawSegments[thick](O,S C,S)
\tkzDrawSegments(C,O)
\tkzMarkRightAngles[size=0.2](C,O,S)
\tkzMarkAngle(O,S,C)


\tkzLabelSegment[below](C,S){$r$}
\tkzLabelSegment[left=-2pt](C,O){$R_\oplus$}
\tkzLabelAngle[pos=1.3, font=\footnotesize](O,S,C){$p$}

\tkzDrawPoints(C, O, S)
\end{tikzpicture}
\caption{Горизонтальный параллакс}
\label{pic:horizontal-parallax}
\input{sections/geometrical-astronomy/dist-sizes.horizontal-parallax.tikz}
\caption{Горизонтальный параллакс}
\label{pic:horizontal-parallax}
\end{wrapfigure}
Для определения расстояния до объектов Солнечной системы также используется метод параллакса. Измеряемая величина $p$ называется \term{горизонтальным параллаксом}, \lookPicRef{pic:horizontal-parallax},~--- это угловой радиус Земли при наблюдении из окрестностей объекта:
\begin{equation}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
\begin{tikzpicture}
\def\e{0}
\def\m{-2.2}
\def\s{-7.2}

\def\earthR{0.7}
\def\moonR{0.18}
\def\sunR{1}

\def\gap{0.2}

\tkzInit[
xmax=\e + \earthR + \gap,
xmin=\s - \sunR - \gap,
ymin=-\sunR - \gap,
ymax=\sunR + \gap
]
\tkzClip

\tkzDefPoint(\e,0){E}
\tkzDefPoint(\m,0){M}
\tkzDefPoint(\s,0){S}

\tkzDefShiftPoint[S](0,\sunR){S'}
\tkzDefShiftPoint[M](0,\moonR){M'}
\tkzDefShiftPoint[E](0,\earthR){E'}

\def\shadeCornerCoef{\sunR / (\sunR - \moonR)}
\tkzDefPointBy[homothety=center S ratio \shadeCornerCoef](M)
\tkzGetPoint{SC}

\def\halfShadowCornerCoef{\sunR / (\sunR + \moonR)}
\tkzDefPointBy[homothety=center S ratio \halfShadowCornerCoef](M)
\tkzGetPoint{HSC}

\tkzDefLine[tangent from = SC](S,S') \tkzGetPoints{S1}{S2}
\tkzDefLine[tangent from = SC](M,M') \tkzGetPoints{M1}{M2}
\tkzDefLine[tangent from = HSC](S,S') \tkzGetPoints{HS1}{HS2}
\tkzDefLine[tangent from = HSC](M,M') \tkzGetPoints{HM1}{HM2}

\tkzInterLC(SC,S1)(E,E') \tkzGetSecondPoint{E1}
\tkzInterLC(SC,S2)(E,E') \tkzGetFirstPoint{E2}

\tkzGetVectxy(HSC,M){hs}
\def\halfShadowCoef{(\e - \m + \hsx) / \hsx }
\tkzDefPointBy[homothety=center HSC ratio \halfShadowCoef](HM1)
\tkzGetPoint{HE1}
\tkzDefPointBy[homothety=center HSC ratio \halfShadowCoef](HM2)
\tkzGetPoint{HE2}

\tkzDefPointBy[homothety=center SC ratio -1](M1) \tkzGetPoint{SC1}
\tkzDefPointBy[homothety=center SC ratio -1](M2) \tkzGetPoint{SC2}

\tkzDrawSector[fill=gray!30,gray!30](HSC,HE2)(HE1)
\tkzDrawSector[fill=gray!70](SC,M2)(M1)
\tkzDrawSector[fill=gray!50](SC,SC2)(SC1)
\tkzDrawSector[fill=white](HSC,HM2)(HM1)

\tkzDrawCircles[dashed, line width=.4pt](S,E E,M)

\tkzDrawCircles[black, line width=.4pt, fill=white](S,S' M,M')
\tkzDrawSegments(SC,S1 SC,S2 HS1,HE1 HS2,HE2)

\tkzDrawCircles[black, line width=.4pt, fill=white, fill opacity=1](E,E')

\tkzLabelPoint[inner sep=5mm](S){\tikz{\sun(S)}}
\tkzLabelPoint(E){\tikz{\earth(E)}}
\tkzLabelPoint(M){$\rightmoon$}
\end{tikzpicture}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
\begin{tikzpicture}
\footnotesize

% Radius of the Sun
\def\RS{1.5}

% Radius of the Earth
\def\RE{1}

% Radius of the Moon
\def\RM{0.4}

% Earth orbit radius
\def\AE{3}

% Moon orbit radius
\def\AM{1.7}

% ALPHA
\pgfmathsetmacro\ALPHA{asin((\RS - \RE) / \AE)}

% BETA
\pgfmathsetmacro\BETA{acos((\RE - \RM) / \AM)}

% GAMMA
\pgfmathsetmacro\GAMMA{90 - \ALPHA - \BETA}

% Earth
\tkzDefPoint(0,0){E}
\tkzDefCircle[R](E,\RE) \tkzGetPoint{e}

% Sun
\tkzDefShiftPoint[E](-\AE,0){S}
\tkzDefCircle[R](S,\RS) \tkzGetPoint{s}

% Moon
\tkzDefShiftPoint[E](\AM,0){m}
\tkzDefPointBy[rotation=center E angle \GAMMA](m) \tkzGetPoint{M}
\tkzDefCircle[R](M,\RM) \tkzGetPoint{m}

% Intersection of Sun-Earth and common tangent to Sun and Earth
\tkzDefPointBy[homothety=center S ratio (\RS / (\RS - \RE))](E)
\tkzGetPoint{I}

% Tangent points of the Sun
\tkzDefLine[tangent from = I](S,s) \tkzGetPoints{S'}{x}
\tkzDefPointBy[reflection = over S--E](S') \tkzGetPoint{S''}

% Tangent points of the Earth
\tkzDefLine[tangent from = I](E,e) \tkzGetPoints{E'}{x}
\tkzDefPointBy[reflection = over S--E](E') \tkzGetPoint{E''}

% Tangent point of the Moon
\tkzDefLine[tangent from = I](M,m) \tkzGetPoints{x}{M'}

% Projection of the center of the Moon to the radius of the Earth
\tkzDefPointBy[projection=onto E--E''](M) \tkzGetPoint{I'}

% Intersection of a normal to Sun-Earth at the center of the Earth with common tangent of Sun and Earth
\tkzDefPointWith[orthogonal,K=-1](E,I) \tkzGetPoint{x}
\tkzInterLL(E,x)(I,E'') \tkzGetPoint{I''}

% Draw shadow
\tkzDrawPolygon[fill=gray!70,draw=none](E',I,E'')

% Draw objects
\tkzDrawCircles[black, thick, fill=white](E,e)
\tkzDrawCircles[black, thick, fill=white](S,s)
\tkzDrawCircles[black, thick, fill=white](M,m)

\begin{scope}[
dim style/.style={black, latex-latex, opacity=1},
dim fence style/.style={black, opacity=1}
]
\tkzDrawSegment[opacity=0, dim={$D$, -1.6cm, below=2pt}](S,E)
\end{scope}

\tkzDrawSegments(S,I E,M S,S' S,S'' E,E' E,E'' M,M' E,I'')
\tkzDrawSegments[semithick](S',I S'',I)
\tkzDrawSegments[dashed](M,I')

\tkzMarkRightAngles[size=0.15](I,E',E E,E'',I I,S',S S,S'',I I'',E,S E'',M',M E,I',M)

\tkzMarkAngle[arc=l, size=0.7](E'',E,I'')
\tkzMarkAngle[arc=l, size=1.3](E'',I,E)
\tkzLabelAngle[pos=1.5](E'',I,E){\footnotesize$\alpha$}

\tkzMarkAngle[arc=ll, size=0.25](M,E,I')
\tkzLabelAngle[pos=0.5](M,E,I'){\footnotesize$\beta$}

\tkzMarkAngle[arc=lll, size=1.5](I,E,M)
\tkzLabelAngle[pos=1.7](I,E,M){\footnotesize$\gamma$}

\tkzDrawPoints(S, S', S'')
\tkzDrawPoints(E, E', E'')
\tkzDrawPoints(M, M')
\tkzDrawPoints(I, I', I'')

\tkzLabelSegment[right](S,S'){$R_0$}
\tkzLabelSegment[right](E,E'){$R$}
\tkzLabelSegment[right=-1pt,pos=0.4](M,M'){$r$}
\tkzLabelSegment[above=-1pt,pos=0.45](E,M){$d$}
\end{tikzpicture}
Loading

0 comments on commit 925299a

Please sign in to comment.