This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: A point on a d-dimensional sphere
- From: James Theiler <jt at lanl dot gov>
- To: "Sliwa, Przemyslaw" <Przemyslaw dot Sliwa at ecb dot int>
- Cc: "'gsl-discuss at sources dot redhat dot com'" <gsl-discuss at sources dot redhat dot com>
- Date: Thu, 19 Jun 2003 09:09:46 -0600 (MDT)
- Subject: 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.
]