用更细的点画出虚线半圆

用更细的点画出虚线半圆

我想画一些半圆。它们大部分都是虚线(除了三个)。现在我想把这些点画得更近、更“微妙”。这样它看起来就不像是一片点,而像圆圈。

\documentclass{amsart}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\begin{tikzpicture}[baseline=(current bounding box.north)]

% A clipped circle is drawn
\begin{scope}
    \clip (-1.5,0) rectangle (1.5,1.5);
    \draw (-0.95,0) circle(0.4);
    \draw [dotted] (-0.793,0) circle(0.4);
    \draw [dotted] (-0.636,0) circle(0.4);
    \draw [dotted] (-0.479,0) circle(0.4);
    \draw [dotted] (-0.322,0) circle(0.4);
    \draw (-0.13,0) circle(0.4);
    \draw [dotted] (0.008,0) circle(0.4);
    \draw [dotted] (0.149,0) circle(0.4);
    \draw [dotted] (0.306,0) circle(0.4);
    \draw [dotted] (0.463,0) circle(0.4);
    \draw (0.69,0) circle(0.4);
    \draw [dotted] (0.777,0) circle(0.4);
    \draw [dotted] (0.934,0) circle(0.4);
    \draw (-1.5,0) -- (18,0);
\end{scope}

\end{tikzpicture}

\end{document}

在此处输入图片描述

答案1

你可以定义自己的dotted样式。densely dotted例如,有设置[dash pattern=on \pgflinewidth off 1pt],所以我们可以创建一个新的样式\tikzstyle{my dotted}=[line width=.2pt,dash pattern=on \pgflinewidth off \pgflinewidth]。这将产生点更紧密和线宽更细的效果。

\documentclass{amsart}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

% Redefine densely dotted 
\tikzstyle{my dotted}=[line width=.2pt,dash pattern=on \pgflinewidth off \pgflinewidth] % off 1pt

\begin{tikzpicture}[baseline=(current bounding box.north)]

% A clipped circle is drawn
\begin{scope}
    \clip (-1.5,0) rectangle (1.5,1.5);
    \draw (-0.95,0) circle(0.4);
    \draw [my dotted] (-0.793,0) circle(0.4);
    \draw [my dotted] (-0.636,0) circle(0.4);
    \draw [my dotted] (-0.479,0) circle(0.4);
    \draw [my dotted] (-0.322,0) circle(0.4);
    \draw (-0.13,0) circle(0.4);
    \draw [my dotted] (0.008,0) circle(0.4);
    \draw [my dotted] (0.149,0) circle(0.4);
    \draw [my dotted] (0.306,0) circle(0.4);
    \draw [my dotted] (0.463,0) circle(0.4);
    \draw (0.69,0) circle(0.4);
    \draw [my dotted] (0.777,0) circle(0.4);
    \draw [my dotted] (0.934,0) circle(0.4);
    \draw (-1.5,0) -- (18,0);
\end{scope}

\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容