This example reproduces the classic Kanizsa square illusion: four “pacman” disks on a uniform background with a central square mask that induces the perception of an illusory contour.
From the repository root:
cd examples/kanizsa-square
go run . -d
-d
Developer mode (windowed 800×600 instead of exclusive fullscreen).
-s int
Subject ID (not used for data here; kept for API consistency).
-r float
Radius of the inducing circles in pixels.
Default: 50.
-w float
Size (width and height) of the central square in pixels.
Default: 200.
Example:
go run . -d -r 60 -w 250
control.NewExperiment).w.w × w."Kanizsa illusory square – press any key to exit") shown below the figure.