物理问题图

物理问题图

我想复制这个图,但我做不到,因为我刚开始使用 LaTeX,有人能帮我吗?我试过使用方程式$x=\sqrt{1-(y+1)^{2}}$,但似乎无法在 TikZ 上绘制它。谢谢你的帮助。

在此处输入图片描述

答案1

欢迎!是的,LaTeX 确实有绘制弧线的工具。

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,chains,decorations.markings}
\tikzset{% 
    attach arrow/.style={
    decoration={
        markings,
         mark=at position 0 with {\pgfextra{%
         \pgfmathsetmacro{\tmpArrowTime}{\pgfkeysvalueof{/tikz/arc arrow/length}/(\pgfdecoratedpathlength)}%
         \xdef\tmpArrowTime{\tmpArrowTime}}},
        mark=at position {#1-3*\tmpArrowTime} with {\coordinate(@1);},
        mark=at position {#1-2*\tmpArrowTime} with {\coordinate(@2);},
        mark=at position {#1-1*\tmpArrowTime} with {\coordinate(@3);},
        mark=at position {#1+\tmpArrowTime/2} with {\coordinate(@4);
        \draw[-{Stealth[length=\pgfkeysvalueof{/tikz/arc arrow/length},bend]}] plot[smooth]
         coordinates {(@1) (@2) (@3) (@4)};},
        },
     postaction=decorate,
     },
     attach arrow/.default=0.5,
     arc arrow/.cd,length/.initial=2mm,
}

\begin{document}
\begin{tikzpicture}[>={Stealth[bend]},thick]
 \draw[help lines,step=5mm] (0,-5) grid (4,1);
 \draw[->] (0,-5) -- (0,1) node[right]{$y$};
 \draw[->] (-1,0) -- (4,0) node[below left]{$x$};
 \draw[->] (0,0) -- (1,0) node[midway,above]{$v$};
 \draw[attach arrow] 
 (0,0) node[draw,fill=white,inner sep=2pt,circle,label=below left:$O$]{} 
 arc[start angle=90,end angle=-90,radius=2]
 node[circle,inner sep=1pt,fill,label=left:$P$]{};
 \path (2.2,-3.5) 
 node[draw,double distance=1pt,inner sep=2pt,circle,label=below right:$B$]{};
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

与@Schrödinger 的猫的回答类似,但不太复杂:

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,
                decorations.markings}

\begin{document}
    \begin{tikzpicture}[
->-/.style = {decoration={markings,
              mark=at position 0.5 with {\arrow{Stealth}}}, thick,
              postaction={decorate}},
         > = Stealth,
dot/.style = {circle, draw, fill=#1, inner sep=2pt}
                        ]

\draw[->] (0,-5) -- (0,1) node[below left]{$y$};
\draw[->] (-1,0) -- (4,0) node[below left]{$x$};
\draw[very thin, dotted, step=5mm] (0,1) grid (4,-5);
\draw[thick,->] (0,0) -- node[above] {$v$}    (1,0) ;
\draw[->-]      (0,0) arc (90:-90:2);
%
\node[dot=white, label=below left:$O$] at (0,0) {};
\node[dot=black, label=left:$P$] at (0,-4) {};
\node[dot=white,double,label=below right:$B$] at (2,-3.5) {};
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容