weighted_voronoi_stippling 源码

airborne96028 5 0 ZIP 2021-04-06 15:04:47

weighted_voronoi_stippling 的 Java语言实现 像素值用作密度。 首先要点是拒绝采样。 然后用这些点生成一个voronoi图。 用密度计算每个voronoi区域的质心,然后将点移动到质心位置。 重复上述两个步骤,直到收敛为止。 voronoi图是使用WebGl绘制的。 用法 // generates an array of points from the image const samples = generateStipples ( image , { sampleTimes : 20000 , maxIteration : 20 , convergeThreshold : 0.2 } ) ; 选项 sampleTimes 初始播种阶段要采样的次数。 香奈儿 要进行采样的图像的香奈儿。 应该是“ r”,“ g”,“ b”,“ a”,“ avg”之一。 收

用户评论
请输入评论内容
评分:
暂无评论