Optical Illusion

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: January 26, 2024

Last Modified: January 10, 2025 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements Millisecond's version of a computerized Visual Illusion Simulator (VIS) inspired by Bednarek et al (2024).

The script provides the functionality to run several visual illusion tasks: - Ebbinghaus Visual Illusion (opticalillusion_ebbinghaus.iqjs) - Delboeuf Visual Illusion (opticalillusion_delboeuf.iqjs) - Mueller-Lyer Visual Illusion (opticalillusion_muellerlyer.iqjs) - Ponzo Visual Illusion (opticalillusion_ponzos.iqjs) - Poggendorff Visual Illusion (opticalillusion_poggendorff.iqjs) - T-Illusion (opticalillusion_tillusion.iqjs) - Horizontal-Vertical Illusion (opticalillusion_horizontalvertical.iqjs) - Zoellner Visual Illusion (opticalillusion_zoellner.iqjs) (the individual tasks can be fine-tuned via changes in their respective scripts)

Due to the fact that screens vary wildly in absolute sizes and pixel sizes, this script provides the functionality to run the illusion tasks with absolute sizing. The default setup uses proportional sizing. See section default for more info.

References

Bednarek, H., Przedniczek, M., Wujcik, R., Olszewska, J. M., & Orzechowski, J. (2024). Cognitive training based on human-computer interaction and susceptibility to visual illusions. Reduction of the Ponzo effect through working memory training. International Journal of Human-Computer Studies, 184, 103226-. https://doi.org/10.1016/j.ijhcs.2024.103226

Duration

1 minutes

Description

Ebbinghaus Visual Illusion
•Task: Participant see a BASELINE setup (one center circle surrounded by 6 satellite circles) on the LEFT side of the screen and a TARGET setup (one center circle surrounded by 6 satellite circles) on the RIGHT side of the screen. The task is to match the size of the TARGET (center circle on the right) to the BASELINE (center circle on the left) via "right arrow key" (increase in size) and "left arrow key" (decrease in size) buttons. Once the sizes are matched, participants are asked to press the ENTER key.

-> code to fine-tune this task can be found here: opticalillusion_ebbinghaus.iqjs

Delboeuf Visual Illusion
•Task: Participant see a BASELINE setup (one center circle embedded in a bigger circle) on the LEFT side of the screen and a TARGET setup (one center circle embedded in a bigger circle) on the RIGHT side of the screen. The task is to match the size of the TARGET (center circle on the right) to the BASELINE (center circle on the left) via "RIGHT arrow key" (increase in size) and "Left arrow key" (decrease in size) buttons. Once the sizes are matched, participants are asked to press the [ENTER] key.

-> code to fine-tune this task can be found here: opticalillusion_delboeuf.iqjs

Mueller-Lyer Visual Illusion
•Task: Participant see a BASELINE setup ( >----------<) on the top and a TARGET setup (<---------->) on the bottom. The task is to match the length of the TARGET line to the BASELINE line via "RIGHT arrow key" (increase in size) and "Left arrow key" (decrease in size) buttons. Once the sizes are matched, participants are asked to press the [ENTER] key.

-> code to fine-tune this task can be found here: opticalillusion_muellerlyer.iqjs

Ponzo Visual Illusion
Participant see two non-parallel, vertical track lines in the middle of the screen that seemingly converge at the top. In between those track lines, participants see two horizontal lines. The line closer to the track convergence point (= the narrow part of the track) point is the BASELINE (= the Top line). The line on the bottom is the TARGET (Target is closer to the wider part of the track). The task is to match the length of the TARGET line to the BASELINE line via "RIGHT arrow key" (increase in size) and "Left arrow key" (decrease in size) buttons. Once the sizes are matched, participants are asked to press the [ENTER] key.

-> code to fine-tune this task can be found here: opticalillusion_ponzo.iqjs

Poggendorff Visual Illusion
•Task: Participant see two parallel, vertical track lines in the middle of the screen. On the left side of the track display a BASELINE line intersects the track display but seems to 'vanish' behind the tracks. On the right side of the track display a TARGET line 'continues' the BASELINE but is not positioned in the correct vertical spot on the right track. The task is to adjust the vertical position of the TARGET line so that it correctly continues the BASELINE line via "RIGHT arrow key" (move up) and "Left arrow key" (move down) buttons. Once the lines are matched, participants are asked to press the [ENTER] key.

-> code for this task can be found here: opticalillusion_poggendorff.iqjs

T-Illusion
•Task: Participant see two lines arranged in an inverted T. The horizontal line is the BASELINE. The vertical line is the TARGET. The task is to match the length of the vertical TARGET line to the horizontal BASELINE line via "RIGHT arrow key" (increase in size) and "Left arrow key" (decrease in size) buttons. Once the sizes are matched, participants are asked to press the [ENTER] key.

-> code for this task can be found here: opticalillusion_tillusion.iqjs

Horizontal-Vertical-Illusion
•Task: Participant see two lines arranged in a mirrored L. The horizontal line is the BASELINE. The vertical line is the TARGET. The task is to match the length of the vertical TARGET line to the horizontal BASELINE line via "RIGHT arrow key" (increase in size) and "Left arrow key" (decrease in size) buttons. Once the sizes are matched, participants are asked to press the [ENTER] key.

-> code for this task can be found here: opticalillusion_horizontalvertical.iqjs

Zoellner-Illusion
•Task: Participant see 5 lines in the middle of the screen. The second and fourth line are two parallel horizontal-ish BASELINES that may be slightly tilted. Each baseline is crossed with short, repeating lines (these crossing lines are the same for each baseline).

In between and on top and bottom of the two baselines, there are three TARGET lines. The Target lines are crossed with short, repeating lines that are orthogonal to the crossing lines of the baselines. The target lines are parallel to each other BUT are NOT parallel to the baselines. The task is to match the rotation of the TARGET lines to the rotation of the BASELINE lines (aka make all lines parallel) via "RIGHT arrow key" and "Left arrow key" buttons. Once the rotation angles are matched, participants are asked to press the [ENTER] key.

Procedure

By default, the script runs the following illusion in random order:
- Ebbinghaus Visual Illusion
- Delboeuf Visual Illusion
- Mueller-Lyer Visual Illusion
- Ponzo Visual Illusion
- Poggendorff Visual Illusion
- T-Illusion
- Horizontal-Vertical Visual Illusion
- Zoellner Visual Illusion
IMPORTANT each illusion task can be skipped via Editable Parameters settings.

General Set-Up:
For each illusion participants are asked to adapt a TARGET to a BASELINE via button presses
(a '+' and '-' button as well as an 'submit' button).

● Number of Trials:
The number of trials run is determined by parameters.numberOfRoundsPerIllusion (see below in this script).
By default, each illusion runs 2 rounds.

● TARGET Start Size:
The target start sizes can be fixed or randomly determined by the script. This is controlled by
parameters.runFixedStartSizesOfTargets (see below in this script).
The individual start sizes are set in each of the individual illusion scripts.
Currently all illusion scripts run with fixed start sizes that either increase the goal by 25% or
decrease the goal by 25%.

If parameters.runFixedStartSizesOfTargets = false
the target start size is randomly determined to be between a min/max percent of the baseline Size
(Script automatically ensures that the selected target size is less than 85% OR greater than
115% of the baseline size - see individual illusion scripts for specific settings)

● Pixel Units:
All sizes (baseline/target) are calculated/displayed in ROUNDED screen pixels and adjustments are made
by increments/decrements of 1 pixel.
Zoellner Illusion Task operates slightly different as the target unit are rotation angles

Stimuli

provided by Millisecond - can be edited under section 'Editable Stimuli'

Instructions

provided by Millisecond - can be edited under section 'Editable Instructions'

Summary Data

File Name: opticalillusion_summary*.iqdat

Data Fields

NameDescription
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
Summary Data For Individual Visual Illusions (Example: Ebbinghaus Illusion)
runEbbinghausIllusion Parameter setting
true (1) = The script ran the Ebbinghaus Illusion Task
false (0) = The script skipped the Ebbinghaus Illusion Task
roundCounterEbbinghausIllusion The rounds run for the Ebbinghaus Illusion Task
meanEbbinghausError The mean error across all trials run
stdEbbinghausError The standard deviation of the propErrors across all trials run

Raw Data

File Name: opticalillusion_raw*.iqdat

Data Fields

NameDescription
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
response The response of participant during current trial
correct Correctness of response (1 = correct, 0 = error)
latency Response latency (in ms)
Custom Variables
illusion The name of the current illusion task
stepSizeInPX The step size adjustment in screen pixels
roundCounter Tracks the rounds run for the current illusion task
baselineSizeInMM The BASELINE size (radius, length etc) in canvas mm (nature of baseline depends on task run)
baselineSizeInPX The BASELINE size (radius, length etc) in canvas pixels (nature of baseline depends on task run)
for Zoellner Illusion
Zoellner "Sizes" are rotation angles of the baselines
targetStartSizeInMM The start TARGET size (radius, length etc) in canvas mm at beginning of round (nature of target depends on task run)
targetStartSizeInPX The start TARGET size (radius, length etc) in canvas pixels at beginning of round (nature of target depends on task run)
targetSizeInPX The current TARGET size (radius, length etc) in canvas pixels
for Zoellner Illusion
Zoellner "Sizes" are rotation angles of the target lines
error Sets the TARGET size (in px) relative to BASELINE size (in px)
- error Prop < 1 the size was underestimated
- error Prop > 1 the size overestimated
for Zoellner Illusion
error is the simple absolute DIFFERENCE in rotation angles of the Baselines and the Target lines

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Color Parameter
canvasColor Display color of the actively used portion of the screen (the 'canvas')
if set to a color other than the screenColor, the active canvas
appears 'anchored' on the screen regardless of monitor size
white
screenColor Color of the screen not used by the canvas ('inactive screen')white
defaultTextColor Default color of text items presented on active canvasblack
Design
stepSizeInPX Sets the adjusting stepsize in pixels
all baseline/target sizes and values are calculated in rounded screen pixels
1
runFixedStartSizesOfTargets True = start sizes of targets will be fixed
you have to set the start sizes within the individual illusion scripts
false = start sizes are determined randomly using the boundary parameters
specified in each illusion script
true
numberOfRoundsPerIllusion Number of rounds to run per Illusion task
You can set the specific values for each trial in each
of the individual illusion scripts
2
runEbbinghausIllusion True = The script runs the Ebbinghaus Illusion task
individual settings for this task can be changed in
script file "opticalillusion_ebbinghaus_inc.iqjs"
false = The script skips the Ebbinghaus Illusion task
true
runDelboeufIllusion True = The script runs the Delboeuf Illusion task
individual settings for this task can be changed in
script file "opticalillusion_delboeuf_inc.iqjs"
false = The script skips the Delboeuf Illusion task
true
runMuellerlyerIllusion True = The script runs the Muellerlyer Illusion task
individual settings for this task can be changed in
script file "opticalillusion_muellerlyer_inc.iqjs"
false = The script skips the Muellerlyer Illusion task
true
runPonzoIllusion True = The script runs the Ponzo Illusion task
individual settings for this task can be changed in
script file "opticalillusion_ponzo_inc.iqjs"
false = The script skips the Ponzo Illusion task
true
runPoggendorffIllusion True = The script runs the Poggendorff Illusion task
individual settings for this task can be changed in
script file "opticalillusion_poggendorff_inc.iqjs"
false = The script skips the Poggendorff Illusion task
true
runTilIllusion True = The script runs the T-Illusion task
individual settings for this task can be changed in
script file "opticalillusion_tillusion_inc.iqjs"
false = The script skips the T-Illusion task
true
runHorizontalVerticalIllusion True = The script runs the HorizontalVertical-Illusion task
individual settings for this task can be changed in
script file "opticalillusion_horizontalvertical_inc.iqjs"
false = The script skips the HorizontalVertical-Illusion task
true
runZoellnerIllusion True = The script runs the Zoellner Illusion task
individual settings for this task can be changed in
script file "opticalillusion_zoellner_inc.iqjs"
false = The script skips the Zoellner Illusion task
true
Timing Parameters
itiMS The intertrial interval in ms (= duration of blank canvas in between rounds)500
automaticAdjustmentIntervalMS The duration (in ms) of the automatic adjustment interval if a finger does not lift off the arrow keys150
responseKeyReminderDelayMS The delay which which the responseKeyReminder is provided if no response is detected10000