通过模拟理想同种点电荷排斥运动的方法实现N个采样点均匀分布在给定的带有限制区的不规则多边形采样区域内。首先将多边形采样区域以及内部限制区域的各条边离散化为一系列位置固定的点电荷,然后在多边形内随机放置N个点电荷,并通过逐个"放抓"点电荷并让它们受电场力运动,并最终达到合力与速度都接近零的稳定状态,此时N个点电荷的位置就均匀分布在指定区域内,可以作为N个样点的均匀采样布局。分析与实验结果表明,这种方法是一种在复杂多边形区域内实现采样点均匀分布的简单而高效的方法。
A method for an even distribution of N sampling points within a given polygon which contained inaccessible constraints was presented based on the simulation of ideal electrons' repulsion movement. First, the edges of the polygon and the inner constraints into bunches of fixed electrons were described. N electrons can then be put into the polygon in random positions. And then they were "free and hold" one by one and were moving under Coulombic force. Finally, a balance was achieved with their resultant force and velocities approach to zero. At this time, these N electrons were evenly distributed within the given region ; thus, their layout was considered to be an even sampling layout of N samples. Theoretical analysis and the experimental results indicated that electrons' repulsion simulation is a simple and efficient method for implementing even sampling layout of N samples within a complex polygon.