几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 三维空间:产品设计或CAX软件使用 » CAD设计 » 产品功能分析
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-09-09, 02:31 PM   #1
huangyhg
超级版主
 
huangyhg的头像
 
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
huangyhg 向着好的方向发展
默认 geometryvector

geometry/vector
i have three points in 3d space, p1, p2 and p3, defined by (x1, y1, z1), (x2, y2, z2) and (x3, y3, z3). does anyone have a formula that calculates the angle between lines p1,p2 and p2, p3 and the angle of the plane, going through the points, relative to the x-y plane?
thanks, dik

the angle between two vectors in space is given by the relationship
cos theta = (u.v)/((abs u)*(abs v))
the numerator is the dot product of the vectors which is a scalar quantity, not a vector and is given by u1*v1 + u2*v2 + u3*v3
the denominator is the product of the absolute values of the magnitudes of the vector which are given by (individually) ((x^2)+(y^2)*(z^2))^0.5
good memory, streit..
i was racking my brain here because i knew i had used that before, but i didn't have any of my calc notes in the office.
i guess i should say that u is the first vector, line p1,p2 in your case, and would be shown as (x2-x1, y2-y1, z2-z1)- assuming that p1 is the starting point. v is the second vector, line p2, p3 in your case and is (x3-x2, y3-y2, z3-z2)- assuming that p2 is your starting point.
we'll give it a try... thanks, dik
if you post the coordinates, i'll see if my answer matches yours.
i believe there is a typo in your last expression where ... (y^2)+(z^2))^0.5
reading the question, i suspect dik wants p2 to be the starting point for both vectors. this is not trivial because if you pick the wrong direction of the vectors, you could end up computing the supplemental angle (the angle necessary to obtain 180 degrees when aded to the original angle) rather than the angle of interest. i re
i believe you may be right in what dik is looking for, but i did qualify my expression by saying, "assuming the starting point is p1 (or p2)".
also, that would relate to the expression in my second post, not the last one that you reference in my first post. the magnitude of the vector is the same regardless of the direction.
thinking on the solution further, since the third direction cosine is the cosine of the angle between the z-axis and the vector, the angle between the x-y plane and the vector is 90 degrees - acos(w), where 'w' is the direction cosine for the z term in the unit vector.
mag x ( u x i + v x j + w x k ) = vector cross product of (u,v)
a little old fashioned, but i believe it is the correct forumla.
i was thinking that if this gives the angle between the vectors, then if i add the two vectors to get a third vector and arbitrarily set the z component of this equal to zero to create a fourth vector.
if i use the method above to determine the angle between vectors 3 and 4, then this should be the angle to the x-y plane. correct in my thinking?
dik
let's go back as s-eit did, and label our values so we can be sure what we are discussing.
the vector from p2 to p1 is u (capitol denotes vector quantity)
the vector from p2 to p3 is v
the angle between these two vectors may be determined from the relationship ...
u.v = u x v x cos (theta)
e.g. the dot product of u and v is equal to the magnitude of vector u (denoted 'u') times the magnitude of vector v (denoted 'v') times the cosine of the angle between the two vectors (denoted 'theta').
adding the two vectors together, u+v=h, will only give you a new vector (denoted 'h') that "closes the triangle."
if you need the angle of the plane formed by points p1, p2 & p3 to plane x-y, then you will need to take a step to compute the orientation of this p123 plane. as it turns out, the cross product of two vectors yields a new vector that is perpendicular to the plane p123. the angle between this plane, p123, and the x-y plane is the acos of the third direction cosine in the cross product.
vector w = u x v (vector u cross vector v)
this vector w is perpendicular to the plane p123. the magnitude of vector w is denoted 'w'. if the direction cosines of vector w are denoted by (a x i + b x j + c x k) then vector w may be expressed as w x (a x i + b x j + c x k). the angle between plane p123 and the x-y plane is then equal to the acos(c). this is not the same answer i gave earlier. the answer i gave earlier was wrong. it would have given you the complementary angle.
as with many problems in math, there are surely other methods to get the answer, but this is the most direct i can think of.
__________________
借用达朗贝尔的名言:前进吧,你会得到信心!
[url="http://www.dimcax.com"]几何尺寸与公差标准[/url]
huangyhg离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭



所有的时间均为北京时间。 现在的时间是 02:36 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多