Tag Archives: intersection

See where two ellipses intersect in C#, Part 1

This example shows how you can see where two ellipses intersect. Surprisingly, some of the most popular posts on the C# Helper web site are not about C# itself. Instead they are about geometry. I decided to add to this … Continue reading

Posted in algorithms, geometry, mathematics | Tagged , , , , , , , , , , | 3 Comments

Find the shortest distance between two line segments in C#

Click four points to pick the end points for the two line segments. The program finds the points on the two segments that are closest and connects them. The closest distance between two segments is either 0 if they intersect, … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , | 1 Comment

Determine where two lines intersect in C#

This example determines whether two segments intersect and where the lines that contain them intersect. There are several ways you can approach this problem. This example uses lines defined by parametric equations where 0 <= t1, t2 <= 1. If … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , | 14 Comments