Is there a way to graph a function around a different axis than XYZ (3D)?

127 Views Asked by At

Is there a way to graph any 3D curve around other curves? For example, could I create a helix around the line given by parametric equations $x = y = z = t$? Or even around another curve such as $x = z = t$ and $y = t^2$?

The goal of this problem is to be able to create 3D shapes around a arbitrary, user defined axis that can be any continuous line. I've tried to use the concept of 2D function rotation with the 3D version, but I can't seem to figure it out. Note that I am not trying to revolve a 2D shape around a line to create a 3D shape.

1

There are 1 best solutions below

1
On BEST ANSWER

Consider the normal helix around the $Z$ axis. The $Z$ axis can be considered as the parametric line of points $P(t)=(0,0,t)^T $. Let $\mathbf u(\theta) = \left( \cos\theta, \sin\theta, 0 \right)^T$. The helix can be expressed as the collection of points $$ P(t) + r\mathbf u(t) $$ where $r$ denotes the radius. To generalize this to other type of curve, let's say $P(t)=\Big( x(t),y(t),z(t) \Big)^T$, it's not too difficult if the three derivatives $x'(t),y'(t)$ and $z'(t)$ are well defined and continuous. Continuity is important there because we want continuity of the unit tangent vector. This unit tangent vector to the curve is $$ \mathbf N(t)=\frac 1{\sqrt{ x'(t)^2+y'(t)^2+z'(t)^2 }} \times \Big( x'(t),y'(t),z'(t) \Big)^T $$ Then if you can figure out the rotation between $\mathbf N(t)$ and $\mathbf e_z=(0,0,1)^T$, say $\mathbf N(t)=\mathbf R_t( \mathbf e_z)$ then your custom helix could be $$ P(t)+r\mathbf R_t\Big( \mathbf u(t) \Big) $$

If your curve doesn't satisfy continuity of the tangent vector, there are probably ways, but it becomes a lot more annoying.