Reduce the number of points on the curve

enter image description here

A curve with coordinates (x, y) is given. I am working on a cut no. points in the falling curve using the tolerance check between two points (y2-y1)/y1, if this tolerance is below a predetermined value 0.01, then think that otherwise delete this point.

Having done this, I get dense points from below with respect to the top of the curve.

How can I have a tight curve at the top of the curve to look below.

Some sample points:

9.99E-10    1.17E+00
1.50E-09    7.53E-01
2.00E-09    1.77E-01
2.50E-09    1.61E-02
+4
source share
2 answers

You are simply comparing changes in height, but it seems more important to change the slope. So try the following:

Consider the first three points:

1- 2- 1- 3-, . .

1- .

+2

, , . - , (y2 - y1) / (x2 - x1), . (x2 - x1). , , y2 - y1 , , , , .

y2 - y1, . , . , .

+1

Source: https://habr.com/ru/post/1621690/


All Articles