particleSystem Example : Fountain
The emitter is a point on the ground, emitting upwards in a tight cone. In the first example, particles fly out into space infinitely; in the second, gravity pulls them back down.
/* particleSystem Example 1: Fountain */ light () particleSystem ( emitterVolume(point 0 5 0), initialDirection(-1 -1 5 1 1 5), speed (5), rotation (-15 -15 -15 15 15 15), size (.1 .3), emitterRate(10), lifespan(5), count(100) ) |
|
/* particleSystem Example 2:
Fountain with gravity*/
light ()
particleSystem (
emitterVolume(point 0 5 0),
initialDirection(-1 -1 5 1 1 5),
speed (5),
rotation (-15 -15 -15 15 15 15),
size (.1 .3),
emitterRate(10),
lifespan(5),
force("gravity" 0 0 -3),
count(100)
)
|
|
(c) Ben Chang