The contours of the following function $f$ trace out an ellipse, $f(x, y, z) = \exp(-x^2a)\exp(-y^2b)$, where $a\neq b$ are positive, real constants greater than zero.
The axis of these ellipses is along the $z$-axis. Now, I want to generalize $f$ such that the symmetry axis of these elliptical contours lies along an arbitrary vector defined by some unit vector $r=(x', y', z')$.
If $a=b=1$ I could simply find the distance between some point $P=(x', y', z')$ and the line $L$ spanned by $r$. But when $a\neq b$ I cannot utilize this trick.
Can I get a hint to what to do in this case?