Which algorithm does Marlin use to create arcs?
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.