복잡한 tikz 벡터 다이어그램(회전에 의해 생성된 대략적인 미스 거리)

복잡한 tikz 벡터 다이어그램(회전에 의해 생성된 대략적인 미스 거리)

나는 다음 이미지를 재현하고 싶습니다.1957년 항공 보고서tikz pgfplots에서. 상당히 복잡해서 어떻게 접근해야 할지 모르겠습니다. 노드와 위치 지정은 너무 번거롭고 찾기 조정이 필요하며 체인을 어디에 사용할 수 있는지 모르겠습니다.

그렇다면 생각과 시도는?

여기에 이미지 설명을 입력하세요

한 가지 출발점은 다음과 같습니다.좌표와 각도 tikzlibrary. 하지만 위의 그림에는 포인트가 많아 절대좌표를 설정하는 것은 좋은 방법이 아니라고 생각합니다.

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{quotes,angles}
\begin{document}
\begin{tikzpicture}
  \draw
    (3,-1) coordinate (a) node[right] {a}
    -- (0,0) coordinate (b) node[left] {b}
    -- (2,2) coordinate (c) node[above right] {c}
    pic["$\alpha$", draw=orange, <->, angle eccentricity=1.2, angle radius=1cm]
    {angle=a--b--c};
\end{tikzpicture}
\end{document}

답변1

show path construction장식과 라이브러리를 활용하여 "다중 화살표" 요구 사항을 설명합니다 calc.

\documentclass[tikz, border=5]{standalone}
\usetikzlibrary{decorations.pathreplacing,calc,arrows.meta,angles,quotes}
\tikzset{%
  multi arrows/.style args={#1 with #2 sep}{
    decoration={show path construction, 
      lineto code={
        \foreach \i [count=\j from 0] in {1,...,#1}
          \draw let \p1=(\tikzinputsegmentfirst),\p2=(\tikzinputsegmentlast),
            \n1={veclen(\x2-\x1,\y2-\y1)},
            \n2={(\n1-#2*(#1-1))/#1},
            \n3={\n2+#2} in [every multi arrow/.try] 
            ($(\tikzinputsegmentfirst)!\n3*\j!(\tikzinputsegmentlast)$) --
            ($(\tikzinputsegmentfirst)!\n3*\j+\n2!(\tikzinputsegmentlast)$);
      }
    },
    decorate
  },
  every multi arrow/.style={
     thick, draw, ->
  }
}
\begin{document}

\begin{tikzpicture}
[
  >=Triangle,
  marking/.style={%
    fill=white,
    midway
  }
]

\path 
  (0:0)   coordinate (O)  node [anchor=225] {$O$}
  (135:3) coordinate (A1) node [anchor=-45] {$A_1$}
  (240:5) coordinate (A2) node [anchor=80]  {$A_2$}
  (280:3) coordinate (o)
 +(150:4) coordinate (a)  
 +( 60:6) coordinate (c)  
  ($(o)!0.9!(a)$) coordinate (p1) node [anchor=0] {$p_1$}
 +(250:2)         coordinate (v1) 
  ($(o)!0.3!(c)$) coordinate (p2) 
 +( 20:2)         coordinate (v2)
  ($(o)!0.9!(c)$) coordinate (-v1);

\draw [dashed] (a) -- (o) -- (c);
\path pic ["$90^\circ$", draw, <->, angle eccentricity=1.25, angle radius=0.75cm]
    {angle=c--o--a};

\draw [multi arrows=3 with 5pt sep] (A1) -- (O);
\draw [multi arrows=5 with 5pt sep] (A2) -- (O);
\draw [multi arrows=1 with 0pt sep] 
  (O) -- (p1) node [marking] {$p_1$}
      -- (v1) node [marking] {$v_1$};
\draw [multi arrows=1 with 0pt sep] 
  (O) -- (p2)  node [marking] {$p_2$} 
      -- (v2)  node [marking] {$v_2$}
      -- (-v1) node [marking] {$-v_1$};
\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

답변2

이것이 가능한 해결책 중 하나입니다.

여기에 이미지 설명을 입력하세요

암호

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{quotes,angles,shapes,arrows,positioning,}
\begin{document}
    \tikzset{>=triangle 45}
\begin{tikzpicture}
  \draw[dashed]
       (-3,3) coordinate (a) node[right] {a}
    -- coordinate[pos=0.2,left](p1) (0,0) coordinate (b) node [left] {}
    -- coordinate[pos=0.3,right](p2)
 (5,5) coordinate (c) node [above right] {c}
    pic["$90^\circ$", draw=orange, <->, angle eccentricity=1.2, angle radius=1cm]
    {angle=c--b--a};


\coordinate (O) at (-0.5,3);
\draw[->] (O)node[above right](){O} --node[fill=white,pos=0.5](){$p_1$}(p1) node[left](){$p_1$} ;
\draw[->] (p1)--node[fill=white,pos=0.5](){$v_1$}(-4,0);
\draw[->] (O) --node[fill=white,pos=0.5](){$p_2$}(p2);
\draw[->] (p2)--node[fill=white,pos=0.5](){$v_2$} ++(2,1)coordinate (a);
\draw[->] (a) --node[fill=white,pos=0.3](){$-v_1$} (4.7,4.7);

% Approaching routes
\node at (-3,6)(a1){$A_1$}; % change the coordinates for different incoming direction
\path[->] (a1)--node[pos=0.3](a2){} node[pos=0.6](a3){} node[pos=0.9](a4){}(O);
\draw[->] (a1)--(a2);
\draw[->] (a2)--(a3);
\draw[->] (a3)--(O);

\node at (-2,-4) (b1){$A_2$}; % change the coordinates for different incoming direction
\path[->](b1)--node[pos=0.1](b2){} node[pos=0.3](b3){} node[pos=0.5](b4){} node[pos=0.7](b5){} node[pos=0.9](b6){}(O);
\foreach \i/\j in {1/2,2/3,3/4,4/5,5/6}{
\draw[->] (b\i) --(b\j);
}
\draw[->] (b6) -- (O);

\end{tikzpicture}
\end{document}

관련 정보