gpt4 book ai didi

c# - 如何从形状或点集合中检索外部点?

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:02:26 25 4
gpt4 key购买 nike

我这里有这个积分集,

<Polyline Points="568,263,568,262,568,262,568,260,568,260,568,259,568,257,568,257,568,256,567,256,567,256,567,255,567,255,567,255,567,255,567,255,567,254,567,254,566,254,566,254,567,253,566,253,566,253,566,252,566,252,566,251,565,251,565,250,565,250,565,250,565,250,565,250,565,249,564,249,564,249,564,248,564,248" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,545,238,546,238,548,238,549,239,550,239,551,239,551,239,552,239,552,240,553,240,553,240,554,240,554,240,555,241,556,241,556,241,557,241,557,241,557,242,557,242,557,242,558,242,558,242,558,243,558,243,559,243,559,243,559,243,559,244,560,244,560,244,560,244,560,244,561,245,561,245,561,245,561,245,562,245,562,245,562,246,562,246" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,563,247,568,263,544,263,544,238,544,238" Stroke="Black" StrokeThickness="1" />
<Polyline Points="557,244,559,245,560,245,561,245,562,246,562,246,563,247,563,247,563,247,563,248,557,248,557,243,557,243" Stroke="Black" StrokeThickness="1" />
<Polyline Points="520,263,520,262,520,262,520,260,520,260,520,259,520,257,520,257,520,256,521,256,521,256,521,255,521,255,521,255,521,255,521,255,521,254,521,254,522,254,522,254,521,253,522,253,522,253,522,252,522,252,522,251,523,251,523,250,523,250,523,250,523,250,523,250,523,249,524,249,524,249,524,248,524,248" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,543,238,542,238,540,238,539,239,538,239,537,239,537,239,536,239,536,240,535,240,535,240,534,240,534,240,533,241,532,241,532,241,531,241,531,241,531,242,531,242,531,242,530,242,530,242,530,243,530,243,529,243,529,243,529,243,529,244,528,244,528,244,528,244,528,244,527,245,527,245,527,245,527,245,526,245,526,245,526,246,526,246" Stroke="Black" StrokeThickness="1" />
<Polyline Points="544,238,525,247,520,263,544,263,544,238,544,238" Stroke="Black" StrokeThickness="1" />

这个点集合形成下面的形状,

enter image description here

我需要没有内部形状的外部点。我需要这样的输出图像 enter image description here

我还尝试使用算法寻找外部点。

引用链接:Graham scan 但我没有得到任何人指导我的确切结果。提前致谢。

最佳答案

这个我得到了答案。

我合并所有点并使用凸包算法,我将得到外部点。

convex hull algorithm reference Project

关于c# - 如何从形状或点集合中检索外部点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52659667/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com