I haven't tried this ，Maybe the method mentioned here is wrong. Please forgive the bad grammar writing.

I will first set a circle track sequence, according to the size of the picture you want to draw, in the middle of the screen origin, take a point, set a suitable radius, and calculate all its plane coordinates. I will set a pixel size as a coordinate, and save these coordinates in an array.

Then, the size of this array can be used as a global number of track points, which is the first step to establish a working benchmark.

That is to say, no matter how long the time is, each ball travels at these coordinate points. According to the current speed and position of the ball, read the next position of this table.

Then, for each ball, set a step time, which represents the cycle period T or the actual time （ms） required for the ball to move one grid.

So that each ball moves one grid by different time intervals,

----For the ball rolling in non-uniform circular motion

In the whole circular motion, three segments of data, acceleration segment, deceleration segment and average speed segment need to be calculated,

You need to preset the starting point angle, the number of passing points in the acceleration section, the number of passing points in the deceleration section, and the number of passing points in the uniform motion.

The number of points in the variable speed segment is obtained, and then the time interval required for moving each point is calculated in turn. Store the value in the array corresponding to the ball.

Starting from the clock 12 o'clock (90 degrees), a table of relative transformation time is calculated separately for the variable-speed ball,

which means that the table of acceleration and deceleration time is calculated according to the highest speed and the lowest speed .

Each number in the table represents the actual time needed to move a pixel grid,

These time values gradually increase and decrease in the time table.

And the total length of this table is the same as the first table.

So, to plot the trajectory of this ball, you only need to read the (waiting time) value in the table every time,

After the specified ms time / or cycle.

Then read the next point of the global table,

Draw the next point of the ball on the screen.

If you want to specify the starting angle of the ball, you need to move the table data by several cells.

After that, you should be able to use the minimum and maximum speed of the ball as parameters that can be adjusted to calculate the relative transformation table at any time.

Next you can think about any little ball you want to roll

This method can also be used to draw the waveform.

When you're familiar with the approach, consider simplifying it in a way that seems simpler. For example, use variable return instead of waiting table.