CHAPTER 10

Effects: Physics and Particles

Particles are capable of creating some eye-catching animations that produce vibrant and fluid effects. Physics engines, on the other hand, create animations that satisfy our sense of motion. Combining these two excellent effects offers the best of both worlds, and this chapter explores two examples of intertwining physics with particles.

Particles as Bodies

In Chapter 6 I used the open source physics engine Phys2D to implement a number of physics-based examples in JavaFX. This chapter will continue to use Phys2D because it provides so much functionality.

As you'll recall from Chapter 6, an object in a physics simulation is called a body. This first example explores how to implement a particle system ...

Get JavaFX™ Special Effects: Taking Java™ RIA to the Extreme with Animation, Multimedia, and Game Elements now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.