# How do I plot a U- form cylinder

I'm really new to Mathematica, trying to learn some things, but I need help trying to plot this kind of cylinder, a U tube like cylinder. Tried to use an example code like this, and then vary some parameters, but still unclear on how to do that. Any help is apreciated.

http://imagizer.imageshack.us/v2/280x200q90/905/I9itfx.png

Graphics3D[{Yellow,
Cylinder[{{v1 t, 0, h1}, {v1 t + Δx1, 0, h1}}, Sqrt[A1/π]],
Cylinder[{{8 + A1/A2 v1 t, 2, h2}, {8. + A1/A2 v1 t + A1/A2 Δx1, 0, h2}}, Sqrt[A2/π]]

Also I have used this

Tube[{{4, 10, h1}, {4, 3, h1}, {3, 0, h2}, {10, 1, h2}},
{Sqrt[A1/2 π], Sqrt[A1/2 π], Sqrt[A2/2 π], Sqrt[A2/2 π]}]}

## 1 Answer

Tube is helpful in this regard, for example:

tube[r_, l_, rt_] :=
Graphics3D[{CapForm["Square"],
Tube[Join[Table[{-1, 0, j}, {j, l, 0, -0.1}],
Table[-{Cos[t], 0, Sin[t]}, {t, 0, Pi, 0.1}],
Table[{1, 0, j}, {j, 0, rt, 0.1}]], r]}, Boxed -> False]

Visualizing:

Manipulate[tube[i, j, k], {i, 0.1, 0.5}, {j, 0.5, 2}, {k, 0.5, 2}]

You can modify an customize: