PROJECT EULER · #0165
Intersections
A segment is uniquely defined by its two endpoints.
By considering two line segments in plane geometry there are three possibilities:
the segments have zero points, one point, or infinitely many points in common.
Moreover when two segments have exactly one point in common it might be the case that that common point is an endpoint of either one of the segments or of both. If a common point of two segments is not an endpoint of either of the segments it is an interior point of both segments.
We will call a common point
Consider the three segments
: to : to : to
It can be verified that line segments
Now let us do the same for
To create each line segment, we use four consecutive numbers
The first four numbers computed according to the above generator should be:
How many distinct true intersection points are found among the
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.