**the algorithm that Marlin uses for its G2/G3 commands**.

## 1 Answer

The algorithm is based on the "Vector rotation by transformation matrix", and this solution is based on a solution from Jens Geisler. The formula for clockwise rotation is:

More information about the vector rotation can be found on Wikipedia.