Hi Eron,
No Maths involved, I modelled it in Rhino with some curves and a rail sweep then flowed it around a curve with history enabled so that I could twist it in situ. I would normally have done it as a combination of Rhino and T-Splines but with Rhino 7 and Quadremesh/sub d tools it’s pretty straightforward.
[No maths to speak of from my side but obviously under the hood of Rhino, very complex mathematics]
Cheers
Andy