Imagination has received a great deal of attention in different fields such as psychology, philosophy and the cognitive sciences, in which some works provide a detailed account of the mechanisms involved in the creation and elaboration of imaginary worlds. Although imagination has also been formalized using different logical systems, none of them captures those dynamic mechanisms. In this work, we take inspiration from the Common Frame for Imagination Acts, that identifies the different processes involved in the creation of imaginary worlds, and we use it to define a dynamic formal system called the Logic of Imagination Acts. We build our logic by using a possible-worlds semantics, together with a new set of static and dynamic modal operators. The role of the new dynamic operators is to call different algorithms that encode how the formal model is expanded in order to capture the different mechanisms involved in the creation and development of imaginary worlds. We provide the definitions of the language, the semantics and the algorithms, together with an example that shows how the model is expanded. By the end, we discuss some interesting features of our system, and we point out to possible lines of future work.