3d plotting, washer integration, curve rotation, how to do it?

I’m trying to create an illustration to accompany a math problem. The problem asks to rotate a region bounded by two curves about the y-axis (see image below).

I’m fairly new to using Cetz and Lilaq, and I’m struggling to find a starting point. Would anyone have any suggestions?

Goals:

  • plot the 2 curves
  • plot the surfaces they create/rotated volume
  • plot the infinitesimal volume cut out depicting large R and small r
  • add accompanying content/text

From what I’ve found, I would need to know how to plot the surface or its parametrization, and I’m wondering if there is an easier way.

I’m not sure if it’s possible to draw exactly what you want with it, but there’s a package called simple plot that has a function called volume-of-revolution. It takes a function as an argument and draws a volume by rotating it around the x-axis.

Personally i think doing it all in mathplotlib (python) and just saving the result as svg file (not converting) will be easier and fast. Maybe just add a semi transparent cylinder and the y^2 plot. (Or x^2+y^2)