Random Position Generator
I have a grid of 100 images with specific x,y coordinates. I need to offset each image independently by a random amount between 0 and 50. What is the best way to go about this?
I have a grid of 100 images with specific x,y coordinates. I need to offset each image independently by a random amount between 0 and 50. What is the best way to go about this?
Comments
Hi,
First part of the code makes a 10x10 grid of x,y positions. The second part draws circle on those positions.
Hi Eduard, thank you so much, this definitely helps! Instead of drawing circles, what is the best way to achieve this using pictures in the library. I have multiple pictures to use and a target that is sometimes present, sometimes absent.
Hi,
Does this part of the documentation help:
https://osdoc.cogsci.nl/3.2/manual/python/canvas/#function-canvas46image40fname-centertrue-xnone-ynone-scalenone-rotationnone41
Conceptually, using circles and images are handled the same way.
Best,
Eduard