|
"Vinaykumar " <vin1009@yahoo.com> wrote in message
news:he7ug5$k3v$1@fred.mathworks.com...
>I have two continuous curves for which I have only the data points. Both
>curves approx. look like a semi-circle (though not a semi-circle). From a
>known point on one of the curves, I want to find the NORMAL distance (not
>smallest distance) to the other curve.
> The data points are closely spaced. So what I planned to do was to
> find the normal at the said point (say A)(lying on curve 1) and find the
> point of intersection of the normal and the other curve (curve 2).
>
> I have found the slope of normal at the point by using the point A by
> using the two points adjacent to it. But how to find the point of
> intersection?
>
> Thanks.
>
> Vinay
may be one suggestion:
can't you just fit a curve (polynomial) to the few points around A? then
find its derivative at A, this gives you the slope s of the tangent at A,
then slope of normal is -1/s, then you have the line equation of the normal
line (slope + coordinates of point A i.e. y-y1=slope*(x-x1) ), then find
intersection of this line with the other curve equation (which you also
would fit to a curve, so you have its equation). solving the 2 equations for
the intersection point?
--Nasser
|