Intersection of a helicoid and a line

133 Views Asked by At

I have a Helicoid described by the following parametric equations:

$$x = u\cos(v)$$ $$y = cv$$ $$z = u\sin(v)$$

The helicoid revolves around the y-axis:

Helicoid

Eliminating $u$ and $v$, we obtain the Cartesian form:

$$z = x\tan{\frac{y}{c}}$$

Rearranging for $y$ yields:

$$y = c \arctan{\frac{z}{x}} \qquad(1)$$

I have a line, described by a point and a direction:

$$p + \alpha n$$

I want to find the intersection distance $\alpha$ from the point to the helicoid along the direction $n$.

We know that at the intersection we have:

$$p_x + \alpha n_x = x$$ $$p_y + \alpha n_y = y$$ $$p_z + \alpha n_z = z$$

Substituting into $(1)$ we obtain:

$$p_y + \alpha n_y = c \arctan{\frac{p_z + \alpha n_z}{p_x + \alpha n_x}} \qquad(2)$$

As a quick check, I tried $p = (-2, 0, 1)$ and $n = (0, 1, 0)$ and obtained $\alpha \approx -0.464$. The point $p + \alpha n$ is shown on the image above, which looks good.

The equation $(2)$ is trivial to solve for cases where $n_x = 0$ and $n_z = 0$. How can I most efficiently solve this equation for the non-trivial case? Must I resort to the bisection or Newton methods?

1

There are 1 best solutions below

1
On BEST ANSWER

You need to eliminate $u$ and $v$ from

$$\begin{align}p_x + \alpha n_x &= u\cos(v)\\ p_y + \alpha n_y &= cv\\ p_z + \alpha n_z &= u\sin(v).\end{align}$$

You have

$$\tan(v)=\frac{p_z + \alpha n_z}{p_x + \alpha n_x}=\tan\left(\frac{p_y + \alpha n_y}c\right).$$

This is a transcendental equation in $\alpha$, for which no closed formula can be found.

In general it has an infinity of solutions, and for large $\alpha$,

$$\frac{n_z}{n_x}\approx \tan\left(\frac{p_y + \alpha n_y+k\pi}c\right),$$ or

$$\alpha\approx\frac1{n_y}\left(c\arctan\left(\frac{n_z}{n_x}\right)-p_y+k\pi\right).$$