Ellipse and line intersection JAVA
问题 I have a ellipse with a mid-point 'mid' an a horizontal radius 'h' and a vertical radius 'v' and a Line2D. Now I need some code to calculate the two intersection points of the two. I already tried some code and tried it on my own but there always is a mistake. Does somebody have some working code? 回答1: You will need to use algebra to solve the two equations, and it will get a little bit messy. First you have to write out the ellipse (1) (x/h)^2 + (y/v)^2 = 1 and the line in the format (2) y =