我有一项与 Koch Snowflake 和堆栈/队列有关的任务。问题是我们这里的许多人无法弄清楚作业中给出的伪代码“提示”是什么意思。有人可以帮忙吗?
http://web.cs.mun.ca/~rod/W12/cs2710/assign/a5/assign5.html
Add the initial segments, L.add(seg1) ... L.add(segN)
while not L.isEmpty()
seg = L.remove()
if seg is smaller than the minimum segment size then
draw seg, no new segments are created
else
create four new segments according to
the rules for Koch snowflakes
add these new segments to L
最令人困惑的部分是“如果 seg 小于最小段大小”......不知道我需要比较什么来写这个。