» 您尚未登录:请 登录 | 注册 | 标签 | 帮助 | 小黑屋 |


发新话题
打印

[求助] 有没有人知道这个问题的算法?

I suggest that:
//a,b,c,d,e,f,are known,x,y are unknown;
//d={d1,d2,d3,d4}are known;

(a,b),(c,d),(e,f),(x,y)
--------------------------------
sqrt((a-c)^2+(b-d)^2)=>D1

then match D1 with d set

then may delete the same one in d set;
----------------------------------

sqrt((a-e)^2+(b-f)^2)=>D2

then match D2 with d set

then may delete the same one in d set;
--------------------------------------
sqrt((c-e)^2+(d-f)^2)=>D3

then match D3 with d set

then may delete the same one in d set;
---------------------------------------
you can delete 2 elements of d set,
So lets make a assumption D1=d1,D2=d2, then D3 is obvious, (c,d),(e,f) are both two colsest piont to the unknown point.

then use the ur junior high math skill^v^
solve the equations:

sqrt((x-c)^2+(y-d)^2)=d3\
                                       => (x,y)============\
sqrt((x-e)^2+(y-f)^2)=d4/                                      \
or                                                                          \   
sqrt((x-e)^2+(y-f)^2)=d3\                                      /  choose the real one
                                      => (x,y)============/
sqrt((x-c)^2+(y-d)^2)=d4/   



but the question has some ambiguity in the distance of two points.

[ 本帖最后由 hww7 于 2007-11-25 14:49 编辑 ]


TOP

发新话题
     
官方公众号及微博