placed on a sheet of checkered paper with cells of unit size $1 \times 1$. All cells in which there is at least some part of the linear segment are considered as belonging to the polyomino (Fig. \[fig:needle\]).

![Example of a polygon formed by a line segment on a checkered paper. The size of the polyomino is 8.\[fig:needle\]](needle){width="\linewidth"}

Where the numbers of intersections with horizontal and vertical lines by a line segment are denoted as $N_y, N_x$, respectively, only two possibilities can be realized, viz, $N_i = \lfloor l_i\rfloor$ or $N_i = \lfloor l_i\rfloor + 1$, where $i=x,y$ and $\lfloor \cdot \rfloor$ means the floor function, i.e. the function that takes as its input a real number and gives as an output the greatest integer less than or equal to the input number (Fig. \[fig:intersections\]).

![Example of a horizontal line segment on checkered paper, $5<l<6$, i.e., $\lfloor l_x \rfloor =5$. The line segment may intersect only 5 or 6 vertical lines.\[fig:intersections\]](intersections){width="0.7\linewidth"}

Thus, the probabilities, $P$, that a line segment intersects the given number of vertical (horizontal) lines are $$\begin{aligned}
\label{eq:prob}
P\left( N_x = \lfloor l_x\rfloor + 1 \right) &= \left\{ l_x \right\} = \left\{ l \cos \theta \right\} = p_x,\\
