[Numpy-discussion] Even Sphere Volume

Gökhan SEVER gokhansever@gmail....
Sun Jul 5 15:44:45 CDT 2009


On Sun, Jul 5, 2009 at 3:30 PM, Ian Mallett <geometrian@gmail.com> wrote:

> Hello,
>
> I'm trying to get a cloud particle system working.  As part of determining
> the depth of every point (to get the light that can pass through), it makes
> sense that the volume should be of even density.  The volume is a sphere.
> Currently, I'm using:
>
> vecs = numpy.random.standard_normal(size=(size,size,3))
> magnitudes = numpy.sqrt((vecs*vecs).sum(axis=-1))
> uvecs = vecs / magnitudes[...,numpy.newaxis]
> randlen = numpy.random.random((size,size))
> randpoints = uvecs*randlen[...,numpy.newaxis]
>
> The particles' positions are set to randpoints.  However, this creates
> only an even distribution of *directions *on the sphere.  The particles
> are too closely centered around the center.  What I want is a certain number
> of particles arranged evenly throughout the sphere.  How do I do that?
>
> Thanks,
> Ian
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
Hey Ian,

What are you using to visualize this cloud particle system, if any?

I am interested in what you are working on, since I have a plan to create
some cloud particle growth visualizations. To better understand the
underlying physical concepts of the subject and demonstrate to others, as
well as simulating the two different cloud condensation nuclei counter
instruments.

-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090705/613094aa/attachment.html 


More information about the NumPy-Discussion mailing list