Hi SnackWhack,

I am assuming that you want the point to be uniformly distributed in the region of the cone intersected with the cube.

Here is one approach: Generate a point (x,y,z) inside the cube by using your favorite random number generator to generate three Uniform(0,1) numbers x, y, and z. Test to see if the point is inside the cone. If it is, keep it. If not, throw it away and try again.

As for testing to see if the point is inside the cone, let's say the angle of the cone with its axis is . Compute the angle between the axis and the vector from the vertex to (x,y,z). You can use a dot product for this. If (or, equivalently, ), the point is in the cone.

[edit] That should be above. [/edit]