Skip to main content
7 events
when toggle format what by license comment
Oct 2, 2017 at 10:37 history migrated from physics.stackexchange.com (revisions)
Sep 30, 2017 at 16:49 comment added Floris I think $\cos(rand(-\pi/2,\pi/2))$ might get you part of the way; but you still need to decide on the sign of the other components or you will end up in just some quadrant - and that means generating more than one random number. I suppose that generating a random number between $-\pi$ and $\pi$ might suffice - you could then take the sine and the cosine to give you the two pieces you need. Maybe.
Sep 30, 2017 at 16:44 comment added occamsrazor @Floris Yeah, you're right! This is so cool! Should it be sinusoidal?
Sep 30, 2017 at 16:42 comment added Floris The length of an individual component of $w$ (which is the randomly generated vector) does not follow a uniform distribution. This method won't work.
Sep 30, 2017 at 16:20 comment added occamsrazor Why not [0,1]? This is a bijection. It should give you what you want.
Sep 30, 2017 at 16:10 comment added Airidas Korolkovas okay, but what is the distribution from which you would draw the new random component? It must be demonstrated that on average the cross product $\langle \mathbf{w} \times \mathbf{v} \rangle = 0$, i.e. the new vector is equally likely to fall anywhere on the cone at an angle $\beta$ to the old vector.
Sep 30, 2017 at 15:56 history answered occamsrazor CC BY-SA 3.0