On Fri, Apr 10, 2009 at 02:17, Anne Archibald wrote:
> 2009/4/10 Ian Mallett :
>
>> The vectors are used to "jitter" each particle's initial speed, so that the
>> particles go in different directions instead of moving all as one. Using
>> the unit vector causes the particles to make the smooth pa
2009/4/10 Ian Mallett :
> The vectors are used to "jitter" each particle's initial speed, so that the
> particles go in different directions instead of moving all as one. Using
> the unit vector causes the particles to make the smooth parabolic shape.
> The jitter vectors much then be of a random
This seems to work:
vecs = Numeric.random.standard_normal(size=(self.size[0],self.size[1],3))
magnitudes = Numeric.sqrt((vecs*vecs).sum(axis=-1))
uvecs = vecs / magnitudes[...,Numeric.newaxis]
randlen = Numeric.random.random((self.size[0],self.size[1]))
randuvecs = uvecs*randlen[...,Numeric.newaxi
On Fri, Apr 10, 2009 at 01:58, Ian Mallett wrote:
> On Thu, Apr 9, 2009 at 11:46 PM, Robert Kern wrote:
>>
>> Parabolic? They should be spherical.
>
> The particle system in the last screenshot was affected by gravity. In the
> absence of gravity, the results should be spherical, yes. All the v
On Thu, Apr 9, 2009 at 11:46 PM, Robert Kern wrote:
> Parabolic? They should be spherical.
The particle system in the last screenshot was affected by gravity. In the
absence of gravity, the results should be spherical, yes. All the vectors
are a unit length, which produces a perfectly smooth s
On Fri, Apr 10, 2009 at 01:42, Ian Mallett 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
It gives a perfect parabolic shape that looks very nice, but somewhat
unrealistic. 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. Help?
_
This works; thank you.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Thu, Apr 9, 2009 at 23:18, Ian Mallett wrote:
> Hello,
>
> With the help of this list, over the past two days, I have implemented a GPU
> particle system (picture here:
> http://img7.imageshack.us/img7/7589/image1olu.png). Every particle is
> updated entirely on the GPU, with texture data (arr
Hello,
With the help of this list, over the past two days, I have implemented a GPU
particle system (picture here:
http://img7.imageshack.us/img7/7589/image1olu.png). Every particle is
updated entirely on the GPU, with texture data (arrays) being updated
iteratively between two framebuffer object
10 matches
Mail list logo