# 2D Rotation Calculator

❤️ 2D Rotation Calculator

📕 Contents

The 2D rotation calculator is a useful tool for those studying geometry or for those who need to calculate the new coordinates of a point after it has been rotated by a certain angle around the origin. This could be useful in various fields, including computer graphics, robotics, or any other field that involves the manipulation of geometrical shapes.

## How it works

The calculator uses the principles of 2D geometric transformations, specifically the rotation transformation, to calculate the new coordinates. When a point is rotated around the origin in a 2D plane, the x and y coordinates of the point change according to the rotation angle.

The formulae used for this calculation are as follows:

• Xnew = X * cos(angle) - Y * sin(angle)
• Ynew = X * sin(angle) + Y * cos(angle)

where Xnew and Ynew are the new coordinates, X and Y are the original coordinates, and angle is the angle of rotation. The angle needs to be in radians for the calculations, so if you're providing it in degrees, make sure to convert it to radians first.

## How to use the calculator

To use the calculator, simply input the original X and Y coordinates and the rotation angle (in degrees) into the appropriate fields. Once all the fields are filled, click the "Calculate" button. If all inputs are valid, the calculator will display the new coordinates after rotation.

The calculator ensures that all fields are filled and the angle is within the acceptable range of 0-360 degrees. If the inputs are not valid, an error message is displayed and the calculation is not performed.