Millisecond Forums

coordinate structure for multiple images and resolutions

https://forums.millisecond.com/Topic22574.aspx

By Brabagazaa - 9/25/2017

Hello everyone,

Am currently working on a task that presents multiple items in a circle around the center of the screen.  Each individual item has its own (x, y) coordinate, however, these have to change depending on the resolution. At the moment I am simply generating full lists of coordinates, and plan to select a list based on user input which will be used throughout the experiment, but this does mean that I can only provide coordinates for predetermined resolutions, is there an easier way to scale the coordinates? any advice is appreciated,
Roelof
PS: programming in inquisit 4

By Dave - 9/25/2017

Brabagazaa - Monday, September 25, 2017
Hello everyone,

Am currently working on a task that presents multiple items in a circle around the center of the screen.  Each individual item has its own (x, y) coordinate, however, these have to change depending on the resolution. At the moment I am simply generating full lists of coordinates, and plan to select a list based on user input which will be used throughout the experiment, but this does mean that I can only provide coordinates for predetermined resolutions, is there an easier way to scale the coordinates? any advice is appreciated,
Roelof
PS: programming in inquisit 4


Sure. You can prompt the user for information and calculate positions and/or sizes accordingly. See e.g. https://www.millisecond.com/forums/Topic14608.aspx and/or the Spatial Delayed Response Task for an implementation of such an approach: https://www.millisecond.com/download/library/spatialdelayedresponsetask/

Note that this is usually only necessary if you require sizes and/or positions to have specific physical dimensions. Otherwise, you should simply specify the positions and and sizes in percentages and then restrict the screen area (the "canvas") Inquisit uses to a fixed aspect ratio via the <defaults> element's /canvasaspectratio attribute. That way, you don't have to worry about different resolutions and/or aspect ratios across devices.
By Brabagazaa - 9/25/2017

Dave - Monday, September 25, 2017
Brabagazaa - Monday, September 25, 2017
Hello everyone,

Am currently working on a task that presents multiple items in a circle around the center of the screen.  Each individual item has its own (x, y) coordinate, however, these have to change depending on the resolution. At the moment I am simply generating full lists of coordinates, and plan to select a list based on user input which will be used throughout the experiment, but this does mean that I can only provide coordinates for predetermined resolutions, is there an easier way to scale the coordinates? any advice is appreciated,
Roelof
PS: programming in inquisit 4


Sure. You can prompt the user for information and calculate positions and/or sizes accordingly. See e.g. https://www.millisecond.com/forums/Topic14608.aspx and/or the Spatial Delayed Response Task for an implementation of such an approach: https://www.millisecond.com/download/library/spatialdelayedresponsetask/

Note that this is usually only necessary if you require sizes and/or positions to have specific physical dimensions. Otherwise, you should simply specify the positions and and sizes in percentages and then restrict the screen area (the "canvas") Inquisit uses to a fixed aspect ratio via the <defaults> element's /canvasaspectratio attribute. That way, you don't have to worry about different resolutions and/or aspect ratios across devices.

That is perfect, I was using '/windowaspectratio = (1,1)' which meant full screen was lost,
but indeed canvasratio works perfectly, thank you very much