Reality Bending Lab › News › Pyllusion has been published
Pyllusion has been published
Pyllusion is a package for Python that implements a systematic way to manipulate and generate illusions using a set of parameters.
For instance, the famous Müller-Lyer illusion, which causes the observer to perceive the 2 segments as being different lengths depending on the shape of the arrows, can be generated with the following lines of code:
mullerlyer = pyllusion.MullerLyer(illusion_strength=30)
mullerlyer.to_image()
To understand more about the parametric approach being implemented in the Pyllusion package, we recommend reading our paper, which includes a hands-on example on how to generate some classic illusions (such as the Delboeuf Illusion), and discusses how Pyllusion contributes to addressing conceptual and methodological issues in illusion science.
import pyllusion
delboeuf = pyllusion.Delboeuf(illusion_strength=3)
delboeuf.to_image()
Don't forget to keep a look out for our repo for more exciting open-source projects!