我正在寻找一种有效的算法,可以给我随机形状的所有边缘。我可以写一个,但是如果有人知道可以优化的现有解决方案,将不胜感激,因为这将在手机上运行:)
示例形状:
===== ==========
===== \=========
====/ \\
===/ \\
==/ =======
=/ =======
====================
=======
=======
=====\ =======
======\ /=======
对于左上角,我需要可以有效地给我的数据:[ 0%, 0% ], [ 25%, 0% ]