I'm trying to create a graphic for an inclined manometer and need to make the fluid in the manometer tube look realistic. The part where the blue and green tubes meet should be flat, like a real liquid. The red disk at that point represents what I need it to look like.
The angle is changed with a slider in Manipulate
. I tried to make the solutions from this post work but failed. How can I take a slice out of a tube/cylinder that is at an angle?
Here is my code to work from to make the graphic:
Manipulate[
Graphics3D[{
Blue,
Tube[{{-2.5, 0, 0}, {0, 0, 0}, {10*Cos[theta], 0, 10*Sin[theta]}},
1.25],
Green,
Tube[{{10*Cos[theta], 0, 10*Sin[theta]}, {15*Cos[theta], 0,
15*Sin[theta]}, {15*Cos[theta] + 2.5, 0, 15*Sin[theta]}}, 1.25],
}, ViewPoint -> Front],
Control[{{theta, Pi/6}, Pi/6, Pi/4}]
]
Tube[]
itself can't be cut off, so starting from lower-level primitives (i.e.Polygon[]
) would be necessary here. Are those bends needed, or are you fine with a solution that just generates a truncated cylinder? $\endgroup$