- #1
rabbed
- 243
- 3
Hi
If I'm using this method to generate points inside a sphere with radius K:
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)
where (0 < s < K^3), (-1 < v < 1) and (0 < o < 2*pi), i guess that:
S_PDF(s) = 1/(K^3)
V_PDF(v) = 1/2
O_PDF(o) = 1/(2*pi)
How come the joint distribution of S, V and O is 1/(4*pi*K^3)?
Shouldn't it be 1/(4*pi*K^3/3) because the volume of the sphere is 4*pi*K^3/3?
If I'm using this method to generate points inside a sphere with radius K:
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)
where (0 < s < K^3), (-1 < v < 1) and (0 < o < 2*pi), i guess that:
S_PDF(s) = 1/(K^3)
V_PDF(v) = 1/2
O_PDF(o) = 1/(2*pi)
How come the joint distribution of S, V and O is 1/(4*pi*K^3)?
Shouldn't it be 1/(4*pi*K^3/3) because the volume of the sphere is 4*pi*K^3/3?