import random
import math


def random_hypersphere_point(d):
    """
    Return a random point on a d-dimensional hypersphere.
    Ref: http://mathworld.wolfram.com/HyperspherePointPicking.html
    """
    x = [ random.gauss(0.0,1.0) for i in range(d) ]
    l = math.sqrt(sum([xi**2 for xi in x]))
    x = [ xi / l for xi in x]
    return x