## 3 Interpolation Algorithm
### Discussion on the Physical Meaning and Scope of Applicability of the Assumptions
#### 3.3.1 Calculating Flexural Stiffness  
The theory behind this calculation is summarized as follows. Assume that the principal axes of the cross-sections of the beam under investigation are parallel. Choose a coordinate system regarding a beam in a way that the x-axis is parallel with the longitudinal axis of the beam, while one of the y or z-axis is parallel with one of the principal axes of the cross-section. For a Bernoulli beam, the following equation can be applied [28]:  
\[v^{\prime\prime}(x)=-\frac{M_{z}(x)}{D(x)} \tag{5}\]  
where \(D(x)\) is the flexural stiffness at the location \(x\), \(M_{z}(x)\) is the bending moment at location \(x\) and \(v\) is the displacement of the beam. The function \(D(x)\) is often referred as \(E(x)I(x)\), where \(E(x)\) denotes the Young's modulus at position \(x\), and \(I(x)\) is the second moment of area at that same point. We know the displacement of the nodes of the FEM model and we know the bending moment at each cross-section, the aim is to calculate the \(D(x)\) flexural stiffness function along the beam. Next, the process of calculating flexural stiffness is presented. The basic approach is that we choose a line segment inside the point cloud of the nodes, and every node is projected onto that line segment. The line segment represents the neutral line, so it has to be chosen accordingly. The starting point of this line segment should be at the clamped end of the structure, while the other end should be at the other end of the structure. Now we define a coordinate system that has an \(x\)-axis that is collinear with the defined line segment, and the origin is at the clamped end of the structure, and it is directed to the other end of the projection line. The \(y\) axis of this coordinate system is perpendicular to the \(x\) axis. In this \(x-y\) system, we can plot the projected node position versus node displacements, and a polynomial can be fitted to this set of data. To determine \(D(x)\), the second derivative of the resultant polynomial is computed. It is worth noting that the precise selection of the projection line--ideally aligned with the neutral line--is beyond the current scope and is reserved for future work. Step-by-step procedure:  
1. Translate the origin to the beginning of the projection line. The starting point of the projection line is \(\underline{p_{1}}\) the endpoint is \(\underline{p_{2}}\). Let the \(i\)th vector of a node be \(\underline{n_{i}}=[n_{xi},n_{yi},n_{zi}]\). Then the \(i\)th translated node vector is \(\underline{n_{ti}}=\underline{n_{i}}-\underline{p_{1}}\). 2. Compute the unit vector of the projection line. Let the unit vector of the projection line be \(\underline{p_{u}}\). So, \[\underline{p_{u}}=\frac{\underline{p_{2}}-\underline{p_{1}}}{\left\|\underline {p_{2}}-\underline{p_{1}}\right\|_{2}}\] (6)3. Project the nodes to the projection line. Let the projected nodes be \(\underline{n_{p}}\). Then, \[\underline{n_{p}}=\underline{n}\,\underline{p_{u}}\] (7) where the \(\underline{n}\) matrix contains the coordinates of the nodes. 4. Delete all the nodes that are outside the line segment. Every element of \(\underline{n_{p}}\) is omitted if the element value is less than zero or greater than \(\left\|\underline{p_{2}}-\underline{p_{1}}\right\|_{2}\). 5. Compute the scalar displacements. There is a displacement vector associated with each node. In a bending load case, there is only one direction where the displacement is significant, so in order to avoid the introduction of a new coordinate frame, the length of the displacement vector is used. Let \(\underline{d}\) be the matrix of the coordinates of the displacements. The \(i\)th scalar displacement is \(\underline{d_{si}}=\left\|\underline{d_{i}}\right\|_{2}\). 6. Fit a polynomial to the \(\underline{n_{p}}\to\underline{d_{s}}\) dataset. Since one end of the beam is clamped, the displacement and the first derivative of the displacement function at the clamping are zero because it is the boundary condition for the clamped constraint.