Just a joke - reminder about my school days when I drew such cosine curves in polar coordinates with pencil and compass.
Update: I added a script to make a bulb over generic rhodonea curve. This is controlled by ratio of N and D variables (and gives the same results as the two earlier scripts with specific values). The related formulae and pattern samples could be found in https://en.wikipedia.org/wiki/Rose_%28mathematics%29
Update 12/27: add twist parameter to get twisted thing - compare rose2 against rose_gen.
I set 1mm wall thickness because my old printer has 0.8mm nozzle. Now I tested that 0.5mm thickness is Ok for 0.4mm nozzle. So I recommend to regenerate STL files with thickness matching your printer.