This is a little throwback to my student days. One of the projects we were assigned for our 4th-year Graphics and Dynamic Control course (with Dr. Mike Scott) was to animate a wireframe 3D model of "something". My friend and project-partner Brian Boyle and I decided to do a brandy glass, much like the one shown here. It is a project I really enjoyed doing at the time (Brian and I went all-out do do a good job on this one), which is why I wanted to recreate it here.
There is a little bit about the maths involved in doing the 3D transformations at https://www.tutorialspoint.com/computer_graphics/3d_transformation.htm.
One aspect of the original project that I haven't (yet) reproduced here was that the motion of the glass was "realistic", in response to forces applied to it. This involved using the Runge-Kutta method for calculating the motion of the object. The one here just spins at fixed rates around all three axes.