绘图的采样方法

Sampling methods for plotting

假设我们正在编写一个程序来将用户提供的函数(黑框)的绘图呈现为一系列线段。我们希望获得函数的最小样本数,以便生成的图像 "looks" 像函数一样(这里 "looks" 的确切含义是问题的一部分)。一种天真的方法可能只是以固定的时间间隔进行采样,但我们可能会做得更好,例如通过对 "curvy bits" 进行采样而不是对 "linear bits" 进行采样。 approaches/research这个问题有系统的吗?

这个reference在使用组合抽样方法时可能会有所帮助。在此之前它的相关著作更多地解释了其他采样方法:

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.

因此,这些是为 "good" 图定义一些度量并引入基于度量优化图的方法的参考方法:

  • 构造曲线的外壳
  • 自动检测有用域和函数范围
  • 自适应采样:在高曲率区域提供更高的采样密度
  • 在较高曲率区域提供较高的采样密度
  • 多边形曲线近似
  • 三角模型中的仿射算法
  • 组合采样:将提供涉及不连续性的参数曲线的多边形近似。修改后的方法将用于函数 f(x) 的重建和绘图。基于将域拆分为不连续的子区间的思想,它代表了递归方法可以解决的典型问题。