I'm trying to create a solid which looks something like a disc galaxy:
Key features are:
- Bulge in the middle
- Tapered "width" as it extends to a disc shape
The end goal would be to use Python to generate a bunch of "points" (ie, stars) within this galaxy shape randomly and use that to create a galactic model for a game.
I've tried describing the galaxy using spherical coordinates broken up into sections but am failing pretty hard. That's driven to try and find a single equation for the whole solid and then give random values to one of the free variables to find points within the solid.
Any ideas?

Is this good enough?
$$ (y - e^{-x^2}-0.1)(y + e^{-x^2}+0.1) = 0 $$
For 3D case, just replace $y \to z,\ x^2 \to x^2 + y^2$, so $$ (z - e^{-x^2-y^2}-0.1)(z + e^{-x^2-y^2} + 0.1) = 0 $$
but make sure, you restrict your $x$ and $y$ to be in $x^2+y^2 \le r^2$ for some given $r$, to get circular base.