# Coordinate of a point on cylindrical helix with TiKz

I have a cylindrical helix and two points on it (say A and B). I want to draw a line from A to B. How can I parse this coordinate in TiKz? Thank you in advance.

Code:

\documentclass[margin=1cm]{standalone}
\usepackage{pgfplots,tikz}
\usetikzlibrary{decorations.markings,arrows}
\usepackage{amsmath}

\begin{document}
\begin{tikzpicture}[scale=0.7]
\begin{axis}[
view={-20}{-20},
axis line style = ultra thick,
axis lines=middle,
zmax=80,
xmax=2,
ymax=2,
height=12cm,
xtick=\empty,
ytick=\empty,
ztick=\empty,
clip=false,
x label style={at={(axis cs:2,0.051)},anchor=north},
xlabel={$y$},
y label style={at={(axis cs:0.05,2)},anchor=north},
ylabel={$x$},
z label style={at={(axis cs:0.075,0,80)},anchor=north},
zlabel={$z$},
]
({sin(deg(x))},
{cos(deg(x))},
{6*x/(pi)})
node[circle,scale=0.2,fill,pos=0.05]{}
node [circle,scale=0.5,fill,pos=0.15]{} % coordinate (A)
node [circle,scale=0.5,fill,pos=0.515]{}; % coordinate (B)
%\draw (A)--(B);
\end{axis}

\end{tikzpicture}

\end{document}


Just add name on the node

\documentclass[margin=1cm]{standalone}
\usepackage{pgfplots,tikz}
\usetikzlibrary{decorations.markings,arrows}
\usepackage{amsmath}

\begin{document}
\begin{tikzpicture}[scale=0.7]
\begin{axis}[
view={-20}{-20},
axis line style = ultra thick,
axis lines=middle,
zmax=80,
xmax=2,
ymax=2,
height=12cm,
xtick=\empty,
ytick=\empty,
ztick=\empty,
clip=false,
x label style={at={(axis cs:2,0.051)},anchor=north},
xlabel={$y$},
y label style={at={(axis cs:0.05,2)},anchor=north},
ylabel={$x$},
z label style={at={(axis cs:0.075,0,80)},anchor=north},
zlabel={$z$},
]
({sin(deg(x))},
{cos(deg(x))},
{6*x/(pi)})
node[circle,scale=0.2,fill,pos=0.05]{}
node [name=A,circle,scale=0.5,fill,pos=0.15]{} % coordinate (A)
node [name=B,circle,scale=0.5,fill,pos=0.515]{}; % coordinate (B)
\draw[red] (A)--(B);
\end{axis}

\end{tikzpicture}

\end{document}


\documentclass[margin=1cm]{standalone}
\usepackage{pgfplots,tikz}
\usetikzlibrary{decorations.markings,arrows}
\usepackage{amsmath}

\begin{document}
\begin{tikzpicture}[scale=0.7]
\begin{axis}[
view={-20}{-20},
axis line style = ultra thick,
axis lines=middle,
zmax=80,
xmax=2,
ymax=2,
height=12cm,
xtick=\empty,
ytick=\empty,
ztick=\empty,
clip=false,
x label style={at={(axis cs:2,0.051)},anchor=north},
xlabel={$y$},
y label style={at={(axis cs:0.05,2)},anchor=north},
ylabel={$x$},
z label style={at={(axis cs:0.075,0,80)},anchor=north},
zlabel={$z$},
]