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 π]}]}

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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