- Home /

# Given a point, a "radius" and an arc, how do I find the resulting point?

Like this diagram here

What is the value of X and Y? Even if someone just knows generally mathematically how to do it.

**Answer** by Eno-Khaon
·
Nov 18, 2017 at 11:47 AM

When you already know the center point for the rotation as well as the angle, this is a simple and straightforward transformation to apply.

Fundamentally, the calculations are based on a 2-Dimensional, **2x2 rotation matrix**.

```
// Where "T" is the rotation value theta, or θ
┌ ┐
|cos(T) -sin(T)|
|sin(T) cos(T) |
└ ┘
```

When you apply this to a given value, it will look something like this:

```
// C#
public static Vector2 RotatePoint(Vector2 inputPoint, Vector2 center, float degrees)
{
// First, convert degrees to radians
float radians = degrees * Mathf.Deg2Rad;
// Then, create the output
Vector2 outputPoint = inputPoint;
// Next, shift the input based on the center of rotation
Vector2 shiftedPoint = inputPoint - center;
// Finally, apply the values from the matrix to the X and Y
outputPoint.x = center.x + (shiftedPoint.x * Mathf.Cos(radians) - shiftedPoint.y * Mathf.Sin(radians));
outputPoint.y = center.y + (shiftedPoint.y * Mathf.Cos(radians) + shiftedPoint.x * Mathf.Sin(radians));
return outputPoint;
}
```

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.