Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

  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 π]}]}
share|improve this question

Tube is helpful in this regard, for example:

tube[r_, l_, rt_] := 
   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]


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

You can modify an customize: enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.