2

How would one go about producing the following vector diagram using TikZ?

Vector diagram

2
  • How far did you go? Where is the point that really bothers you?
    – Symbol 1
    Commented Aug 18, 2015 at 2:17
  • Are the ellipses supposed to have the same radii? Commented Aug 18, 2015 at 2:29

1 Answer 1

4

Here's one possibility; since no information was given in the question, I assumed that "I" and "J" were arbitrarily placed:

enter image description here

The code:

\documentclass[border=3pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}[>=latex]
\coordinate (O) at (0,0);
\coordinate (I) at ([shift={(30:2cm)}]O);
\coordinate (J) at ([shift={(120:5cm)}]O);
\coordinate (F) at ( $(I)+(J)$ );
% the circles (ellipses)
\draw
  let
  \p1=(I),
  \p2=(J)
  in
  (0,\y1) ellipse [x radius=\x1,y radius=0.2cm]
  (0,\y2) ellipse [x radius=\x2,y radius=0.2cm];
% the vector lines
\foreach \Valor in {I,J,F}
  \draw[->] (O) -- (\Valor);
% the dashed lines
\draw[dashed] 
  (J) -- (F) -- (I);
% the labels
\foreach \Valor/\Pos in {O/below,I/right,J/left,F/above}
  \node[\Pos] at (\Valor) {$\Valor$};    
% axis lines (optional)
\draw[gray!20] 
  (O) -- ++(0pt,6cm);  
\draw[gray!20] 
  ([xshift=-3cm]O) -- ([xshift=3cm]O);  
\end{tikzpicture}

\end{document}

If the circles (ellipses) should be of the same radii, the code is even shorter:

\documentclass[border=3pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}[>=latex]
\def\PosCirci{1}
\def\PosCircii{5}
\def\radius{2cm}
\coordinate (O) at (0,0);
\draw 
  (0,\PosCirci) ellipse [x radius=\radius,y radius=0.2cm]
  (0,\PosCircii) ellipse [x radius=\radius,y radius=0.2cm];
\coordinate (I) at (\radius,\PosCirci);
\coordinate (J) at (-\radius,\PosCircii);
\coordinate (F) at ( $(I)+(J)$ );
% the vactor lines
\foreach \Valor in {I,J,F}
  \draw[->] (O) -- (\Valor);
% the dashed lines
\draw[dashed] 
  (J) -- (F) -- (I);
% the labels
\foreach \Valor/\Pos in {O/below,I/right,J/left,F/above}
  \node[\Pos] at (\Valor) {$\Valor$};    
\end{tikzpicture}

\end{document}

enter image description here

1
  • thanks for that! I left the question without any explanation of the symbols. I and J are angular momentum vectors, whose vector sum is F. And yes, they are indeed arbitrarily placed. Commented Aug 18, 2015 at 5:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .