That didn't fix it.  I messed around some more, but I couldn't get the
spherical coordinates working.  I decided to rework my first method.  By
raising the radius to the one third power, like for the other method,
basically the same thing is accomplished.  It's working now, thanks.  :D

vecs = numpy.random.standard_normal((size,size,3))
magnitudes = numpy.sqrt((vecs*vecs).sum(axis=-1))
vecs = vecs / magnitudes[...,numpy.newaxis]
randlen = numpy.random.random((size,size))
randlen = randlen ** (1.0/3.0)
randpoints = vecs*randlen[...,numpy.newaxis]
rgb = ((randpoints+1.0)/2.0)*255.0

Ian
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to