如何使用 在下图4x4
上绘制网格?使用一个命令是否更好?TikZ
\foreach
\foreach
\documentclass{amsart}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\begin{document}
\noindent \begin{minipage}{3.5in}
\noindent \raggedright{\textbf{1.) }The following figure is composed of quarter-arcs \\
of circles of radii 1, 2, 3, and 4. Calculate the area \\
enclosed by the polygon.}
\end{minipage}
%
\hspace{0.25cm}
%
\raisebox{0mm}[0mm][0mm]
{
\begin{tikzpicture}[baseline=(current bounding box.west)]
\path[draw=blue, fill=blue!50] ({(3/4)*4},0) -- (0,0) arc (180:90:{(3/4)*4}) -- ({(3/4)*4},0) -- cycle;
\path[fill=white] ({(3/4)*4},{(3/4)*1}) -- ({(3/4)*1},{(3/4)*1}) arc (180:90:{(3/4)*3});
\path[fill=blue!50] ({(3/4)*3},{(3/4)*1}) -- ({(3/4)*1},{(3/4)*1}) arc (180:90:{(3/4)*2}) -- cycle;
\draw[blue] ({(3/4)*1},{(3/4)*1}) arc (180:90:{(3/4)*2});
\path[fill=white] ({(3/4)*3},{(3/4)*2}) -- ({(3/4)*2},{(3/4)*2}) arc (180:90:{(3/4)*1});
\draw[blue] ({(3/4)*2},{(3/4)*2}) arc (180:90:{(3/4)*1});
\path[fill=white] ({(3/4)*4},{(3/4)*2}) -- ({(3/4)*4},{(3/4)*0}) arc (270:180:{(3/4)*2});
\draw[blue] ({(3/4)*4},{(3/4)*0}) arc (270:180:{(3/4)*2});
%A 4 \times 4 lattice grid is drawn.
%\foreach \x in {0,1,2,3} {\draw ({(3/4)*\x},0) -- ({(3/4)*\x},{(3/4)*1});}
%\foreach \y in {0,1,2,3} {\draw (0,{(3/4)*\y}) -- ({(3/4)*1},{(3/4)*\y});}
\end{tikzpicture}
}
\end{document}