如何冲破日食的另一半

如何冲破日食的另一半

我有一张像

这

现在,我想让前三个 eclipse(按升序排列)的内部和半部分变成虚线。我该如何实现呢?

示例输出:

这

另外,我使用圆弧作为弯曲的顶部和底部边框。还有其他更简单的方法来实现这些略微弯曲的线条吗?

希望我说清楚了。谢谢。

答案1

你可以使用虚线圆弧来实现这一点。以下是示例:

在此处输入图片描述

\documentclass[border=0.5cm]{standalone}

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{intersections}


\begin{document}


\begin{tikzpicture}[xscale=1.2,scale=0.6,darkgray]


% Ellipses
\draw[fill=YellowGreen!10,dashed] (0,0) ellipse (1cm and 3cm);
\draw[thick] (90:3) arc(90:270:1cm and 3cm);

\draw[dashed,xshift=3cm] (0,0) ellipse (1.2cm and 4cm);
\draw[thick,xshift=3cm] (90:4) arc(90:270:1.2cm and 4cm);


\draw[dashed,name path=first,xshift=6cm] (0,0) ellipse (1.5cm and 5cm);
\draw[thick,xshift=6cm] (90:5) arc(90:270:1.5cm and 5cm);

\draw[fill=YellowGreen!30,dashed,name path=second,xshift=9cm] (0,0) ellipse (1.7cm and 6cm);
\draw[thick,xshift=9cm] (90:6) arc(90:270:1.7cm and 6cm);

% Intersection of Ellipse 3 and 4
\draw [name intersections={of=first and second},thick]  (intersection-1) to[out=-84, in=84] (intersection-2);
 
 
% Axes
\draw[-latex,thick,BrickRed] (-4,0) -- (13,0) node[right]{$x$};
\draw[-latex,thick,black] (-3,-7) -- (-3,7)node[above]{$y$};
 
\node [BrickRed,fill=white, circle, inner sep=1pt] at (-3,-0.5) {0};
\node[BrickRed] at (0,-0.5) {1};
\node[BrickRed] at (3,-0.5) {2};
\node[BrickRed] at (6,-0.5) {3};
\node[BrickRed] at (9,-0.5) {4};
 
% Green skin
\draw[thick, top color=OliveGreen,
            bottom color=OliveGreen,
            middle color=YellowGreen,fill opacity=0.7] (90:3) arc(90:270:1cm and 3cm) --  (3,-4.05) -- (6,-5.05) -- (9,-6) arc(270:90:1.7cm and 6cm) -- (6,5.05) -- (3,4.05) --cycle ;
\end{tikzpicture}


\end{document}

相关内容