I see at least two problems:
1. Math.cos() and Math.sin() expect angle inputs in radians, not degrees. By using this code:
double roll = MathUtilities.atan2(X, Z) * 180.0 / Math.PI;
you have converted roll
into degrees.
2. Secondly, you are subtracting the center coordinates from your vector coordinates. I believe you should be adding them, like this:
int newx1 = (int)(Math.cos( roll ) * (double)length) + xcenter;
int newy1 = (int)(Math.sin( roll ) * (double)length) + ycenter;