
TikZ 사진 위치를 지정하는 데 문제가 있습니다. 반원을 배치하고 싶은데 어떻게 해야 할지 모르겠습니다.
\begin{tikzpicture}
\draw [domain=0:180] plot ({cos(\x)}, {sin(\x)});
\end{tikzpicture}
누구든지 나를 도와줄 수 있나요?
답변1
이것은 아마도 원(또는 반원)을 그리는 가장 쉬운 방법은 아닐 것입니다. 그러나 위치를 지정하려면 를 plot
사용할 수 있습니다 shift
.
다음은 TikZ에서 원을 그릴 수 있는 몇 가지 추가 명령(내가 아는 모든 것)과 예입니다.
\documentclass[tikz,border=7]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[ultra thick, domain=0:180,shift={(.5cm,1.5cm)}] plot ({cos(\x)}, {sin(\x)});
\draw (-3,0) circle(1);
\draw[brown] (-2,0) ellipse(1);
\draw[green] (-2,0) arc(-180:180:1);
\draw[blue] plot[smooth cycle,tension=1] coordinates{(-1,0)(0,1)(1,0)(0,-1)};
\draw[red, xshift=1cm] \foreach \r in {0,...,3}{[rotate=90*\r]
(-1,0) .. controls (-1,0.555) and (-.555,1) .. (0,1)};
\node[yellow,draw,circle,minimum height=2 cm] at (2,0){};
\draw[cyan,bend left=45] (2,0) to (3,1) to (4,0) to (3,-1) to (2,0);
\path[gray] (3,0) edge[out=90,in=180] (4,1)
(4,1) edge[out=0,in=90] (5,0)
(5,0 )edge[out=-90,in=0] (4,-1)
(4,-1) edge[out=180,in=-90] (3,0);
\end{tikzpicture}
\end{document}