Random point in an oblate spheroid?

First off, I'm not sure this is the right place for this topic. It was a best guess (And I'm sorry if I have it in the wrong place.)

I'm NOT a math or geometry guy. In this case I know i have all the pieces in front of me but I can't seem to put them together properly.

I'm writing a program that has to find a random point in an oblate spheroid.

--The problem--

My inputs:

P -- A proportion (example: 200% width/height)

H -- The z-axis height of the spheroid (unit of measurement doesn't matter)

What I need:

A random point in the oblate spheroid that is defined by the inputs.

How to go about it?

From Oblate spheroidal coordinates - Wikipedia, the free encyclopedia I can see that I have four variables to define. Call them a,u,v,p since I can't get the greek letters here. (a being radius on the x,y axis, u being the positive non-negative real constant, v being a number between postive and negative 90 and p being a negative between positive and negative 180.

I can easily get a random v,p (which gives me a random point on the surface of the spheroid defined by a,u,v,p). The only other factor I need to randomize is a (which again i can do).

What I don't understand is how to find the relationship between my inputs P and H and the constant u and radius a.

How do I find u and a using P and H?

Can anybody help simplify this for me?

Re: Random point in an oblate spheroid?

Answering my own question:

...After some thought it became apparent that I was right. ...I did have all the pieces.

z = a*sinh(u)*sin(v) (As per the wikipedia page)

At v = 90 (the z axis) solve for a

z/sinh(u) = a

So given a proportion (which is just a modification of u -- for my purposes i just create an arbitrary u anyway) I have my "a" variable.

I hope this post can be helpful for anyone searching for a similar solution at some point. (It's already in the top 2 results for "Random point in a spheroid").

Please note--even distribution is beyond the scope of this post. ...Gotta figure that one out for yourself.