旋转卡壳 伪代码
begin
begin p0 := pn;
q := next[p];
while (Area (p,next[p],nxet[q]) > Area (p,next[p],q)) do // 有向面积
q := next[q]; // q 转动
q0 := q;
while (q != p0) do
begin
p := next[p];
print (p,q); // 一个对踵点
while (Area (p,next[p],next[q]) > Area (p,next[p],q)) do// 有向面积
begin
q := next[q]; // 转动
if ((p,q) != (q0,p0)) then print (p,q) // 对踵点
else return
end;
if (Area (p,next[p].next[q]) == Area (p,next[p],q)) then
if ((p,q) != (q0,p0)) then print (p,next[q])
else print (next[p],q)
end
end
旋转卡壳伪代码
最新推荐文章于 2024-06-24 15:07:21 发布