How to create a (rotating) diamond?

Hello,

I need to display a simple diamond shape that will rotate on itself during the trial.
I get the shape that I need by using a “custom polygon” and specifying the vertices computed by these lines:

nVerts = 4
four_sqz_verts = np.zeros((nVerts,2))
for vert_num in np.arange(0,four_sqz_verts.shape[0]):
    main_radius = 1
    if vert_num % 2 == 0:
        main_radius = main_radius*1.2
    else:
        main_radius = main_radius*.8 
    four_sqz_verts[vert_num, 0] = main_radius*np.sin(np.deg2rad(360/nVerts * vert_num))
    four_sqz_verts[vert_num,1] = main_radius*np.cos(np.deg2rad(360/nVerts * vert_num))

However I do not manage to properly control the size of this stimulus. If I set main_radius = desired_size/2 I do not obtain the size that I would expect (I work with degrees). And I do not manage to find any other way to obtain a proper control of the size.

Would you guys know one? Or would you know any other way to obtain a rotating diamond?

Note that using a square shape and “squeezing” it my setting a higher height than width does not work: when the square rotates the diamond shape gets distorted.

Thank you so much for your advices!

Giulia