A possible solution could look like this:
The trick here is that I pre-calculate the result at the beginning, and then simply remove the points that are above the current frame.
The positions of the Mesh Line are calculated in the same way as the transformation of the rotating line.
And here is another variation of the solution shown here, which is based on curves and reduces the duplicate nodes: