If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

What else can you make with particle systems?

Particle systems create more than just water; they can create cool effects like fireworks! To simulate fireworks, we launch particles with gravity, then explode them into child particles, adjusting gravity strength and lifetime for different looks. Then, we add randomness to the speed and launch angles to create more realistic fireworks.

Want to join the conversation?

Video transcript

(bouncing) - As we mentioned earlier, particle systems can be used for more than water. Lots of other effects can be created with them. Like fireworks, for example. (explosions) To see how that works, let's start by launching a few particles under the influence of gravity. When they reach the top of their arc, they explode to create other particles. We'll call these child particles. You can vary the strength of gravity using this slider. A large value keeps the particles from rising very high, and a small value causes particles to fly off the screen. Notice that the child particles disappear after a short time. This is called their lifetime. We can vary the lifetime using this slider. Let's also increase the number of child particles that get created. To create something more believable, let's add some randomness. For instance, let's add some random variation to the speed of the child particles. That's better. Let's also add some variation to the angle at which the initial particles get launched. Awesome. See what kind of fireworks display you can create in the next exercise. (explosions) (whistling) And in the next lesson, we'll look more closely at the physics underlying the ping pong ball simulator, which you'll need to understand if you want to code up your own simulator from scratch. (explosion)