File format for swept profile with changing normal
Well realistically your choices are either IGES or STEP. IGES is slightly simpler but you will not successfully write either format without buying the standard (which in case of step is actually so many pages that by the time you have read them a year has passed, and lots of money is wasted on paper). You could also use one of the nonstandard kernel internal formats like Parasolid as its also commonly supported. Most other formats are polygon data so not suitable.

I would explore an alternative option to writing your own exporter, buy a commercial or take a free CAD kernel and let the kernel (open CASCADE) do the exporting for you.

On the other hand this is not hard to do inside your CAD application. Which you will need anyway to verify the result. Most CAD applications have a COM API's (don't know about NX most likely, but both creo and catia do have this) so you can edit, even do the generation from a text editor via python if you so wish. This is by far the least amount of effort (and it's usually less work to set up than using just the kernel).



Image 1: Swept with spine angle $60 \cos(4 t)+110$ and polar trajectory with $r = \cos(4 t)+3$ in Creo. All input from program injection.

So the approach depends on why you want to do what you do. And what your budget/time constraint is.

PS: NURBS (the underlying format of CAD data) solutions are not necessarily analytic, but parametric fits to analytical solutions. Sometimes these are exact sometimes not so exact as not all functions can be fitted to rational spline (though many can). Even when they can fitting is a more general solution.