Welcome! Log In Create A New Profile

Advanced

RandomDotMotion in square region

Posted by younesvalibeigi 
RandomDotMotion in square region
March 19, 2023 11:36AM
Is it possible to constrain the display of RandomDotMotion to a square region rather than a circular region? This question is not regarding the appearance of the dots themselves, but rather the area in which they are displayed.
Re: RandomDotMotion in square region
April 06, 2023 10:37AM
I have come up with a rather clumsy method: use the zorder to cover the front of the dots with an image with a square hole
Re: RandomDotMotion in square region
April 06, 2023 11:11AM
One problem of that approach is that you cannot control the number of dots displayed in each frame. It is better just to draw in a square from the beginning.

-----

If you download the package again, you will see a new adapter that does this, although I am not sure how useful it will be.
https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#RectangularRDM

Regarding to how to use it, see the 'task\runtime v2\8 random dot motion' example. The code is updated for the demonstration.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.