# A Novel Approach against Sun Glare to Enhance Driver Safety
## Materials and Methods
### Theoretical Aspects  
Having all the information that is needed, we can proceed to determine where on the windshield the darker spot shall be created. The solution is obtained by transposing the system to a 3D geometry problem and then solving it. In Figure 6, the geometrical overview of the system can be observed. Figure 4: In-glass display concept. Figure 5: Smart windshield concept. Figure 6: Geometrical overview of the system. The reference plan is noted with \(\pi\pi\), \(Or\) being the origin point, more precisely, the point where the sun tracking sensor is placed inside the car (the bottom-left corner of the windshield). The windshield plan is marked using \(\pi\)\(\mathrm{rp}\), and the angle between the reference plan and the windshield plan is marked by \(\varphi\). The information about the driver's position can be obtained from the camera-based tracking system, therefore, D represents the driver's eye. The sun is marked using S, the intersection between the sunbeam and the windshield is noted as \(I\). The sun tracking sensor returns the angles \(\alpha x\) and \(\alpha y\). The reference system's (in \(\pi\pi\) plan) axes are parallel with the \(Xi\)\(I\)\(Yi\) system. The purpose is to determine the coordinates of \(I\) as the intersection point between the sunbeam and the windshield. The coordinates will depend on D (\(x_{D},y_{D},z_{D}\)), \(\varphi\), \(\alpha x\), and \(\alpha y\). All of these being known variables. In order to simplify the problem, we split it in multiple parts. First, we need to determine the equation for the plans \(\pi\pi\) and \(\pi\)\(\mathrm{rp}\). To be noted that \(\overset{\rightarrow}{i}\), \(\overset{\rightarrow}{j}\), and \(\overset{\rightarrow}{k}\) are unit vectors (each corresponding to \(OrXr\), \(OrYr\), and \(OrZr\)), besides these vectors, there are other vectors marked by an arrow above and used in the following equations. These mentioned vectors were not added to the figures because it would decrease the readability, making the images hard to visualize due to high complexity. From Figure 7 we can obtain plan's \(\pi\pi\) Equation (1) and observe that the plan \(\pi\)\(\mathrm{rp}\) can be determined by \(OrYr\), \(OrP\), and \(Or\) (two lines and one point). \[\pi\pi:\,z=0, \tag{1}\]  
The equation describing \(OrYr\) is shown in Equation (2). Since \(Or\) is the reference point it has the following coordinates: (0, 0, 0). Inserting Equation (3) in Equation (4), the equation for \(OrP\) is obtained (see Equation (5)). \[OrYr:\,\frac{x}{0}=\frac{y}{1}=\frac{z}{0}\,\rightarrow\,v_{OrYr}^{\, \rightarrow}=\overset{\rightarrow}{j}, \tag{2}\]  
\[\tan\varphi=\frac{zP}{xP}\,\rightarrow\,zP=xP*\tan\varphi, \tag{3}\]  
Figure 7: Support for determining the equations for \(\pi\pi\) and \(\pi\)\(\mathrm{rp}\). \[OrP:\;\frac{x}{xP}=\frac{y}{0}=\frac{z}{xP}\;\rightarrow\;\frac{x}{xP}=\frac{y}{0}= \frac{z}{xP*\tan\varphi}, \tag{4}\]  
\[OrP:\;\frac{x}{1}=\frac{y}{0}=\frac{z}{\tan\varphi}\;\rightarrow\;v_{OrP}^{ \rightarrow}=\overset{\rightarrow}{i}+\tan\varphi\overset{\rightarrow}{k}. \tag{5}\]  
Then, using known formulas, such as Equation (6), we can obtain the equation for \(\pi\)p (see Equation (7)). \[\pi\mathrm{p}\;:\;\left| \begin{array}{ccc}x-x_{Or}&y-y_{Or}&z-z_{Or}\\ u_{i}&u_{j}&u_{k}\\ v_{i}&v_{j}&v_{k}\end{array} \right|=0, \tag{6}\]  
\[\pi\mathrm{p}\;:\;\left| \begin{array}{ccc}x&y&z\\ 0&1&0\\ 1&0&\tan\varphi\end{array} \right|=0\;\rightarrow\;\tan\varphi*x-z=0. \tag{7}\]  
The next step is to determine the equation describing \(SD\). Figure 8 will serve as support in order to solve this problem. We can see that \(SD\) can be determined by \(\overset{\rightarrow}{v_{SD}}\) and D (\(x_{D},\;y_{D},\;z_{D}\)). Inserting Equations (8)-(10), we obtain the desired Equation (11). Now all that is left is to determine the coordinates of the intersection point \(I\), knowing Equation (12).