2

I am trying to replicate the following figure which is related to parallel transport of vectors in general relativity, how commuting two vectors under addition in a torsional space creates a parallelogram which fails to close, the space between the closure is a measure of torsion.

Here is a figure that I am trying to replicate: Sketch I am trying to replicate

And here is my attempt that I have so far: My attempt so far

My problem is, is there a convenient way to draw vectors parallel to the tangent vector at the top most point of the curve and then draw these parallel vectors of equal magnitude in the remaining parts of the curve, equally spaced?

I know I may be able to replicate using the help of some GUI such as TikZEdt for this but, still I would like to know if there is a solution to this without GUI.

My code so far:

\documentclass{standalone}

\usepackage{tikz} \usepackage{graphicx} \usetikzlibrary{arrows,decorations.markings}

\begin{document}

\begin{tikzpicture}[ tangent/.style={ decoration={ markings,% switch on markings mark= at position #1 with { \coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt); \coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt); \coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1); } }, postaction=decorate }, use tangent/.style={ shift=(tangent point-#1), x=(tangent unit vector-#1), y=(tangent orthogonal unit vector-#1) }, use tangent/.default=1 ]

\draw[ tangent=0, tangent=0.125, tangent=0.25, tangent=0.375, red,line width=1pt] (-0.8,-0.725) .. controls (-0.975,0.3) and (-0.825,1.6) .. (0.05,2.125) .. controls (0.95,1.825) and (1.425,0.525) .. (1.175,-0.65) .. controls (0.3,-0.825) and (0.05,-0.775) .. cycle;

\draw [blue, thick, use tangent, -stealth] (0,0) -- (1.1,0); \draw [blue, thick, use tangent=2, -stealth] (0,0) -- (1.1,0); \draw [blue, thick, use tangent=3, -stealth] (0,0) -- (1.1,0); \draw [blue, thick, use tangent=4, -stealth] (0,0) coordinate (a) -- (1.1,0) coordinate (b); \end{tikzpicture}

\end{document}

Parts of the code relating to drawing tangent vectors were taken from Jake's answer from this post: How to draw tangent line of an arbitrary point on a path in TikZ

SolidMark
  • 1,389

1 Answers1

2

If you basically want to draw vectors parallel to those draw at tangents, you can use calc and simply calculate with nodes. For each position on the curve, you basically take the coordinate, add the end point of the tangential vector and subtract its start point.

\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,through,calc,angles,quotes}
\begin{document}
\begin{tikzpicture}[% ateb: https://tex.stackexchange.com/a/700977/ i gwestiwn SolidMark: https://tex.stackexchange.com/q/700974/ sy'n defnyddio côd o ateb Jake: https://tex.stackexchange.com/a/25940/
  tangent/.style={
    decoration={
      markings,% switch on markings
      mark=
      at position #1
      with
      {
        \coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
        \coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
        \coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
      }
    },
    postaction=decorate
  },
  use tangent/.style={
    shift=(tangent point-#1),
    x=(tangent unit vector-#1),
    y=(tangent orthogonal unit vector-#1)
  },
  use tangent/.default=1
  ]

\draw[ tangent=0, tangent=0.125, tangent=0.25, tangent=0.375, red,line width=1pt] (-0.8,-0.725) coordinate (c0) coordinate (C) .. controls (-0.975,0.3) and (-0.825,1.6) .. (0.05,2.125) .. controls (0.95,1.825) and (1.425,0.525) .. coordinate [pos=0.3333] (c1) coordinate [pos=0.6667] (c2) (1.175,-0.65) coordinate (c3) .. controls (0.3,-0.825) and (0.05,-0.775) .. coordinate [pos=0.5] (c4) cycle ;

\draw [blue, thick, use tangent, -stealth] (0,0) -- (1.1,0) coordinate (A); \draw [blue, thick, use tangent=2, -stealth] (0,0) -- (1.1,0); \draw [blue, thick, use tangent=3, -stealth] (0,0) -- (1.1,0); \draw [blue, thick, use tangent=4, -stealth] (0,0) coordinate (a) -- (1.1,0) coordinate (b);

\foreach \i in {0,...,4} \draw [blue,thick,-stealth] (c\i) -- ++($(b)-(a)$) coordinate (b\i); \coordinate (B) at (b0); \path pic [draw,"$\alpha$"] {angle=B--C--A};

\node [draw] at (0,0) [circle through={(a)}] {}; \end{tikzpicture}

\end{document}

parallel vectors on a curve

cfr
  • 198,882