Our formula is e^(gaussianInput^2/-.18) where the gaussianInput is the polar degrees from 0 to pi where pi/2 is 0, 0 is 1, and pi is -1.
I'm putting the code below, in case what I've typed doesn't make sense, here's the code:
Code:
centerCurrent = xAxis;
double gaussianInput=angleToGaussianInput(Math.atan2(yAxis, xAxis));
leftCurrent =gaussianConversion(gaussianInput)+rotate;
rightCurrent=leftCurrent-2*rotate;
private double gaussianConversion(double gaussianInput) {
return Math.exp(Math.pow(gaussianInput, 2)/(-.18));
}
private double angleToGaussianInput(double rad) {
if(rad>Math.PI)
rad-=Math.PI;
return (rad-Math.PI/2.0)/(Math.PI/2.0);
}