For the 4th attempt of calculating pi, I wanted to use the method of "throwing needles on a paper". The project calculates how many times the needle would intersect with lines on the paper using some trigonometry, and uses the number of intersections and the number of total throws to calculate pi.
Although I had seen the method of "throwing needles on a paper", I came up with the way I should code the project in order to calculate the number of intersections without simulating it, and coded it by myself.