Single moving dot stimulus

253 views
Skip to first unread message

Adele Hogan

unread,
Mar 5, 2014, 12:41:59 AM3/5/14
to psychop...@googlegroups.com, hoga...@myvuw.ac.nz
I need to create a single dot/ circle that moves horizontally in a smooth, straight line of motion. At the moment I have added about 20 separate polygon stimuli that last for about 0.107s each, but this makes the movement very jerky (it looks like lots of briefly presented different circles moving slightly to the right each time, rather than one stimulus. Can anyone help me? Am very new to builder/coder and have looked up previous topics relating to my question, but haven't been able to understand the code/ been able to get it to work on Psychopy.

Michael MacAskill

unread,
Mar 5, 2014, 6:20:23 PM3/5/14
to psychop...@googlegroups.com
Dear Adele,

You only need to create a single stimulus, but update its position on every frame (i.e. screen refresh).

In the "Position" field, choose "set every frame" rather than "constant".

Then you get to play with some maths. For example, there is a variable called "t" which represents the time in seconds from the start of the trial. So for example, if you set the [x,y] position in that field to be:

[t*50, 0]

That would move the stimulus rightwards from the centre (which is [0,0]) at 50 pixels per second, but keep it vertically constant. (NB check the units at the bottom of your component: 50 looks very different in pixels compared to degrees or normalised units (which would probably be week off the edge of your screen), so choose values that match your units).

Keep playing with the formula until you get want you want (including using functions like cos(t) or sin(t) to get nice smooth oscillations).

Regards,

Michael

Adele Hogan

unread,
Mar 5, 2014, 7:18:51 PM3/5/14
to psychop...@googlegroups.com
That is fantastic, thank you so much Michael!
Reply all
Reply to author
Forward
0 new messages