这是我使用的代码:
\begin{tikzpicture}[>=stealth,pics/tang/.style={code={
\draw[->] (0,0) coordinate (M)-- (2,0) coordinate (v) node[pos=1.1]{$\vec F$};
}}]
\coordinate(O) at (0,0);
\draw[semithick] (0.2,3.6) to[bend left] pic[pos=0.4,sloped]{tang} (3.8,1);
\node[above] at (M) {$M$};
\node [below] at (0.656,1) {$(\Delta)$};
\filldraw (0.656,1)circle(0.03);
\draw[densely dashed] (0.656,1)--(M);
\end{tikzpicture}
这就是我想要的
你们中有人可以让我更多地了解这个begin{scope}
选项吗,因为我相信它能解决我的问题,是的,提前谢谢了。
答案1
因为我不明白为什么你会用它pic
进行像这样的简单绘图,所以我建议如下。
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[>={Stealth[scale=1.5]}]
\def\R{8} % Radius of circle
\def\A{45} % Angle for point M (change at your conveniance)
\coordinate (D) at (0,0);
\coordinate (M) at (\A:\R);
\draw (5:\R) arc (5:95:\R);
\draw[<-] (40:1.3*\R) arc (40:50:1.3*\R) node[midway,above right] {sens positif};
\draw[dashed] (D) -- (M);
\draw[->] (M) --++ (\A-90:\R/2) node[midway,above right] {$\vec{F}$};
\foreach \p in {D,M} \node[circle,fill=black,inner sep=1.5pt] at (\p) {};
\node[below=5pt] at (D) {$(\Delta)$};
\node[above right] at (M) {$M$};
\end{tikzpicture}
\end{document}
答案2
如果要将其画成四分之一圆,我建议实际画出四分之一圆。可以使用相对极坐标绘制切线,例如,如果执行 ,则++(50:2cm)
表示++
坐标相对于路径上的前一个坐标,而 表示:
这是 形式的极坐标(<angle>:<distance>)
。
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
%
\begin{tikzpicture}[
declare function={R=3cm;} % for convenience
]
% draw first quadrant of circle
\draw (90:R) arc[start angle=90,delta angle=-90, radius=R];
% draw tangent arrow using polar coordinates
\draw [-stealth] (60:R) coordinate [label=above:$M$] (M) -- ++(60-90:2cm) node[right] {$\vec{F}$};
% draw dashed line to center
\filldraw [densely dashed] (M) -- (0,0) circle[radius=0.03] node[below] {$(\Delta)$};
% draw smaller arc and add nodes along it
\draw [-stealth] (55:R+0.5cm) arc[start angle=60,delta angle=-20, radius=R+0.5cm]
node[very near start, above right] {foo}
node[midway, above right] {bar};
\end{tikzpicture}
\end{document}