Filter löschen
Filter löschen

How to find intersection points of two discrete curves?

9 Ansichten (letzte 30 Tage)
Vishal Srivastava
Vishal Srivastava am 25 Mär. 2018
Bearbeitet: John D'Errico am 25 Mär. 2018
I have two curves, one is a circle with given centre and radius, the other is [x1 x2 x3...xN; y1,y2,y3,,,yN]. The second one is a curve, and the point(s) of intersection may not be one of those points in my dataset. I want to calculate the precise point of intersection between the circle and the "interpolated" curve?
Note.: 1.) I don't want to use linspace(x1,xN,<large number>) and then check if it lies on the circle. This won't give the precise result as it may again lie between one of those discrete points. 2.) I have tried using InterX (https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function) but it also fails in many situations.

Akzeptierte Antwort

John D'Errico
John D'Errico am 25 Mär. 2018
Bearbeitet: John D'Errico am 25 Mär. 2018
I would suggest instead Doug Schwarz's utility, intersections. It was written to be as robust as possible, and Doug is a programmer for whom I have a great deal of respect. He also spent a fair amount of effort to make it robust as I recall, and he has carefully maintained it over the years.
https://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections
Of course, you should remember that since any such tool will only do linear interpolation, the intersection with a nonlinear curve (a circle) will be only as good as the interpolation.

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by