## 3 Approximate Inverse Kinematics Solution for Imposed End-Effector State
### Calculation of Arc Segments' Endpoints and Orientations  
All three segments' bending angles \(\theta_{n}\) (Equation (14)) and endpoints (Equations (10)-(12)) on the curve allow for finding actual segments' endpoint coordinates in the Cartesian system. The further derivation will consider robot segments' shape in an arc form, similar to the ellipse arc seen in the spine curve (Figure 5c). Arc geometry in the \(x\)-\(z\) plane 2D workspace (Figure 6) allows for obtaining the \(z\) coordinates of all three robot segments endpoints \(P_{n}\). As seen in Figure 6, the triangle \(\Delta OB_{n}P_{n}\) will express the coordinate \(z_{n}\), defining a segment endpoint's z coordinate. Before that, the arc chord length requires determination, for which the formula is  
\[d_{n}=2r_{n}\sin\left(\frac{\theta_{n}}{2}\right). \tag{15}\]  
Figure 6: Robot segment in the 2D workspace \(x\)-\(z\) plane (the segment form is in a regular circle arc shape). \(d_{n}\)—chord length (\(n\) —segment number); \(r_{n}\) —arc radius (\(n\) —segment number); \(L\) —circle arc length; \(O\) —arc start point; \(P_{n}\) —arc endpoint (\(n\) —segment number); \(C_{n}\) —circle center point (\(n\) —segment number); \(A_{n}\) —middle point of the \(OP_{n}\) straight line (\(n\) —segment number); \(\alpha_{n}\) —angle between \(\mathbf{p}_{n}\) and \(\epsilon_{n}\) vectors (\(n\) —segment number); \(\theta_{n}\) —arc angle (\(n\) —segment number). Based on circle arc, \(r_{n}\) is equal to  
\[r_{n}=\frac{L}{\theta_{n}}. \tag{16}\]  
Then, the chord length can be expressed as follows:  
\[d_{n}=\frac{2L}{\theta_{n}}.\sin\left(\frac{\theta_{n}}{2}\right). \tag{17}\]  
Triangle \(\Delta OP_{n}C_{n}\) (Figure 6) serves for determination of the angle \(\alpha_{n}\) that lies between vectors \(\mathbf{p}_{n}\) and \(\mathbf{c}_{n}\):  
\[\alpha_{n}=\frac{\pi-\theta}{2}=\frac{\pi}{2}-\frac{\theta_{n}}{2}. \tag{18}\]  
From triangle \(\Delta OB_{n}P_{n}\),  
\[\sin(\alpha_{n})=\frac{||\mathbf{e}_{n}||}{||\mathbf{p}_{n}||}=\frac{z_{n}}{d _{n}}, \tag{19}\]  
\[z_{n}=d_{n}\sin(\alpha_{n}). \tag{20}\]  
Substituting \(d_{n}\) and \(\alpha_{n}\) from Equations (17) and (18) into Equation (20), its simplification produces \(z_{n}\)  
\[z_{n}=\frac{2L\ \cos\left(\frac{\theta_{n}}{2}\right)\sin\left(\frac{\theta_{n}}{2 }\right)}{\theta_{n}}=\ \frac{L\ \sin(\theta_{n})}{\theta_{n}}. \tag{21}\]  
Equations (15)-(21) help to estimate coordinates \(z_{n}\) of robot 1, 2, 3 segment endpoints \(P_{n}\). On the other hand, point \(P_{n}\) coordinates \(x_{n}\), \(y_{n}\) can be found similarly to coordinates \(z_{n}\). In this case, all coordinate \(x_{n}\), \(y_{n}\) computations are in the first robot segment coordinate system, around point \(O\), (Figure 6). Calculations begin with the estimation of the first segment endpoint's \(P_{1}\) coordinates, \(x_{1}\), \(y_{1}\). First of all, vector \(\mathbf{p}_{\text{ecl}}\) (point \(\hat{P}_{\text{ecl}}\) has coordinate estimates based on Equation (10)) has to be normalized so that its magnitude is equal to chord length \(d_{n}\) (Equation (17)). According to [38], the general formula for vector normalization and scaling with a given length is  
\[u_{\text{p}}=\frac{l_{\text{p}}v_{\text{p}}}{||\mathbf{v}||}, \tag{22}\]  
where the output vector length is \(l_{\text{v}}\), the output vector coordinate is \(u_{\text{p}}\) (p stands for x, y, or z), the input vector is \(\mathbf{v}\), and the input vector coordinate is \(v_{\text{p}}\) (p stands for x, y, or z). According to the generic normalization and scaling formula (Equation (22)),  
\[x_{\text{1 Norm}}=\frac{\delta_{\text{ecl}}\ d_{1}}{||\mathbf{p}_{\text{ecl}} \ ||}, \tag{23}\]  
Figure 6:0  
Figure 6:1  
where the first robot segment chord length is \(d_{1}\). Figure 7, based on Equations (23)-(25), represents a new vector, \(\mathbf{p}_{\text{Necl}}\). The magnitude of the calculated new vector \(\mathbf{p}_{\text{Necl}}\) is equal to chord length \(d_{1}\).