# Computerized Generation and Finite Element Stress Analysis of Endodontic Rotary Files
## 2 Materials and Methods
### Definition of the Geometry of the Machined Material for the Endodontic File  
The machined material (Figure 1c) is an auxiliary geometry that is used for the generation of the geometry of the endodontic file, and it is obtained from the transformation (rotation, translation and scaling) of an arbitrary cross section. For the definition of this geometry, let us consider an auxiliary coordinate system \(S_{g}\), whose \(z_{g}\) axis is parallel to the \(z_{f}\) axis of coordinate system \(S_{f}\), as indicated in Figure 3 left. The origin of coordinate system \(S_{g}\) is located on axis \(z_{f}\) at a distance \(v\) from \(O_{f}\), and \(S_{g}\) is rotated with respect to \(S_{f}\) an angle \(\varphi(v)\). The cross section of the machined material is defined with respect to coordinate system \(S_{g}\), and it is circumscribed into a normalized circumference (d = 1 mm), as illustrated in Figure 3 right for the particular case of a squared cross section. The position of any point \(P\) over the contour of the file section is defined by a parametric function \(\mathbf{r}_{g}(\theta)\) that provides, for a given parametric coordinate \(\theta\in[0^{\circ},360^{\circ}]\), the homogeneous coordinates [23] of point \(P\) in coordinate system \(S_{g}\):  
\[\mathbf{r}_{g}(\theta)= \begin{bmatrix}x_{g}(\theta)&y_{g}(\theta)&z_{g}( \theta)&1\end{bmatrix} ^{T} \tag{4}\]  
where \(z_{g}(\theta)=0\), since the cross section is contained in the \(x_{g}y_{g}\) plane. In the particular case of squared transversal cross section, \(x_{g}(\theta)\) and \(y_{g}(\theta)\) can be defined as  
\[x_{g}(\theta)=\frac{d\cdot\sqrt{2}}{4}\cdot \begin{cases}\tan(90^{\circ}- \theta),&\text{if }45^{\circ}\leq\theta<135^{\circ}\\ -1,&\text{if }135^{\circ}\leq\theta<225^{\circ}\\ -\tan(270^{\circ}-\theta),&\text{if }225^{\circ}\leq\theta<315^{\circ}\\ 1,&\text{otherwise}\end{cases}  \tag{5a}\] \[y_{g}(\theta)=\frac{d\cdot\sqrt{2}}{4}\cdot \begin{cases}1,&\text{if }45^{\circ}\leq \theta<135^{\circ}\\ \tan(180^{\circ}-\theta),&\text{if }135^{\circ}\leq\theta<225^{\circ}\\ -1,&\text{if }225^{\circ}\leq\theta<315^{\circ}\\ \tan\theta,&\text{otherwise}\end{cases}  \tag{5b}\]  
where d = 1 mm is the diameter of the normalized circumference. The definitions of \(x_{g}(\theta)\) and \(y_{g}(\theta)\) for other transversal cross sections can be trivially derived. The position of a point \(P\) on the surface of the machined material is given by the parametric equation \(\mathbf{r}_{f}(\theta,v)\), which provides the homogeneous coordinates of point \(P\) in coordinate system \(S_{f}\) from its parametric coordinates \(\theta\in[0^{\circ},360^{\circ}]\) and \(v\in[0,L_{total}]\):  
\[\mathbf{r}_{f}(\theta,v)=\mathbf{M}_{fg}(v)\cdot\mathbf{r}_{g}(\theta) \tag{6}\]  
where \(\mathbf{r}_{g}(\theta)\) is given by Equation (4), \(v\) is a distance coordinate (see Figure 3) and \(\mathbf{M}_{fg}(v)\) is a transformation matrix defined as  
\[\mathbf{M}_{fg}(v)= \begin{bmatrix}\lambda(v)\cdot\cos\varphi(v)&-\lambda(v) \cdot\sin\varphi(v)&0&0\\ \lambda(v)\cdot\sin\varphi(v)&\lambda(v)\cdot\cos\varphi(v)&0&0\\ 0&0&1&v\\ 0&0&0&1\end{bmatrix}  \tag{7}\]  
Figure 3: **(Left)** Definition of coordinate systems \(S_{f}\) and \(S_{g}\) and (Right) definition of a sample squared cross section for the endodontic file. The advantage of using homogeneous coordinates is that the transformation matrix \(\mathbf{M}_{fg}(v)\) allows three simultaneous transformations of the transversal cross section of the machined material to be performed:  
* The translation of the cross section a distance \(v\) along the \(z_{f}\) axis;
* The rotation of the cross section at an angle \(\varphi(v)\) around the \(z_{f}\) axis;
* The scaling of the cross section in the \(x_{f}y_{f}\) plane by a factor \(\lambda^{(}v)\).