# TikZ: Adding a coordinate to parallel location of two lines

I would like to add a coordinate where a line parallel to my v\cos(\gamma) would be located if it started from point P7. I am not sure how to move those two lines to that location parallel to my original though.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc, intersections, arrows}
\begin{document}
\begin{tikzpicture}[line cap = round, line join = round, >=triangle 45,
scale = 1.25]
\coordinate (O) at (0, 0);
\coordinate (P1) at ($(O) + (-30:1.5cm and .75cm)$);

\draw[-latex] (P1) arc (-30:310:1.5cm and .75cm) coordinate (P2);
\draw[-latex] (O) -- (0, 1.75) node[above, scale = .75] {$$\mathbf{h}$$};
\draw ($(P1)!.5!(P2)$) circle (.18cm) coordinate (P3);
\draw[blue] (O) -- ($(P3)!.18cm!(O)$) node[scale = .75, pos = .5,
fill = white, inner sep = 0cm] {$$\mathbf{r}$$} coordinate (P4);
\draw[dotted, blue, name path = line] (P4) -- ($(P4)!.36cm!(P3)$)
coordinate (P5);
\path[name path = aux] (P5) circle [radius = 1bp];
\draw[name intersections = {of = line and aux}, -latex, blue] (P5) --
($(intersection-1)!.5cm!(P5)$) node[scale = .75, shift = {(.25cm, -.2cm)}]
{$$v\cos(\gamma)$$};
\draw[dotted, name path = line2, blue] ($(P4)!.5!(P5)$) -- (P1)
coordinate (P6);
\path[name path = aux2] (P6) circle [radius = 1bp];
\draw[name intersections = {of = line2 and aux2}, -latex, blue] (P6) --
($(intersection-1)!.75cm!(P6)$) node[scale = .75, shift = {(.25cm, .2cm)}]
{$$v\sin(\gamma)$$} coordinate (P7);
\end{tikzpicture}
\end{document}


-
By the way, the whole picture is significantly easier to handle if you start from the satellite as a node at a particular angle and go towards the origin. –  percusse Jun 26 '13 at 20:36
@percusse can you elaborate on that and provide a small example by what you mean? –  dustin Jun 26 '13 at 20:37

If the end point of the cos(\gamma) arrow is called P8, you can use the calc library to calculate the difference vector of the start and end points of that arrow (P5 and P8), which you can then use as a relative coordinate (using the + operator):

\draw [red, -latex] (P7) -- +($(P8)-(P5)$);


\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc, arrows, intersections}
\begin{document}
\begin{tikzpicture}[line cap = round, line join = round, >=triangle 45,
scale = 1.25]
\coordinate (O) at (0, 0);
\coordinate (P1) at ($(O) + (-30:1.5cm and .75cm)$);

\draw[-latex] (P1) arc (-30:310:1.5cm and .75cm) coordinate (P2);
\draw[-latex] (O) -- (0, 1.75) node[above, scale = .75] {$$\mathbf{h}$$};
\draw ($(P1)!.5!(P2)$) circle (.18cm) coordinate (P3);
\draw[blue] (O) -- ($(P3)!.18cm!(O)$) node[scale = .75, pos = .5,
fill = white, inner sep = 0cm] {$$\mathbf{r}$$} coordinate (P4);
\draw[dotted, blue, name path = line] (P4) -- ($(P4)!.36cm!(P3)$)
coordinate (P5);
\path[name path = aux] (P5) circle [radius = 1bp];
\draw[name intersections = {of = line and aux}, -latex, blue] (P5) --
($(intersection-1)!.5cm!(P5)$) coordinate (P8) node[scale = .75, shift = {(.25cm, -.2cm)}]
{$$v\cos(\gamma)$$};
\draw[dotted, name path = line2, blue] ($(P4)!.5!(P5)$) -- (P1)
coordinate (P6);
\path[name path = aux2] (P6) circle [radius = 1bp];
\draw[name intersections = {of = line2 and aux2}, -latex, blue] (P6) --
($(intersection-1)!.75cm!(P6)$) node[scale = .75, shift = {(.25cm, .2cm)}]
{$$v\sin(\gamma)$$} coordinate (P7);
\draw [red, -latex] (P7) -- +($(P8)-(P5)$);
\end{tikzpicture}
\end{document}

-
Not that you may know, but why would Qrrbrbirlbel delete is answer? –  dustin Jun 26 '13 at 20:30