What just happened?

We declared a sequential animation group consisting of three animations, each taking one-third of the day length. The first member of the group makes the sun go up. The second member, which is an instance of a new element type—PauseAnimation—introduces a delay equal to its duration. This, in turn, lets the third component start its work in the afternoon to pull the sun down toward the horizon.

The problem with such a declaration is that the sun moves in a horribly angular way, as can be seen in the image.

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.