I have a set of plotted X,Y data points making a curve as shown below in the black line. What i need to do is draw a line from each of the X,Y s to all of the other XYs to determine the one with the highest slope for each point.
any line that intersects the curve more that 2 times IE the green line below are invalid. Can you think of a way to find all the common points of the Line and the curve given that i have all the XY to define the curve and all the XY at either end of the lines
here are some sample datapoints
POINT x y Slope
1 0.00 1.00 #DIV/0!
2 0.79 -1.00 -2.55
3 1.57 -4.00 -3.18
4 2.00 -7.00 -4.00
5 2.36 -2.00 -1.27
6 2.55 8.00 2.75
7 3.14 12.00 3.50
8 3.93 -0.71 -0.43
9 4.71 0.00 -0.21
10 5.50 0.71 -0.05
11 6.28 1.00 0.00
12 7.07 0.71 -0.04
this is a beter picture illustrating the slopes being all over the place so i am not sure if finding m+1 being a lesser value will work
Ok FleaBlood I am not understanding Ill include another graph and table to clarify
Hint: If a line (such as the green one) passes through the curve then there is an "earlier" slope that was greater than it.
The lines that don't pass through twice have to all have been the maximum of all the slopes before it, and minimum of all the slopes to come. If any later slope is less than it, then it passes the curve twice.
So measure slopes $m_1, m_2, m_3, m_4$. If you ever get a slope where $m_{i+1} \le m_i$ then $m_{i+1}$ and all the previous slopes, $m_j$, so that $m_{i+1} \le m_j \le m_i$ pass through the curve twice.