8/27/2023 0 Comments Random wheel spinner colour![]() ![]() # will better model friction and exponential decay in the real world # making speed a fraction or what it once was, rather than using a linear value # participants from being able to predict where the ball will stop. # Randomizing the the value of the deceleration will hopefully prevent # Reduce speed to be a percentage (99.5% - 96.5%) of its last value # Randomly select a value between 0.005 and 0.035 # If the participant has asked to stop the spinner # Continue spinning the ball around the wheel according to the specified speed # If the participant hasn't asked to stop the spinner yet # Change the position of the ball according to the current value of positionīall.pos = [((math.sin(position)/10) * (wheel_radius * 10)), Wheel = visual.RadialStim(win, pos=(0,0), size=((wheel_radius * 2), (wheel_radius * 2)),Ĭolor = 'red', angularCycles=6, radialCycles = 0, opacity= 0.8, autoLog=False) # wheel = visual.Circle(win, edges=300, radius=wheel_radius, fillColor='black', lineColor=None, pos=) # Noting whether the ball is deceleratingīall = visual.Circle(win, edges=100,radius=0.02, fillColor='white', lineColor=None, pos=) # Noting the starting position of the revolving ball # Specifying Window & Screen Information. ![]() # How many frames per second the animation should use # The radius of the wheel around which the ball is revolving # The speed with which the ball revolves around the wheel # Needed to calculcate the deceleration of the revolving ball # Needed to calculate the trajectory of the revolving ball Does anyone know for sure? If not, does anyone have another recommended solution to replacing it so that I could maybe get 3 or 4 colors modeled on this larger circle? Code: # Psychopy modulesįrom psychopy import core, event, visual, gui Looking through the documentation, I can’t see anything that helps, though, I did come across this old thread where Jon seems to suggest that it is possible, but I frankly can’t make heads or tails of it and I think the OP left it unresolved as well. I’d like to be able to place more than two colors on the wheel, but I’m not sure that it’s possible with visual.RadialStim. However, it evenly divides the wheel into alternating sections of color which is really helpful for my task. In order to model the roulette wheel (the larger circle), I used the visual.RadialStim component, knowing full-well that it’s probably better used for spinning checkboard type stuff. This task will revolve a small circle around a large circle and pressing space will initiate an exponential deceleration in the revolution velocity of the smaller circle. I’m trying to build a task that would basically replicate a roulette wheel and I’ve essentially done so.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |