I'm trying to figure out how I could be able to calculate coordinates on a circle. For simplicity I made some images.

That's the start with information I have. Now I need to calculate the new coordinates when for example the circle would turn 90 degrees to the right. Just like the next image:

I need to calculate the coordinates of the new red dot. (I also need this with different degrees such as 20 degrees).
To do this my plan was to do the following:
- Calculate the distance between the two points
- Calculate the degree between the north (up) and the given point
- Calculate the new location with the degree (from a step back) + the degrees it needs to turn (in the images 90 degrees).
My first step is:
distance = Math.sqrt((point1.x-point2.x)*(point1.x-point2.x) + (point1.y-point2.y)*(point1.y-point2.y))
The part to calculate the new degrees is:
double theta = Math.atan2(targetPt.y - centerPt.y, targetPt.x - centerPt.x);
theta += Math.PI/2.0;
And the last part to calculate the new location would be:
double x = mMiddleView.getX() + distance * Math.cos(Math.toRadians(theta));
double y = mMiddleView.getY() + distance * Math.sin(Math.toRadians(theta));
However when I do these calculations with for example 0 degrees it still returns another value than the original coordinates.
Any help would be appreciated!
Edit for Philipp Jahoda:
My values are:
distance +- 70, currentDegree = 0.
PointF point = new PointF((float)mMiddleView.getX(), (float)mMiddleView.getY());
PointF point2 = getPosition(point, (float) distance, currentDegree);
and my results are:
center: PointF(490.0, 728.0) radius: 78.0 angle: 0.0
new point: PointF(568.0, 728.0)
As you can see, the degree is 0 so the point is not supposed to turn. It should keep the 490, 728 coordinates but it does not keep those.

xandythe same. Be careful thatxis increasing rightward whileyis increasing downward so yourtargetPt.y - centerPt.ypart should be the opposite among other things - Eyprostheta += Math.PI/2.0;that this part rotates towards the opposite direction of that in your picture. Usetheta -= Math.PI/2.0;instead - Eypros