This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A point on a d-dimensional sphere


you can use gsl_ran_dir_nd (see section 19.22), but the basic idea
is to generate d gaussian deviates {z_1,...,z_d} and then normalize
them using x_i = z_i/R, where R=sqrt(z_1^2+...z_d^2)

if d<4, there are tricks you can use to speed things up.

jt

On Thu, 19 Jun 2003, Sliwa, Przemyslaw wrote:

] Hi friends,
]
] Does anybody know how to generate a point on a d-dimensional sphere???
]
] Thanks,
]
] Przem
]
] Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement.
] This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited.
] If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system.
]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]