I have done a lot of plotting in 2D using pgfplots but I am new to the 3D portion. I am attempting to illustrate a solid of revolution. For example, I have the area under the curve y = x^2 + 1 on the domain [0,5] (along with the curve rotated about both the x- and y- axes) illustrated with the following:
\documentclass[24pt, letter]{report}
\usepackage[fleqn]{mathtools}
\usepackage{amsthm, amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\pagenumbering{gobble}
\begin{document}
% Curve + Area Underneath
\begin{tikzpicture}
\begin{axis}[title={$y=x^2+1$},
xticklabels={,$a$, , , , ,$b$} ,
yticklabels=\empty,
x=1.0cm,
y=0.2cm,
xmin=0, xmax=5.4,
ymin=0, ymax=26.9,
axis x line=bottom,
axis y line=left
]
\addplot[smooth,thick,domain=0:5, fill=blue!50]{1+x^2}\closedcycle;
\node at (axis cs:3.75,4) [anchor=south]{$A$};
\end{axis}
\end{tikzpicture}
% Curve Rotated about y-axis
\begin{tikzpicture}
\begin{axis}[view={45}{45}]
\addplot3[surf,shader=interp,samples=50,
domain=0:5,y domain=0:2*pi,z buffer=sort]
({x*cos(deg(y))}, {x*sin(deg(y))}, {x^2+1});
\end{axis}
\end{tikzpicture}
% Curve Rotated about x-axis
\begin{tikzpicture}
\begin{axis}[view={45}{45}]
\addplot3[surf,shader=interp,samples=50,
domain=0:5,y domain=0:2*pi,z buffer=sort]
(x, {(x^2+1)*cos(deg(y))}, {(x^2+1)*sin(deg(y))});
\end{axis}
\end{tikzpicture}
\end{document}
Is it possible to further the illustration by not only drawing the curve, but also the area under it? For example, when rotating about the y-axis, I'd like it to look not like a bowl, but like a cube with a bowl hollowed out of the top. Eventually I'd even like to be able to illustrate this with the area bounded by two curves, such as the area bounded by y=x^2+1, x=4, y=0, y=37.
Additionally, how would I draw the rotation about an arbitrary axis, such as the line y = -1 or x = 6?