# How can I draw a hyperboloid given its generatrix?

I want to see how a hyperboloid of revolution is generated by its generatrix, i.e. by rotating one (say the one passing point $(1,0,0)$ and $(0,1,1)$) of the skew lines around another (say the z axis).

My trial:

Manipulate[
Show[
ParametricPlot3D[{Sqrt[t^2 + (t + 1)^2] Cos@\[Theta],
Sqrt[t^2 + (t + 1)^2] Sin@\[Theta], 1 + t}, {t, -1, 1}, {\[Theta],
0, \[Beta]}, BoxRatios -> {1, 1, 1},
PlotRange -> {{-2, 2}, {-2, 2}, {0, 2}}],
ParametricPlot3D[{1 - t, 1 + t, 1 + t}, {t, -1, 1}]], {\[Beta], 0.1,
2 \[Pi]}]


However, the generatrix $(1 - t, 1 + t, 1 + t)$ doesn't match the hyperboloid. So how can I do it correctly?

-
Your question isn't clear to me but I suggest that you look at, for example, "Generating a Hyperboloid by Rotating a Line" from the Wolfram Demonstrations Project. –  MikeLimaOscar Dec 11 '13 at 12:30
I'm sorry but what do you mean by "processor"? –  Silvia Dec 11 '13 at 13:18
@Tangshutao Hi could you please tell your question in Chinese to me in the chat room? –  Silvia Dec 11 '13 at 20:43
@Silvia,抱歉，英语不好，我是想看通过（1，0，0）和（0，1，1）的空间直线绕z轴旋转的过程，看看它是怎么形成一个曲面 –  ShutaoTang Dec 12 '13 at 4:21
@Silvia,+1,That's my thought！ –  ShutaoTang Dec 12 '13 at 13:42

Wolfram example is quite slow, this is simple example with better performance. Since you want to use point positions, I've also added InputFields for this purpose:

DynamicModule[{b1, b2, a, ds},
Row[{
Graphics3D[{
Thick, Black, DotDashed, Line[{{0, 0, 2}, {0, 0, -2}}], Red,
{Dynamic@GeometricTransformation[
{Tube[{b1, b2}, .03],
Line@{b1, {0, 0, b1[[3]]}}, Line@{b2, {0, 0, b2[[3]]}}},
RotationTransform[a Degree, {0, 0, 1}]
]},
Thick, Orange, Dashing@1, Dynamic@ds[[ ;; IntegerPart[a/10]]]

}, PlotRange -> 1.5, ImageSize -> 300, Boxed -> False, FaceGrids -> {{0, 0, -1}}]
,
Column[{Slider[Dynamic@a, {0, 350, 2}],
InputField[Dynamic@b1],
InputField[Dynamic@b2]}, Center]}],

Initialization :> (
b1 = {1, 1, -1}; b2 = {-1, 1, 1}; a = 1;
ds := Table[Rotate[Line@{b1, b2}, a1 Degree, {0, 0, 1}], {a1, 0, 350, 10}];
)]


Modifying Silvia's code:

Manipulate[

ParametricPlot3D[
Evaluate[(RotationTransform[th, {0, 0, 1}].RotationTransform[t1, {1, 1, 0}]
)@{1, 1, t}],
{t, -2, 2}, {th, 0, 2 \[Pi]},PlotRange -> 2.5, ImageSize -> 500,
Boxed -> False, FaceGrids -> {{0, 0, -1}}, PlotStyle -> None,
MeshStyle -> Thick, Mesh -> {0, 50}
],
{t1, 0, Pi, .05}]


-
,Dear Kuba,thanks for helping me understand the problem sincerely.My English is poor .I think "processor" is same with "process".Recently,I have been preparing the postgraduate examination.I cannot understand why the line could be a surface.And the question come from a postgraduate examination paper. –  ShutaoTang Dec 12 '13 at 13:37
,+1 OK,I know.:) –  ShutaoTang Dec 12 '13 at 13:39
@Tangshutao I've added another example, it might be quite illustrative. –  Kuba Dec 12 '13 at 21:02

Also a direct coordinate transformation from $(x,y,z)$ to $(t,\theta,z)$:

ParametricPlot3D[Evaluate[
RotationTransform[θ, {0, 0, 1}]@
{1 - t, t, t}
], {t, -1, 2}, {θ, 0, 2 π}]


In fact, as long as you keep the tranform parameters away from $t$, the results will always be ruled surface (and the hyperboloid of one sheet is doubly ruled surface):

ParametricPlot3D[Evaluate[
RotationTransform[0.3, {Sin[10 θ], 3 Cos[θ], 4 Sin[θ]}]@
RotationTransform[θ, {0, 0, 1}]@
{1 - t, t, t}
], {t, -1, 1}, {θ, 0, 2 π},
PlotPoints -> 50, Axes -> False, Boxed -> False, Lighting -> "Neutral"]


-

One-liner:

n = 100; h = 1; r = 1; φ = 0.9 π;

Graphics3D@Line@Transpose[#, {2, 3, 1}] &@{{r Sin[#], r Cos[#], 0 # - h},
{r Sin[# - φ], r Cos[# - φ], 0 # + h}} &[2 π N@Range[n]/n]


A small fun with it: the hyperbolic Shukhov Tower

n = 16;
h = 5.0;
k = 5;
m = 3;
p = 1.5;

Graphics3D@Line@Flatten[#, {{1, 4}, {2}, {3}}] &@Table[{
{(t - 1)^p Sin@RotateLeft[#, m], (t - 1) Cos@RotateLeft[#, m],0 # - h (t - 1)^p},
{t^p Sin[#], t Cos[#], 0 # - h t^p},
{t^p  Sin@RotateRight[#], t Cos@RotateRight[#], 0 # - h t^p},
{(t - 1)^p Sin@RotateRight[#, m + 1], (t - 1) Cos@RotateRight[#, m + 1],
0 # - h (t - 1)^p}}, {t, k}] &[2 π N@Range[n]/n]


-
Everything's a one-liner if you have a wide enough screen ;) –  rm -rf Dec 12 '13 at 15:11