## 3 Materials and Methods
### Proposed Maximal Vertical Distance Recursive Algorithm (MVD)  
The percentage of stress deviation (\(SD\)) is implemented into the algorithm for optimal point selection from the continuous material curve, using the plastic portion of the Ramberg-Osgood model (stress-strain power law) as an example. This implementation refines the original Ramer-Douglas-Peucker (RDP) algorithm, which relies on maximal perpendicular distance for point retention by adopting the previously explained maximal vertical distance measure. By doing so, the need to discretize the initial curve is eliminated, ensuring that the accuracy of the resulting simplified polyline remains independent of the number of discretized points originally present on the curve. This represents a significant advantage over existing algorithms like RDP and VW, as documented in the literature. Furthermore, this approach provides precise insights into the stress deviation of the multilinear curve in relation to the original Ramberg-Osgood curve, with the measure of SD serving as the algorithm's stopping criterion. The proposed algorithm is implemented on the plastic portion of Ramberg-Osgood material model and is designed to request user-input values, including the following:  
Figure 7: Maximal vertical distance measure II. * The coefficients used to describe the Ramberg-Osgood material curve: the strength coefficient (\(K\)) and strain-hardening exponent (\(n\)) in the case of static loadings, and the cyclic strength coefficient (\(K^{\prime}\)) and exponent \(n^{\prime}\) in the case of cyclic loadings;
* The minimum plastic strain value (\(\epsilon_{\text{p,start}}\)) at which the first corresponding stress value is calculated, typically set at 0.2%;
* The maximum desired plastic strain (\(\epsilon_{\text{p,end}}\));
* The desired percentage of stress deviation (\(SD_{\text{lim}}\)). The pseudo-algorithm for the proposed maximal vertical distance recursive algorithm (MVD) applied to the plastic portion of Ramberg-Osgood material model is outlined in Algorithm 1. ```
Input variables: \(K\) (or \(K^{\prime}\)), \(n\) (or \(n^{\prime}\)), \(\epsilon_{\text{p,start}}\), \(\epsilon_{\text{p,end}}\), \(SD_{\text{lim}}\). With \(\sigma_{\text{start}}=Ke^{n}_{\text{p,start}}\) define start point \(A\) (\(\sigma_{\text{start}}\), \(\epsilon_{\text{p,start}}\)). With \(\sigma_{\text{end}}=Ke^{n}_{\text{p,end}}\) define end point \(B\) (\(\sigma_{\text{end}},\epsilon_{\text{p,end}}\)). Define function: MVD (\(K\), \(n\), \(A\), \(B\), \(SD_{\text{lim}}\))  Connect start point, \(A\) with end point, \(B\) and calculate linear equation coefficients of formed line. Calculate the maximal vertical distance and select the point \(C\) on material curve for which maximal vertical distance is reached. Calculate percentage of stress deviation, \(SD\). If \(SD>SD_{\text{lim}}\): Recursive call: MVD (\(K\), \(n\), \(A\), \(C\), \(SD_{\text{lim}}\)) MVD (\(K\), \(n\), \(C\), \(B\), \(SD_{\text{lim}}\)) Else: Keep the points selected until this step. ```  
**Algorithm 1** Pseudo-algorithm of the maximal vertical distance (MVD) recursive algorithm. The outlined method is visually depicted in Figure 8, utilizing the following material constants of low-alloy steel taken from [34]: \(K\) = 549 MPa, \(n\) = 0.038, conventionally taken \(\epsilon_{\text{p,start}}\) = 0.002, and a maximum stress deviation \(SD_{\text{lim}}\) = 5%. Initially, the algorithm defines a starting point \(A\) (\(\sigma_{\text{start}}\), \(\epsilon_{\text{p,start}}\)) and an end point \(B\) (\(\sigma_{\text{end}}\), \(\epsilon_{\text{p,end}}\)), with \(R_{\text{e}}\) and \(\sigma_{\text{end}}\) computed using the plastic portion of the Ramberg-Osgood equation (Equation (5)) for corresponding values of stress. Subsequently, the algorithm establishes a line connecting points \(A\) and \(B\) by determining the coefficients of the linear equation that characterize this line.