0
$\begingroup$

Is this a valid way to compute new points that are on a helix and if not what is it wrong?

The Cartesian coordinates of each new helix control point could be described by the following parametrization:

$x (u)= a n_x u + p_x + b((1- \cos{(u\theta)})/ \theta) $
$y (u)= an_y u + p_y + b(\sin{(u\theta)}/ \theta)$
$z (u)= a n_z u + p_z + u $

where $a$ is the length of the helix, $u$ is in $[0,a) $, $(p_x, p_y, p_z)$ is a given center of a triangle in 3D space, $(n_x, n_y, n_z)$ is the normal of the given center in the triangle, $b$ is the radius of the helix and $\theta$ controls the frequency of the helix's curls.

  • 0
    @ChuckFernández: I think that was a simple typo; fixed now.2012-07-19

2 Answers 2

0

Why don't you just make it $x(u)= a+m(\cos(u)),$ $y(u)=b+n(\sin(u))$ and $z(u)=k*u$?

  • 0
    Not clear about your method of generation,does the center of triangle stay on a helix? Do the triangle vertices describe a coiled coil?2015-08-07
0

Your equations do not generate a helix. A helix has the property that it has constant curvature and constant torsion when described by a Frenet-Serret frame. If we write your curve as \begin{equation} p(u) = \begin{bmatrix} x(u) \\ y(u) \\ z(u) \end{bmatrix} \end{equation} then the tangent vector is defined by \begin{equation} T(u) = \dfrac{p'(u)}{\left\lVert p'(u) \right\rVert} \end{equation}

We can change coordinates into the arc-length of the curve, \begin{equation} s(u) = \int_0^{u} \lVert p'(u) \rVert du \end{equation}

The curvature is the rate of change of the tangent vector with respect to arc length, i.e. \begin{equation} \kappa(s) = \left \lVert \dfrac{dT}{ds} \right \rVert \end{equation}

By the chain rule we can see that \begin{equation} \dfrac{dT}{ds} = \dfrac{dT}{du}\dfrac{du}{ds} = \dfrac{dT}{du}\left[ \dfrac{ds}{du} \right]^{-1} \end{equation} so that \begin{equation} \left \lVert \dfrac{dT}{ds} \right \rVert = \left \lVert \dfrac{dT}{du} \right \rVert \left| \left[ \dfrac{ds}{du} \right]^{-1} \right| \end{equation}

For your equation, $\left \lVert \dfrac{dT}{du} \right \rVert$ does have constant magnitude, but $\left| \dfrac{ds}{du} \right| = \lVert p'(u) \rVert$ does not, so the curve does not have constant curvature.

Since it's not entirely clear to me what you're trying to accomplish with this parametric curve, I'm not really sure how to fix your equations to make them a helix. If you're trying to get a helix that coils off the face of the triangle, which it seems like you might be, then why not generate the helix first using a standard representation like \begin{equation} \begin{aligned} x(t) &= r\sin(t) \\ y(t) &= r\cos(t) \\ z(t) &= pt \end{aligned} \end{equation} and then transform the resulting helix into a new coordinate system using a transform of the form \begin{equation} p_2 = Rp + c \end{equation} that places it where you want it? $c$ will just be the center of your triangle, and $R$ is a rotation matrix that reorients the axis of the helix to point along the normal, so $R$ could be something like the following. Let $\gamma = \cos^{-1}( \lVert e_3 \cdot n \rVert )$ where $e_3$ is the third standard basis vector. $\gamma$ is the angle between the $z$-axes before and after the transformation. Then let $\omega = \dfrac{e_3 \times n}{\lVert e_3 \times n \rVert}$, where it is assumed that $e_3 \times n \neq 0$. If it does, then the procedure should be modified by letting $\omega = e_1$. Then, define \begin{equation} \hat{\omega} = \begin{bmatrix} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y & \omega_x & 0 \end{bmatrix} \end{equation} \begin{equation} R = I + (\sin \theta) \hat{\omega} + (1-\cos\theta)\hat{\omega}^2 \end{equation} Here I've chosen $R$ to be the rotation matrix that performs the minimal rotation necessary to align the axis of the helix with the normal of the triangle.

Doing it this way also makes it easy to pick the spacing for your points in $t$, since they are separated by a distance (in arc-length) of $\Delta s = \sqrt{ r^2 + p^2 } \Delta t$, and by an angle of simply $\Delta t$ radians.