Tag Archives: line

Calculate where a line segment and an ellipse intersect in C#

Finding the intersection between a line segment and an ellipse requires a lot of mathematics. It’s not particularly hard mathematics, but if you’d rather skip it, you can use the following links to jump to the other parts of this … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , | 5 Comments

Find the tangent lines between two circles in C#

This example shows how you can find the tangent lines between two circles. Depending on how the circles are arranged, they can have 0, 2, or 4 tangent lines. If the circles don’t intersect, as on the left in Figure … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , | Leave a comment

Find the tangent lines between a point and a circle in C#

Finding the tangent lines between a point and a circle isn’t too hard if you’re familiar with the example Determine where two circles intersect in C#. Consider the figure on the right. R is the radius of the circle. You … Continue reading

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

Determine where a line intersects a circle in C#

The FindLineCircleIntersections method shown shortly finds the points where line intersects a circle. It takes as parameters a circle’s center point and radius, and two points on the line. It uses out parameters to return the coordinates of the points … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , | Leave a comment