This problem arises from my personal experience in developing a game mod. At that time, I wanted to create a drone system for vehicles, but due to the limitations of the game itself, I could only achieve this by nesting turrets. The final result was not very satisfactory (the drones often moved erratically). Recently, I encountered a similar need, so I organized it into the following mathematical problem.
The specific problem is as follows:
Given a circular region S on a plane, with its center at (0, 0) and radius R, we want to find a series of connected rotating axes, with the starting point of the first axis at the center (0, 0). The parameters of the axes are radius r = (r1, r2, ..., rn) and angular velocity s = (s1, s2, ..., sn), such that:
The number of axes n is as small as possible;
The trajectory of the endpoint of the last axis can approximate any line segment within S with sufficiently high precision.
Note: The radius and angular velocity of each rotational axis in the final solution should be fixed and not change over time. I do not require the speed of the end of the entire assembly to be constant; I only require it to be as straight as possible.
For the i-th axis (i = 1, 2, ..., n), with parameters (ri, si), the coordinates of any point on it can be represented as:
$$ \begin{aligned} x_i(t) &= x_{i-1}(t) + r_i \cos(\theta_i(t)) \\ y_i(t) &= y_{i-1}(t) + r_i \sin(\theta_i(t)) \end{aligned} $$
where t is the time parameter, $\theta_i(t) = \theta_{i-1}(t) + s_i t$ represents the rotation angle of the i-th axis, and $x_0(t) = y_0(t) = 0$.
The distance from a point P(x, y) to the nearest point on the trajectory of the endpoint of the last axis is defined as:
$$ d(x,y,r,s) = \min \sqrt{(x - x_n(t))^2 + (y - y_n(t))^2} $$
where t is any moment.
Our optimization objectives are:
$$ \begin{aligned} &\text{minimize} \quad n \\ &\text{minimize} \quad \max(d(x, y, r, s)) \end{aligned} $$
subject to:
$$ \begin{aligned} \max(d(x, y, r, s)) &\leq \varepsilon, \quad \forall(x, y) \in S \\ r_i &> 0, \quad i = 1, 2, ..., n \\ |s_i - s_{i-1}| &\leq \Delta s, \quad i = 2, 3, ..., n \\ \sqrt{x_n(t)^2 + y_n(t)^2} &\leq R, \quad \forall t \end{aligned} $$
where $\varepsilon$ is the preset maximum allowable approximation error, and $\Delta s$ is the upper limit of angular velocity change.