Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Generating random numbers under constraints' topicStudent Support Forum > General > "Generating random numbers under constraints"

Help | Reply To Topic
Author Comment/Response
11/28/09 3:41pm

How can I generate a set of random numbers simultaneously that satisfy certain constraints? For example, how to generate a random point (x,y,z) that lies on the intersection between a sphere and a plane, so that x,y,z satisfy:

c1 x + c2 y + c3 z= c4
x^2+y^2+z^2=1 where c1,..c4 are constants.

The method of generating x totally randomly and solving the two equations is not good since in general a wrong x will lead to complex solutions for y, z.

I really some innovative way to choose the three variables simultaneously as if I am picking a random point (geometrically) from the intersection circle between the plane and the sphere.


URL: ,
Help | Reply To Topic