What is the general formula for a cylinder in 3D?

161 Views Asked by At

Say I have a line in 3D space with the equation: $$x=x_0+ta\\y=y_0+tb\\z=z_0+tc$$

I know that the euqation of a cylinder in 3D is: $$(y−z)^2+(z−x)^2+(x−y)^2=3r^2$$ from this post

However this cylinder is on the line: $x=y=z$

Is there any way to find the formula for a cylinder with its central axis on the line?

1

There are 1 best solutions below

5
On BEST ANSWER

The equation for a right circular cylinder of radius $r$, having an axis

$ A = P_0 + t a $

where $ a $ is a unit vector, is given by

$\boxed{ ( p - P_0)^T (I - {aa}^T ) (p - P_0) = r^2} $

where $p = [x, y, z]^T $

A special case of this equation is when $P_0 = (0,0,0)$ and $a = \dfrac{1}{\sqrt{3}}(1, 1, 1) $. In this case,

$ I - {aa}^T = \dfrac{1}{3} \begin{bmatrix} 2 && - 1 && - 1 \\ -1 && 2 && -1 \\ -1 && -1 && 2 \end{bmatrix}$

So that, the left hand side is

$ \dfrac{1}{3} ( 2 x^2 + 2 y^2 + 2 z^2 - 2 x y - 2 x z - 2 y z ) $

which can be factored as

$ \dfrac{1}{3} ( (x - y)^2 + (x - z)^2 + (y - z)^2 ) $

Hence, we get

$ (x - y)^2 + (x - z)^2 + (y - z)^2 = 3 r^2 $