jspsych/plugins/jspsych-rdk.js
//Calculate a random x and y coordinate in the ellipse

Calculate a random x and y coordinate in the ellipse
Calculate a random x and y coordinate in the ellipse
function resetLocation(dot) {
			if (apertureType == 1 || apertureType == 2) {
				var phi = randomNumberBetween(-Math.PI, Math.PI);
				var rho = Math.random();
				x = Math.sqrt(rho) * Math.cos(phi);
				y = Math.sqrt(rho) * Math.sin(phi);
				x = x * horizontalAxis + apertureCenterX;
				y = y * verticalAxis + apertureCenterY;
				dot.x = x;
				dot.y = y;
			}
			else if (apertureType == 3 || apertureType == 4) {
				dot.x = randomNumberBetween((apertureCenterX) - horizontalAxis, (apertureCenterX) + horizontalAxis); 
				dot.y = randomNumberBetween((apertureCenterY) - verticalAxis, (apertureCenterY) + verticalAxis); 
			}
			return dot;
		}
function resetLocation ( dot ) { if ( apertureType == 1 || apertureType == 2 ) { var phi = randomNumberBetween ( - Math . PI , Math . PI ) ; var rho = Math . random ( ) ; x = Math . sqrt ( rho ) * Math . cos ( phi ) ; y = Math . sqrt ( rho ) * Math . sin ( phi ) ; x = x * horizontalAxis + apertureCenterX ; y = y * verticalAxis + apertureCenterY ; dot . x = x ; dot . y = y ; } else if ( apertureType == 3 || apertureType == 4 ) { dot . x = randomNumberBetween ( ( apertureCenterX ) - horizontalAxis , ( apertureCenterX ) + horizontalAxis ) ; dot . y = randomNumberBetween ( ( apertureCenterY ) - verticalAxis , ( apertureCenterY ) + verticalAxis ) ; } return dot ; }
Calculate a random x and y coordinate in the ellipse
Calculate a random x and y coordinate in the ellipse
//For circle and ellipse
 //For square and rectangle
 //Between the left and right edges of the square / rectangle
 //Between the top and bottom edges of the square / rectangle
