我怎样才能绘制一些像图中这样被半椭圆“切割”的椭圆(并且还能够在椭圆上写一些标签)?
另外,如果我想在一个圆/椭圆内画一个圆/椭圆(n 次),并想用半椭圆“切割”它,我该怎么办?到目前为止,受这里的一些答案的启发,我只能执行以下操作来绘制圆圈:
\begin{tikzpicture}
\node[circle, minimum size=6cm, draw, fill=white] (a) {};
\node[circle, minimum size=4cm, draw, fill=white] (b) {};
\node[circle, minimum size=2cm, draw, fill=white] (c) {$T_{0}$};
\draw [decorate, decoration={text along path, text = H2}] (150:2.5) arc (150:60:2.5cm);
\draw [decorate, decoration={text along path, text = T1 ~ ~ ~ ~ ~ ~ T2}] (90:1.5) arc (90:-90:1.5cm);
\end{tikzpicture}
谢谢你!
答案1
我不明白你的图的数学或逻辑含义(例如,红色椭圆是否需要与黑色椭圆相切?),所以我无法准确地重新绘制它。但是,以下代码绘制了两个完整的椭圆和一个部分椭圆。
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0,0) ellipse (2cm and 1cm);
\draw (0,3) ellipse (2cm and 1cm);
\draw (-3,1.5) +(60:1cm and 2cm) arc (60:-240:1cm and 2cm);
\end{tikzpicture}
\end{document}
现在,更改坐标、1cm
s 和2cm
,并添加文本就是你的工作了。我认为你现在可以做到。
答案2
这会产生类似于您的屏幕截图的结果。
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\foreach \Y [count=\Z] in {-1,1}
{\draw[name path=elli-\Z] (0,\Y) circle[x radius=3,y radius=0.9];}
\draw[red,name path=elli-3] (0,1.9) arc(35:-220:1.6 and 2.4)
node[pos=0.8,left]{$\mathsf{K}*\mathsf{A}$}
(0,1.9) arc(35:40:1.6 and 2.4);
\draw[blue,name path=elli-4] (0,1.9) arc(145:400:1.6 and 2.4) node[pos=0.8,right]{$\mathsf{K}*\mathsf{B}$}
(0,1.9) arc(145:140:1.6 and 2.4);
\path[name intersections={of=elli-1 and elli-3,by={i1,i2,i3,i4}}] (i4) node[above
right]{$\mathsf{H}_1$};
\path[name intersections={of=elli-3 and elli-4,by={i5,i6}}] (i6)
node[left]{$\mathsf{T}_1$} node[right,xshift=1ex,yshift=-1ex]{$\mathsf{T}_2$};
\path[name intersections={of=elli-1 and elli-4,by={i7,i8,i9,i10}}] (i10)
node[below right,xshift=1em]{$\mathsf{K}$};
\end{tikzpicture}
\end{document}
答案3
\documentclass[margin=1cm, tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale = 2]
% Red half oval
\begin{scope}[shift = {(0,0)}, local bounding box = redScope]
\clip(1,-1)rectangle(-1,0.7);
\draw[red] (0,0) circle [x radius=6mm, y radius=1cm];
\end{scope}
\node[red] at (redScope.west) {$\mathsf{K}*\mathsf{A}$};
% Blue half oval
\begin{scope}[shift={(1,0)}, local bounding box = blueScope]
\clip(1,-1)rectangle(-1,0.7);
\draw[blue] (0,0) circle [x radius=6mm, y radius=1cm];
\end{scope}
\node[blue] at (blueScope.east) {$\mathsf{K}*\mathsf{B}$};
% Upper black oval
\begin{scope}[shift={(0.5,0.25)}]
\draw[](0,0) circle [x radius=1.075cm, y radius=3mm];
\node[blue] at (blueScope.east) {$\mathsf{K}*\mathsf{B}$};
\end{scope}
% Lower black oval
\begin{scope}[shift={(0.5,-0.6)}]
\draw (0,0) circle [x radius=1.075cm, y radius=4mm];
\end{scope}
%Inner labeling
\node[black] at (redScope.south)[xshift=-0.5cm,yshift=0.6cm] {$\mathsf{H_1}$};
\node[black] at (redScope.south)[xshift= 0.5cm,yshift=0.6cm] {$\mathsf{T_1}$};
\node[black] at (blueScope.south)[yshift=0.6cm] {$\mathsf{T_2}$};
\node[black] at (blueScope.south east)[xshift=-0.5cm,yshift=0.25cm] {$\mathsf{K}$};
\end{tikzpicture}
\end{document}