I am trying to create a task that uses a circle to mimic a breathing pacer. So a circle that slowly grows bigger in size (inflation) and then slowly shrinks in size (deflation). I am hoping to modify the rate of this rhythm.

At the moment, I am using this equation in the coder:
inflate = P*sin((1/M)*t)

“Inflate” is the name I have given the circle
P = size of the circle
N = time to get to maximum circle size

If I use this equation; inflate = 20*sin((1/2)*t); it produces an inflation rate of 6.2 seconds and deflation rate of 6.2 seconds.

However, I am trying to get the inflation and deflation rate to differ. For example, inflation for 4 seconds and deflation for 6 seconds.

I have been using this website to try and figure out the best way to code for this: Skewed Sinusoid

There is an example in the PsychoPy textbook that uses a sin function raised to the 4th power to create the sort of temporal asymmetry that makes a stimulus look like a beating heart (this link should hopefully take you directly to page 83):