Sorry, I should have explained some more..
Instead of regular mathematical convention for coordinates, I'm using what I felt was intuitive from my 3D-coding background - a coordinate system where X is to the right, Y is up and Z is into the screen. For the 2D spherical coordinate system, I'm placing (0,0) at (0,0,-K) in the 3D coordinate system. From that point I wanted the positive longitude to increasing towards positive X before heading off into the screen (Z) and positive latitude to start increasing towards positive Y before heading off towards the north pole (at (0,K,0)). With that settled, this is what I've done so far:
Tried randomizing uniform points inside sphere of radius K using:
X = R*cos(A)*sin(O)
Y = R*sin(A)
Z = -R*cos(A)*cos(O)
(0 < o < 2*pi), (-pi/2 < a < pi/2), (0 < r < K)
The Jacobian | d(XYZ / d(OAR) | = r^2*cos(a) <- note that I get cos(a) instead of sin(a) because of the different coordinate convention.
O_PDF(o) = 1/(2pi)
A_PDF(a) = 1/pi
R_PDF(r) = 1/K
This didn't produce a uniform distribution of points inside the sphere:
XYZ_PDF(o,a,r) = O_PDF(o) * A_PDF(a) * R_PDF(r) / | d(XYZ) / d(OAR) | = 1/(2*pi^2*K) / (r^2*cos(a))
So I calculated new distributions for the variables in the volume element:
O_PDF(o) = 1/(2pi)
A_PDF(a) = cos(a)
R_PDF(r) = 3*r^2/K^3
Which gave me:
XYZ_PDF(o,a,r) = O_PDF(o) * A_PDF(a) * R_PDF(r) / | d(XYZ) / d(OAR) | = 3*r^2*cos(a)/(4*pi*K^3) / (r^2*cos(a)) = 1 / (the volume of the sphere)
So having the correct PDF's, I could use the inverse CDF method for A and R to create a new formula:
X = S^(1/3)*sqrt(1-V^2)*sin(O)
Y = S^(1/3)*V
Z = -S^(1/3)*sqrt(1-V^2)*cos(O)
(0 < o < 2*pi), (-1 < v < 1), (0 < s < K^3)
The Jacobian | d(XYZ) / d(OVS) | = (v^2-v-1)/3
O_PDF(o) = 1/(2*pi)
V_PDF(v) = 1/2
S_PDF(s) = 1/K^3
But now I get:
XYZ_PDF(o,v,s) = O_PDF(o) * V_PDF(v) * S_PDF(s) / | d(XYZ) / d(OVS) | = 1/(4*pi*K^3) / ((v^2-v-1)/3) = 1/(4*pi*K^3/3) * 1/(v^2-v-1) =
1 / (the volume of the sphere) * 1/(v^2-v-1)
So does that mean that I still don't get a uniform distribution, or is it just not uniform relative to this new OVS-space in some way?
I'm hoping that changing V_PDF(v) = 1/2 into something else will give me XYZ_PDF(o,v,s) = 1 / (the volume of the sphere) and that it'll will bring me closer to the standard normal distribution the way I explained before. There should be a connection here, since I've read that normalizing a 3D-vector of components coming from a standard normal distribution will give me uniform points on the surface of the sphere.
Does it make any sense?