Say we are making a program to render the plot of a function (black box) provided by the user as a sequence of line segments. We want to get the minimum number of samples of the function so the resulting image "looks" like the function (the exact meaning of "looks" here is part of the question). A naive approach might be to just sample at fixed intervals but we can probably do better than that eg by sampling the "curvy bits" more than the "linear bits". Are there systematic approaches/research on this problem?
This reference can be helpful which is using the combined sampling method. Before that its related works explain more about other methods of sampling:
There are several strategies for plotting the function y = f(x) on interval Ω = [a, b]. The naive approach based on sampling of f in a fixed amount of the equally spaced points is described in [20]. The simple functions suffer from oversampling, while the oscillating curves are under-sampled; these issues are mentioned in [14]. Another approach based on the interval constraint plot constructing a hull of the curve was described in [6], [13], [20]. The automated detection of a useful domain and a range of the function is mentioned in [41]; the generalized interval arithmetic approach is described in [40].
A significant refinement is represented by adaptive sampling providing a higher sampling density in the higher-curvature regions. The are several algorithms for the curve interpolation preserving the speed, for example: [37], [42], [43]. The adaptive feed rate technique is described in [44]. An early implementation in the Mathematica software is presented in [39]. By reducing data, these methods are very efficient for the curve plotting. The polygonal approximation of the parametric curve based on adaptive sampling is mentioned in the several papers. The refinement criteria, as well as the recursive approach, are discussed in [15]. An approximation by the polygonal curves is described in [7], the robust method for the geometric and spatial approximation of the implicit curves can be found in [27], [10], the affine arithmetic working in the triangulated models in [32]. However, the map projections are never defined by the implicit equations. Similar approaches can be used for graph drawing [21]. Other techniques based on the approximation by the breakpoints can be found in many papers: [33], [9], [3]; these approaches are used for the polygonal approximation of the closed curves and applied in computer vision.
Hence, these are the reference methods that define some measures for a "good" plot and introduce an approach to optimize the plot base on the measure: