## 2 Materials and Methods
### Photon-Surface Interaction in TMCE  
Our simulation of light propagation in PWS skin is conducted on the basis of the weighted-photon MC technique [9]. In this approach, a large number of energy packets (\"photons\") propagate through tissues and deposit a fraction of their energy into specific volume elements in accordance with local absorption properties. Stochastic relations are used to determine each photon's random trajectory on the basis of the physical laws of light scattering, reflection, and refraction. The step size of the photon is calculated based on a sampling of the probability distribution for the photon's free path. Integrating the interaction coefficient (sum of the absorption and scattering coefficient) along the photon trajectory determined by a random number can obtain the step size [18]. The implementation of photon-interface interaction in TMCE is presented as follows.  
Suppose that P is the position of the photon, U is the unit direction of photon movement, and N is the inward unit normal vector of the triangle surface. For a photon with P in the current tetrahedron, a judgment of N\(\cdot\)U \(<\) 0 will be performed on each of the four triangular surfaces to identify a possible photon-triangle interaction. In general, two or three of the triangles satisfy the judgment, as shown in Figure 3.  
The description of photon propagation should be presented to determine the photon-interaction plane from two or three triangles. The path of the photon to hit a triangle can be described as the following line function:  
\[\mathbf{P}^{\prime}=\mathbf{P}+\mathbf{U}t,\text{ for }t>0 \tag{1}\]  
where \(t\) is the distance from the photon's current location to the intersection point. For the potential triangle of photon collision, the following equation is derived in accordance with the plane function:  
\[\mathbf{N}\cdot\mathbf{Q}\ +\ d=\ 0 \tag{2}\]  
Figure 2: Photon reflection on vessel–dermis boundary. (**a**) Tetrahedron-based Monte Carlo method with extended boundary condition (TMCE) with relatively sparse mesh, (**b**) TMCE with refined mesh, and (**c**) real physical process.  
where Q is a point on the plane, and \(d\) is a scalar. The propagation distance \(t\) can be solved by combining Equations (1) and (2) as follows:  
\[\mathbf{N}\cdot\mathbf{P}^{\prime}+\ d\ =\ 0\Rightarrow\mathbf{N}\cdot(\mathbf{P} \ +\ \mathbf{U}t)\ +\ d\ =\ 0\Rightarrow t\ =\ -\frac{\mathbf{N}\cdot\mathbf{P}\ +\ d}{\mathbf{N}\cdot\mathbf{U}} \tag{3}\]  
The plane marked by the minimum \(t\) is the target plane of photon propagation. If the minimum \(t\) (_t_) among the potential planes is larger than the photon step size _t_s (generated by a random number), then the photon transports within the current tetrahedron; otherwise, the photon will hit the related triangular surface and continue to propagate until the step size is covered. In the preceding procedure of photon-triangle interaction, when a photon hits an interface (triangular surface) between two media, the photon is either reflected or refracted as determined by the Fresnel formulas connected with a random number [18]. The reflection and refraction directions are determined from the reflection law and Snell's law [18]. When the photon reaches the destination of the current step size, the energy carried in the photon is attenuated by the absorption and scattering effect. Subsequently, the next step size will be generated.