Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Dynamic increasing of image scale within each trial

Hi All,
I am really really new in opensesame, and i am trying to not be biased by my previous knowledge about experimental software, but it is hard.
here is my problem. I am trying to run a kind of BART experiment, in which the the balloon inflates at random speed without key pressing. So i need to dinamycally increase the scale of the image within each trial.
Any suggestion?

Thank you!

Comments

  • Hi,

    Simple inline_scipt example:

    cv = canvas() # create a canvas
    kb = keyboard(timeout = 2) # create a keyboard
    
    start_r = 10 # initial radius
    rate = 100 # rate of increase
    
    cv.circle(0,0,start_r, fill =True) # draw a balloon
    t0 = clock.time() # starting time
    while True: 
        cv.show() # show the canvas
        k,t = kb.get_key() # stop loop with keypress
        if k != None:
            break
        if (t-t0) >  rate: 
            r += 2
            cv.clear() # wipe the canvas
            cv.circle(0,0,start_r, fill =True) # draw a balloon
            t0= clock.time() # reset timer
    

    Does this make sense?

    Eduard

    Buy Me A Coffee

  • It does if i draw the baloon, but I have to use an image, so basically I have to dinamically zoom in or out the image, using different speed rates.

  • Hi eduard,
    I have tried to use canvans.image function, but it still doesn't work for me since the canvas. image do not allowed to present any other stimuli in the meanwhile.
    So I am trying in this way, I create a sketchpad with all the images that i want to present at the same moment, and then I set the scale of the balloon image as a variable , balloon_size.
    The problem is that the var. balloon_size now is a fixed number (i.e. a number that doesn't change its value with time), there is any way to define var. balloon_size Value as a function of time? Exactly like you did in your example for radius? Like for example increase rate of 0.5 every 100 ms?

    Thank you

  • Hi Eris,

    If you have the scale variable defined in your looptable you, can access it in the sketchpad with [scale].

    However, I still strongly recommend you implement that problem in an inline_script, simply because to make it work with sketchpads it is more difficult to get the experience exactly like you want it.

    I have tried to use canvans.image function, but it still doesn't work for me since the canvas. image do not allowed to present any other stimuli in the meanwhile.

    That isn't true. You can draw multiple images on to the canvas. As long as the bigger one doesn't cover the smaller, you should be able to see all of them. If you give me a few example images and a detailed description of how the stimuli should look like, I can make a quick example for you.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games