Kind of important: the solution posted does work, and answers the question in that sense. However, it is very slow, so a faster option would be much appreciated.
I'm trying to create the following image in Mathematica.
I apologize for my terrible paint skills. The idea is that I have a certain vector, say $({0,-\sqrt{0.25},\sqrt{0.5},-\sqrt0.25})$ (it's a unit vector, apart from that the components can take any real value). Now, what I want is to plot a disk, where each quarter section corresponds to a value of the vector. So in the image I drew, the first component is 0, so that quarter is just a quarter circle in the z = 0 plane. Then the second component would have height $\sqrt{0.25}$ in the second quarter section of the disk, in the negative z direction, et cetera.
Now, to be honest, I'm not sure where to start. I first thought I could possible use ParametricPlot3D, for example like
ParametricPlot3D[{ Cos[u], Sin[u], v}, {u, 0, 2 Pi/4}, {v, -0.5, 0},
Mesh -> None]
However, this only draws the outer shell, and I'm not sure to fill it up. Nor am I sure that I can combine this with another 3 commands in order to get a full disk, but perhaps that is not too difficult. In any case, I was wondering if someone had an idea of how to do this, and if I'm taking the right approach.
To extend a little on this, I tried combining them like this but it doesn't seem to work
p1 = ParametricPlot3D[{ Cos[u], Sin[u], v}, {u, 0, 2 Pi/4}, {v, -0.5,
0}, Mesh -> None, PlotStyle -> Opacity[.5]];
p2 = ParametricPlot3D[{ Cos[u], Sin[u], v}, {u, 2 Pi/4, 2 Pi/2}, {v,
0, Sqrt[0.5]}, Mesh -> None, PlotStyle -> LightBlue];
Show[p1, p2]
I can however do it in 2D, with circles. If only here was an easy way to plot sections of cylinders.
p1 = Graphics[{Blue, Disk[{0, 0}, 0, {0, 2 Pi/4}]}];
p2 = Graphics[{Red, Disk[{0, 0}, Sqrt[0.5], {2 Pi/4, 2 Pi/2}]}];
p3 = Graphics[{Blue, Disk[{0, 0}, 0.5, {Pi, 3/2*Pi}]}];
p4 = Graphics[{Red, Disk[{0, 0}, Sqrt[0.5], {3/2*Pi, 2 Pi/1}]}];
Show[p1, p2, p3, p4]