我需要绘制一个起始半径与结束半径不同的圆弧。我的绘图如下(改编自我在此处找到的绘图),我需要填充不规则圆弧和最外圆之间的一些区域。
\documentclass[12pt]{article}
\usepackage[x11names]{xcolor} %Additional colors
\usepackage{tikz}
\begin{document}
\thispagestyle{empty} %Please, no page numbers or similar
\begin{center}
\begin{tikzpicture}[scale=0.8]
%Circles
\foreach \r in {1, 2,...,9}
\draw[SteelBlue3, thick] (0,0) circle (\r);
\foreach \r in {0.5, 1.5,...,9}
\draw[Azure4, thin] (0,0) circle (\r);
%1° Rays
\foreach \a in {0, 1,...,359}
\draw[Azure4] (\a:9.2) -- (\a:9.5);
%5° Rays
\foreach \a in {0, 5,...,355}
\draw[Azure4] (\a:9) -- (\a:9.5);
%15° Rays
\foreach \a in {0, 15,...,355}
\draw[thick,Azure4] (\a:1) -- (\a:9.5);
%30° Rays
\foreach \a in {0, 30,...,359}
\draw[thick,Azure4] (0, 0) -- (\a:9.5);
%Radius labels (background filled white)
\edef\mya{0}
\foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
\draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
%Main rays
\foreach \a in {0, 90,...,359}
\draw[very thick] (0, 0) -- (\a:9.5);
%Angle labels
\foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
\draw (\a: 10) node {$\mya^\circ$};
\end{tikzpicture}
\end{center}
\end{document}
答案1
两个选择。
使用两个
arc
s:代码:
\documentclass[dvipsnames,svgnames,x11names]{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document} \thispagestyle{empty} %Please, no page numbers or similar \begin{center} \begin{tikzpicture}[scale=0.8] %Circles \foreach \r in {1, 2,...,9} \draw[SteelBlue3, thick] (0,0) circle (\r); \foreach \r in {0.5, 1.5,...,9} \draw[Azure4, thin] (0,0) circle (\r); %1° Rays \foreach \a in {0, 1,...,359} \draw[Azure4] (\a:9.2) -- (\a:9.5); %5° Rays \foreach \a in {0, 5,...,355} \draw[Azure4] (\a:9) -- (\a:9.5); % The irregular arc \begin{pgfonlayer}{background} \fill[MediumOrchid1] (0,9) arc [start angle=90,end angle=60,radius=9] -- ++(60:-0.5cm) arc [start angle=60,end angle=102,radius=6] -- cycle; \draw[red,thick] (60:8.5cm) arc [start angle=60,end angle=102,radius=6]; \end{pgfonlayer} %15° Rays \foreach \a in {0, 15,...,355} \draw[thick,Azure4] (\a:1) -- (\a:9.5); %30° Rays \foreach \a in {0, 30,...,359} \draw[thick,Azure4] (0, 0) -- (\a:9.5); %Radius labels (background filled white) \edef\mya{0} \foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8} \draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$}; %Main rays \foreach \a in {0, 90,...,359} \draw[very thick] (0, 0) -- (\a:9.5); %Angle labels \foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269} \draw (\a: 10) node {$\mya^\circ$}; \end{tikzpicture} \end{center} \end{document}
使用一个
arc
作为外弧,一个bend right
作为内弧:
代码:
\documentclass[dvipsnames,svgnames,x11names]{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\begin{document}
\thispagestyle{empty} %Please, no page numbers or similar
\begin{center}
\begin{tikzpicture}[scale=0.8]
%Circles
\foreach \r in {1, 2,...,9}
\draw[SteelBlue3, thick] (0,0) circle (\r);
\foreach \r in {0.5, 1.5,...,9}
\draw[Azure4, thin] (0,0) circle (\r);
%1° Rays
\foreach \a in {0, 1,...,359}
\draw[Azure4] (\a:9.2) -- (\a:9.5);
%5° Rays
\foreach \a in {0, 5,...,355}
\draw[Azure4] (\a:9) -- (\a:9.5);
% The irregular arc
\begin{pgfonlayer}{background}
\fill[MediumOrchid1]
(0,9) arc [start angle=90,end angle=60,radius=9] -- ++(60:-0.65cm)
to[bend right=15] (90:8cm) -- cycle;
\draw[red,thick]
(60:8.35cm) to[bend right=15] (90:8cm);
\end{pgfonlayer}
%15° Rays
\foreach \a in {0, 15,...,355}
\draw[thick,Azure4] (\a:1) -- (\a:9.5);
%30° Rays
\foreach \a in {0, 30,...,359}
\draw[thick,Azure4] (0, 0) -- (\a:9.5);
%Radius labels (background filled white)
\edef\mya{0}
\foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
\draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
%Main rays
\foreach \a in {0, 90,...,359}
\draw[very thick] (0, 0) -- (\a:9.5);
%Angle labels
\foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
\draw (\a: 10) node {$\mya^\circ$};
\end{tikzpicture}
\end{center}
\end{document}
答案2
也许?
\PassOptionsToPackage{rgb,svgnames,dvipsnames,x11names}{xcolor}
\documentclass[tikz,border=5pt,multi]{standalone}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}[scale=0.8]
%Circles
\foreach \r in {1, 2,...,9}
\draw[SteelBlue3, thick] (0,0) circle (\r);
\foreach \r in {0.5, 1.5,...,9}
\draw[Azure4, thin] (0,0) circle (\r);
%1° Rays
\foreach \a in {0, 1,...,359}
\draw[Azure4] (\a:9.2) -- (\a:9.5);
%5° Rays
\foreach \a in {0, 5,...,355}
\draw[Azure4] (\a:9) -- (\a:9.5);
%15° Rays
\foreach \a in {0, 15,...,355}
\draw[thick,Azure4] (\a:1) -- (\a:9.5);
%30° Rays
\foreach \a in {0, 30,...,359}
\draw[thick,Azure4] (0, 0) -- (\a:9.5);
%Radius labels (background filled white)
\edef\mya{0}
\foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
\draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
%Main rays
\foreach \a in {0, 90,...,359}
\draw[very thick] (0, 0) -- (\a:9.5);
%Angle labels
\foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
\draw (\a: 10) node {$\mya^\circ$};
\scoped[on background layer]{\draw [fill=blue!20] (90:8) -- (90:9) arc (90:75:9) -- (75:8.25) .. controls (82.5:8.15) .. cycle;}
\draw [draw=red] (75:8.25) .. controls (82.5:8.15) .. (90:8);
\end{tikzpicture}
\end{document}