Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If you want to do a lot of math—and some tricky calculations—you can create a lot of movements with the animation style explained in the previous section. However, if you really want to do some complex animation, such as moving an object around the screen in a curving motion, you will want to use path animation, which is another method that JavaFX has for creating animation that allows you to move an object around a predefined path. In this section you learn how to create a path using knowledge you picked up in previous chapters. You then use this path to animate the butterfly.
The concept here is that you can create a path using lines, arcs, and points. JavaFX will then animate your image moving along this path.