Coke bottles 2016, created with #Wolfram #Mathematica by my 18-years-old calculus students as the solution to the exercise in this link Coke exercise in Mathematica
EDIT: I have attached the notebook of the activity. Actually Mathematica is so powerful that the code is very simple: here I will write some of it from the end of the attached notebook, where I show how to create a chess piece as a solid of revolution. After that if you want to reproduce one of the cokes from my students, you just have to change the content of the piecewise function below with one of the piecewise functions that are shown in the JPG images in my original post. First, here it is the simplest way to create a solid of revolution that looks like a chess piece:
peon[x_] := Piecewise[{
{1 - x/2, 0 < x < 1},
{1/2, 1 < x < 3},
{3/4 - (x - 7/2)^2, 3 < x < 4}
}];
RevolutionPlot3D[{peon[y], y}, {y, 0, 4}, PlotRange -> All]
Now, when doing their coke, many students like to put an image around it. In order to put an image around the chess piece, asuming that you have a file called "lenna.jpg" in the directory of your computer that you obtain from evaluating the command Directory[], and after evaluating the previous code, you can wrap the image around the chess piece with this code:
imagen = Import["lenna.jpg"];
RevolutionPlot3D[{peon[y], y}, {y, 0, 4.05},
PlotStyle -> Texture[imagen], Mesh -> None]
On the other hand, if you prefer to have a transparent solid of revolution, you can use the following code after evaulating the first one where the function peon was defined:
RevolutionPlot3D[{peon[y], y}, {y, 0, 4.05},
PlotStyle -> Opacity[0.7], Mesh -> None]
Have fun!
Attachments: