我如何使用 tikz 绘制此图?

我如何使用 tikz 绘制此图?

图表

这是我想要绘制的图表,我尝试过多次。

答案1

首先要说的是:

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary {decorations.markings}

\begin{document}
\begin{tikzpicture}[>=stealth]

    \coordinate (C) at (0:0); 
    \coordinate (P) at (10:1);

    \draw[postaction=decorate, decoration={markings, mark=at position .8 with {\arrow[red]{>}}}] (C) circle[radius=1];

    \node[circle, inner sep=1pt, fill=black, draw, double, label={below:$C$}, label={above:$\vec{\omega}$}] at (C) {};

    \node[circle, inner sep=1pt, fill=red, label={right:$P$}] at (P) {};

    \draw[->, red, shorten >=2pt, shorten <=3pt] 
        ([shift={(100:1pt)}]C) -- ([shift={(100:1pt)}]P)
        node[midway, above, black] {$\vec{r}$};
    \draw[<-, red, shorten >=2pt, shorten <=3pt] 
        ([shift={(100:-1pt)}]C) -- ([shift={(100:-1pt)}]P)
        node[midway, below, black] {$\vec{a}_{r}$};
    \draw[->, red] (P) -- ([turn]90:1)
        node[above, black] {$\vec{v}$};

\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

tkz-euclide使用包进行近似

\documentclass{article} % or another class

\usepackage{tkz-euclide} % no need to load TikZ

\begin{document}
    \begin{tikzpicture}
            %mark two points
            \tkzDefPoint(0,0){A}
            \tkzDefPoint(0, sqrt(2)){B}
            %drawing the circle
            \tkzDrawCircle[color=black, tkz arrow={Latex[scale=0.6, red, rotate=0]}](A,B)
            %drawing the center of the circle
            \tkzDrawPoints[color=black, fill=white, size=6](A)
            \tkzDrawPoints[color=black, size=3](A)
            %draw tangent to the circle
            \tkzDefPoint(45:sqrt(2)){P}
%           \tkzDrawSegment(A,P)
            \tkzDefLine[perpendicular=through P](A,P)
            \tkzGetPoint{Q}
            \tkzDrawSegment[-{Latex[scale=0.6]}, red](P,Q)
            %mark the start and end points for the parallel arrows
            \tkzDefShiftPoint[A](85:4pt){Aup}% POINT Aup
             \tkzDefShiftPoint[A](-0:4pt){Adown}% POINT Adown
             \tkzDefShiftPoint[P](185:4pt){Pup}% POINT Pup
             \tkzDefShiftPoint[P](-90:4pt){Pdown}% POINT Pdown
             %draw the parallel arrows
             \tkzDrawSegment[-{Latex[scale=0.6]}, red](Aup,Pup)
             \tkzDrawSegment[-{Latex[scale=0.6]}, red](Pdown,Adown)         
             %draw the blue circle at the base of the arrow
             \tkzDrawPoint[color=blue,fill=blue,size=4pt](P)
             %label points
             \tkzLabelPoint[below=1pt](A){\tiny C}
             \tkzLabelSegment[above=0pt](Aup,Pup){\tiny $\vec r$}
             \tkzLabelSegment[below=0pt](Pdown,Adown){\tiny $\vec a_r$}          
             \tkzLabelPoint[above=4pt](A){\tiny $\vec \omega$}          
             \tkzLabelPoint[above=-2pt](Q){\tiny $\vec v$}          
             \tkzLabelPoint[right=1pt](P){\tiny P}          
        
    \end{tikzpicture}       

\end{document}

在此处输入图片描述

相关内容