src/GraphicsObjects/Arcball.java
public Vector4f  screenToPoint(int x, int y, int windowWidth, int windowHeight)
    		{
   	float retX,retY,s;
   	float radius =  (float) min(windowWidth,windowHeight)/2.0f;
   	
   	
   	
   	retX = (x-(windowWidth/2.0f))/radius; 
   	retY =  ((y-(windowHeight/2.0f))/radius);
   	
   	float r = (retX*retX)+(retY*retY);
   	float srR=(float) Math.sqrt(r);
   	
   	if(r>=1.0f){
   		s=1.0f/srR;
           return new Vector4f(s*retX,s*retY,0.0f,0.0f);
   	}else{
           return new Vector4f(retX, retY, (float)Math.sqrt(1.0f-r) ,0.0f);
   	}
   }
/*
    *		Converts screen coordinates to a point on a unit sphere
    *		needs to be modified based on what click coordinate system is being used
    */
Converts screen coordinates to a point on a unit sphere
needs to be modified based on what click coordinate system is being used
Converts screen coordinates to a point on a unit sphere needs to be modified based on what click coordinate system is being used
public Vector4f  screenToPoint(int x, int y, int windowWidth, int windowHeight)
    		{
   	float retX,retY,s;
   	float radius =  (float) min(windowWidth,windowHeight)/2.0f;
   	retX = (x-(windowWidth/2.0f))/radius; 
   	retY =  ((y-(windowHeight/2.0f))/radius);
   	float r = (retX*retX)+(retY*retY);
   	float srR=(float) Math.sqrt(r);
   	if(r>=1.0f){
   		s=1.0f/srR;
           return new Vector4f(s*retX,s*retY,0.0f,0.0f);
   	}else{
           return new Vector4f(retX, retY, (float)Math.sqrt(1.0f-r) ,0.0f);
   	}
   }
public Vector4f screenToPoint ( int x , int y , int windowWidth , int windowHeight ) { float retX , retY , s ; float radius = ( float ) min ( windowWidth , windowHeight ) / 2.0f ; retX = ( x - ( windowWidth / 2.0f ) ) / radius ; retY = ( ( y - ( windowHeight / 2.0f ) ) / radius ) ; float r = ( retX * retX ) + ( retY * retY ) ; float srR = ( float ) Math . sqrt ( r ) ; if ( r >= 1.0f ) { s = 1.0f / srR ; return new Vector4f ( s * retX , s * retY , 0.0f , 0.0f ) ; } else { return new Vector4f ( retX , retY , ( float ) Math . sqrt ( 1.0f - r ) , 0.0f ) ; } }
Converts screen coordinates to a point on a unit sphere
           needs to be modified based on what click coordinate system is being used
Converts screen coordinates to a point on a unit sphere needs to be modified based on what click coordinate system is being used