From this answer, I was able to figure out how to get the graphics primitive from a Plot3D
. However, this does not seem to work for a RevolutionPlot3D
.
Full context: I am following tutorial 7.10 in "Mathematica Cookbook"
Code snippet (full code below):
c1 = RevolutionPlot3D[{t, -height*2t}, {t, 0, base}]
How can I extract the graphics primitives? from the plot above?
Full Code
Height = 1; Base = 1; theAxis = {1, 1, 1}; theCenterPoint = {0, 0, 0};
C1 = RevolutionPlot3D[
{t, -Height*2 t}, {t, 0, Base},
Mesh -> None
][[1]]; (*<- Applying the [[1]] did not work*)
C2 = Rotate[C1, theAxis[[1]], {1, 0, 0}];(*<- I also tried applying the [[1]] the C1 here instead of in the C1 definition*)
C3 = Rotate[C2, theAxis[[2]], {0, 1, 0}];
C4 = Rotate[C3, theAxis[[3]], {0, 0, 1}];
C5 = Translate[
C4,
{theCenterPoint[[1]], theCenterPoint[[2]], theCenterPoint[[3]] + Height*Base}
]