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


发新话题
打印

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

lz说不规则四边型? 老师要求用解析几何还是向量?


TOP

我这是进了什么帖子啊



TOP

共面还求屁的Z4

求X4,Y4用初中的二元二次方程


TOP

已知3个postion,就是3个vector,和4个float。求第四个vector。
4个float是两两间距离,相邻的。
是个凸四边形。

TOP

sqrt(square(x1-x2)+square(y1- y2)+square(z1-z2)), 楼主要这个公式吧?

TOP

.....什么玩艺??

TOP

MB,现在看数学就是让我看天书啊……完全看不懂你们在说什么……

[ 本帖最后由 xtpl 于 2007-11-24 23:00 编辑 ]

TOP

就是三元二次方程的求解问题
用语言写一般是用迭代法进行逼近

TOP

楼主去看一下非线性方程组的牛顿迭代法

TOP

居然有人初中就会解三元二次方程。。。牛啊~~~

关于迭代的算法,matlab中的solve可以看到源代码。应该是改进型的牛顿迭代法,而且带全部异常处理,非常有参考价值。。。
mathmatics也可以求解,不过我没用过,不知道能不能看源码。。。

TOP

这是什么区?

TOP

lz数学不行啊

TOP

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

真的是综合讨论区阿

TOP

引用:
原帖由 hww7 于 2007-11-25 14:45 发表
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  ...
按照你这个思路没必要这么麻烦,可以先求已知三点的所在平面的过原点的法线方程,计算旋转角度,然后旋转坐标系,这样已知三点将位于新的坐标系的x1 o y1平面内,再解二元二次方程组即可,这个方程组两个变量是分离的,容易求解。

TOP

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