Hello,
I am presenting 2 images side by side, but they appear tilted, without any explicit command from me. Please help me solve this issue -
Code as typed ----
%image size setup
cmtopixratio = 1280/37.478; % horizontal resolution/horizontal display size in cm
disFromScreen = 60cmtopixratio;
imageAspectRatio = 1;
VisualAngle = 10pi / 180;
Eccentricity = 0.75pi / 180;
horizontalVisualAngle = VisualAngleimageAspectRatio;
verticalHalfLength = disFromScreentan(VisualAngle/2);
horizontalHalfLength = disFromScreentan(VisualAngle/2);
horizontalGap = disFromScreen * tan(Eccentricity);
h1 = floor(xCenter-0.75horizontalHalfLength);
h2 = floor(xCenter+0.75horizontalHalfLength);
v1 = floor(yCenter-0.75verticalHalfLength);
v2 = floor(yCenter+0.75verticalHalfLength);
%image presentation
image = [image1 image2]; %vector of texture pointers
rect1 = CenterRectOnPointd([h1 v1 h2 v2], xCenter-(h2-h1)*0.75, yCenter)’;
rect2 = CenterRectOnPointd([h1 v1 h2 v2], xCenter+(h2-h1)*0.75, yCenter)’;
rect = [rect1 rect2];
Screen(‘DrawTextures’, window, image,[],rect,1);
tstart = Screen(‘Flip’, window);