## 2 Simulation Method of Three-Dimensional DFN Based on Monte-Carlo Technique
### Simulation of 3D DFN of Rock Mass
#### 2.2.3 Geometric Representation of Rectangular Fractures  
Under the assumption that the upper and lower sides of the rectangular fracture are parallel to the horizontal plane and the two side lengths are independently and identically distributed, the dip angle \(\alpha_{i}\) and dip direction \(\beta_{i}\) of the \(i\)th fracture are obtained from Equation (1), the two side lengths \(a_{i}\) and \(b_{i}\) of the \(i\)th fracture are obtained from Equation (4), and the coordinates \((x_{i\alpha},y_{i\alpha},z_{i\alpha})\) of its center are obtained from Equation (8). Then, the four vertices of the \(i\)th fracture can be obtained by the vector of geometric transformation. As shown in Figure 1, we let the unit normal vector of the fracture be \(\overrightarrow{e_{i}}\), the unit vector of the edge of \(\overrightarrow{AB}\) be \(\overrightarrow{e_{AB}}\), the unit vector of the edge \(\overrightarrow{BC}\) be \(\overrightarrow{e_{BC}}\), the unit normal vector of the \(z\)-axis be \(\overrightarrow{e_{k}}(0,0,1)\), and the coordinates of point \(A\) be \((x_{ia},y_{ia},z_{ia})\). The perpendicular vector from the center \(O\) of the fracture toward \(\overrightarrow{AB}\) intersects \(\overrightarrow{AB}\) at point \(E\), to form a closed vector \(\Delta OEA\). The following relationship obtains in the vector \(\Delta\):  
\[\overrightarrow{OA}=\overrightarrow{OE}+\overrightarrow{EA}=(x_{ia}-x_{i \alpha},y_{ia}-y_{i\alpha},z_{ia}-z_{i\alpha}) \tag{9}\]  
where  
\[\overrightarrow{OE}=-\frac{b_{i}}{2}\overrightarrow{e_{BC}} \tag{10}\]  
\[\overrightarrow{EA}=-\frac{a_{i}}{2}\overrightarrow{e_{AB}} \tag{11}\]  
It follows from the relationship between the normal vector and the angle and direction of the dip that \(\overrightarrow{e_{i}}=(\sin\alpha_{i}\sin\beta_{i},\sin\alpha_{i}\cos\beta_{ i},\cos\alpha_{i})\). Figure 1: The process of obtaining the coordinates of the vertices of the \(i\)th rectangular fracture (**a**,**b**). From the perpendicular relationship between \(\overset{\rightharpoonup}{AB}\), \(\overset{\rightharpoonup}{e_{i}}\) and \(\overset{\rightharpoonup}{e_{k}}\), it follows that  
\[\overset{\rightharpoonup}{e_{AB}}=\frac{\overset{\rightharpoonup}{e_{k}} \times\overset{\rightharpoonup}{e_{i}}}{\left|\overset{\rightharpoonup}{e_{k}} \times\overset{\rightharpoonup}{e_{i}}\right|}=(-\cos\beta_{i},\sin\beta_{i},0) \tag{12}\]  
Similarly, it follows from the perpendicular relationship between \(\overset{\rightharpoonup}{BC}\), \(\overset{\rightharpoonup}{e_{i}}\) and \(\overset{\rightharpoonup}{e_{AB}}\) that  
\[\overset{\rightharpoonup}{e_{BC}}=\frac{\overset{\rightharpoonup}{e_{i}} \times\overset{\rightharpoonup}{e_{AB}}}{\left|\overset{\rightharpoonup}{e_{i}} \times\overset{\rightharpoonup}{e_{AB}}\right|}=(-\sin\beta_{i}\cos\alpha_{i},- \cos\beta_{i}\cos\alpha_{i},\sin\alpha_{i}) \tag{13}\]  
The coordinates of point \(A(x_{ia},y_{ia},z_{ia})\) can be determined by substituting Equations (10)-(13) into Equation (9),  
\[\left\{ \begin{array}{l}x_{ia}=x_{io}+\dfrac{b_{i}\sin\beta_{i}\cos\alpha_{i }+a_{i}\cos\beta_{i}}{2}\\ y_{ia}=y_{io}+\dfrac{b_{i}\cos\beta_{i}\cos\alpha_{i}-a_{i}\sin\beta_{i}}{2}\\ z_{ia}=z_{io}-\dfrac{b_{i}\sin\alpha_{i}}{2}\end{array} \right. \tag{14}\]  
Likewise, the coordinates of points \(B(x_{ib},y_{ib},z_{ib})\), \(C(x_{ic},y_{ic},z_{ic})\) and \(D(x_{id},y_{id},z_{id})\) can be calculated, respectively, as follows:  
\[\left\{ \begin{array}{l}x_{ib}=x_{io}+\dfrac{b_{i}\sin\beta_{i}\cos\alpha_{i }-a_{i}\cos\beta_{i}}{2}\\ y_{ib}=y_{io}+\dfrac{b_{i}\cos\beta_{i}\cos\alpha_{i}+a_{i}\sin\beta_{i}}{2} \\ z_{ib}=z_{io}-\dfrac{b_{i}\sin\alpha_{i}}{2}\end{array} \right. \tag{15}\]  
\[\left\{ \begin{array}{l}x_{ic}=x_{io}-\dfrac{b_{i}\sin\beta_{i}\cos\alpha_{i }+a_{i}\cos\beta_{i}}{2}\\ y_{ic}=y_{io}-\dfrac{b_{i}\cos\beta_{i}\cos\alpha_{i}-a_{i}\sin\beta_{i}}{2} \\ z_{ic}=z_{io}+\dfrac{b_{i}\sin\alpha_{i}}{2}\end{array} \right. \tag{16}\]  
\[\left\{