[Numpy-discussion] Another Array

Robert Kern robert.kern at gmail.com
Fri Apr 10 02:46:47 EDT 2009


On Fri, Apr 10, 2009 at 01:42, Ian Mallett <geometrian at gmail.com> wrote:
> It gives a perfect parabolic shape that looks very nice, but somewhat
> unrealistic.

Parabolic? They should be spherical.

> I'd like to scale the unit vectors by a random length (which
> can just be a uniform distribution).  I tried scaling the unit vector n*n*3
> array by a random n*n array, but that didn't work, obviously.

No, it's not obvious. Exactly what code did you try? What results did
you get? What results were you expecting?

> Help?

Let's take a step back. What kind of distribution are you trying to
achieve? You asked for uniformly distributed unit vectors. Now you are
asking for something else, but I'm really not sure what. What standard
are you comparing against when you say that the unit vectors look
"unrealistic"?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list