Helix equation around vector

geometry

I'm looking to get the equation $(x,y,z)$ of a 3d helix according to a vector.

enter image description here

I'd like create helix around one vector (for example around the $X,Y $or $Z$ vectors on the picture). I know how to draw it around one axis :

  • $x = t, y = \cos(t), z = \sin(t) $ for the helix around the $x$-axis $(1,0,0)$
  • $x = \cos(t), y = \sin(t), z = t$ for the helix around the $z$-axis $(0,0,1)$
  • $x = \cos(t), y = t, z = \sin(t)$ for the helix around the $y$-axis $(0,1,0)$

But I'd like to generalize it to every vector (for example $(1,1,0)$ or $(1,1,1)$).

Thanks for the help!
enter image description here

Best Answer

Your elix has a fixed radius $r=1$, a fixed step $a=2\pi$, and its axis passes through the origin $O$.
I show a more general version.

Simply choose three orthogonal univ vectors $\mathbf{i},\mathbf{j},\mathbf{k}$, where $\mathbf{k}$ is the direction of the axis of the elix, and you have $$ P=P_0+r\cos(t)\mathbf{i}+r\sin(t)\mathbf{j}+\frac{a}{2\pi} t\mathbf{k} $$ or in coordinates: \begin{align} x &= x_0 + r\cos(t)i_1 + r\sin(t)j_1 + \frac{a}{2\pi} t k_1, \\ y &= y_0 + r\cos(t)i_2 + r\sin(t)j_2 + \frac{a}{2\pi} t k_2, \\ z &= z_0 + r\cos(t)i_3 + r\sin(t)j_3 + \frac{a}{2\pi} t k_3 \end{align} You can obltain your elix with $P_0 = O = (0,0,0)$, $\mathbf{i} = (1,0,0)$, $\mathbf{j} = (0,1,0)$ and $\mathbf{k} = (0,0,1)$ and $r=1$, $a=2\pi$: \begin{align} x &= 0 + 1\,\cos(t)\,1 + 1\,\sin(t)\,0 + 1\, t\, 0 &&= \cos(t), \\ y &= 0 + 1\,\cos(t)\,0 + 1\,\sin(t)\,1 + 1\, t\, 0 &&= \sin(t), \\ z &= 0 + 1\,\cos(t)\,0 + 1\,\sin(t)\,0 + 1\, t\, 1 &&= t \end{align}

Related Question