Abstract
The Breathing square is an illusion of movement, therefore in this chapter for the first time we will program an animation. In it, a red square rotates but some parts may be hidden from view. As a consequence the rigid rotation of the square become hard to see and instead the object appears to deform. We will learn how to show an animation on screen, with every image updated every new frame. We set the frame rate to 60 frames per second. This will be done by reading the clock and then waiting without doing anything until the correct amount of time has elapsed (1/60 of a second).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this chapter
Cite this chapter
Bertamini, M. (2018). Breathing Square Illusion. In: Programming Visual Illusions for Everyone . Vision, Illusion and Perception, vol 2. Springer, Cham. https://doi.org/10.1007/978-3-319-64066-2_12
Download citation
DOI: https://doi.org/10.1007/978-3-319-64066-2_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-64065-5
Online ISBN: 978-3-319-64066-2
eBook Packages: EngineeringEngineering (R0)