由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
_Graphics版 - 一个关于多边形的问题
相关主题
Polygonal Approximation初级GIS求助,如何计算点到polygon的最短距离?
glTexImage3D()Re: [转载] 有什么算法可以确定一个点在不在多边形内?
一个关于多边形的问题 ZZRe: 求救
有什么算法可以确定一个点在不在多边形内?answer to the 2-D world vs 3-D world
问一道f 家面试题求助一道数学分析题
你的CZ手枪,是多边形膛线吗?MS 2nd 电面题: Sin(x)/x 积分
转一个东西.某个组织新研究出来的引擎Re: 有什么算法解决这个极简单的问题吗?我很蠢。
求助:多边形与锥体的相交问题问一个随机变量分布的收敛的问题
相关话题的讨论汇总
话题: p0话题: line话题: p1话题: find话题: epsilon
1 (共1页)
b***m
发帖数: 22
1
现在二维平面上有一个任意形状的封闭的弧(没有方程可以描述,就像一滴水掉到玻璃板
上上形成的样子)。如何找出在这个弧的边界上具有最大相对距离的两个点,不一定要确
切的最大,接近最大就可以了。
一种方法是,找出具有最小的x+y的那个点,以及具有最大x+y的那个点,认为它们之间的
距离最大,但是这种方法不见得对阿
苦闷,请问。
n*******d
发帖数: 650
2




this is not even close.
the following is my quick thought, but it is not exact either:
1. take the mean(x1,x2...xn) and mean(y1,y2...yn).
2. draw a line through this point
3. rotate this line till the intersected length is largest
4. keep the line's orientation and translate the line in the direction
perpendicular to the line's orientation to find length even larger
5. goto 3 until ****

【在 b***m 的大作中提到】
: 现在二维平面上有一个任意形状的封闭的弧(没有方程可以描述,就像一滴水掉到玻璃板
: 上上形成的样子)。如何找出在这个弧的边界上具有最大相对距离的两个点,不一定要确
: 切的最大,接近最大就可以了。
: 一种方法是,找出具有最小的x+y的那个点,以及具有最大x+y的那个点,认为它们之间的
: 距离最大,但是这种方法不见得对阿
: 苦闷,请问。

wh
发帖数: 141625
3
How about this:
1. pick any point p0; find p1 such that d(p0, p1) = max(d(p0,p));
2. p0 = p1; go to 1;
stop when you get back to the same point.

【在 b***m 的大作中提到】
: 现在二维平面上有一个任意形状的封闭的弧(没有方程可以描述,就像一滴水掉到玻璃板
: 上上形成的样子)。如何找出在这个弧的边界上具有最大相对距离的两个点,不一定要确
: 切的最大,接近最大就可以了。
: 一种方法是,找出具有最小的x+y的那个点,以及具有最大x+y的那个点,认为它们之间的
: 距离最大,但是这种方法不见得对阿
: 苦闷,请问。

wh
发帖数: 141625
4

can someone show that it is guaranteed to converge to the global maxima?

【在 wh 的大作中提到】
: How about this:
: 1. pick any point p0; find p1 such that d(p0, p1) = max(d(p0,p));
: 2. p0 = p1; go to 1;
: stop when you get back to the same point.

n*******d
发帖数: 650
5

i think u r right but i don't know how to prove it. /shy

【在 wh 的大作中提到】
:
: can someone show that it is guaranteed to converge to the global maxima?

wh
发帖数: 141625
6
I've found a negative example. sigh.
consider this polygon:
A(0,0), B(0,1), C(1-epsilon, 1-epsilon), D(1,0). A->B->C->D->A.
If you start from p0 = A, you'll find p1=C as the furthest. then you'll come
back to A. dead loop.
The global maxima is BD, not AC.

【在 n*******d 的大作中提到】
:
: i think u r right but i don't know how to prove it. /shy

n*******d
发帖数: 650
7
Let's combine the thoughts
1. take the meanX and meanY, call it O
2. find P on the curve where O-P is max
3. start from P then do ur algorithm

【在 wh 的大作中提到】
: I've found a negative example. sigh.
: consider this polygon:
: A(0,0), B(0,1), C(1-epsilon, 1-epsilon), D(1,0). A->B->C->D->A.
: If you start from p0 = A, you'll find p1=C as the furthest. then you'll come
: back to A. dead loop.
: The global maxima is BD, not AC.

1 (共1页)
相关主题
问一个随机变量分布的收敛的问题问一道f 家面试题
来一道题(由 BT question 而想) 2你的CZ手枪,是多边形膛线吗?
凯尔特人的竖琴转一个东西.某个组织新研究出来的引擎
Banach space里面的closed set等价于求助:多边形与锥体的相交问题
Polygonal Approximation初级GIS求助,如何计算点到polygon的最短距离?
glTexImage3D()Re: [转载] 有什么算法可以确定一个点在不在多边形内?
一个关于多边形的问题 ZZRe: 求救
有什么算法可以确定一个点在不在多边形内?answer to the 2-D world vs 3-D world
相关话题的讨论汇总
话题: p0话题: line话题: p1话题: find话题: epsilon