How to measur the inclination angle of a palne?
17 ビュー (過去 30 日間)
古いコメントを表示
Let's say I have plane with two known points p1(x1, y1, z1) and p2(x2, y2, z2) somewhere in space. Is there any way to measure the inclination angle\angles for that plane? Which angle from the three angles (with respect to x, y or z axes) can be considered the inclination angle of that plane? Or I need calculate the three inclination angles?
Or I can say it in other way to add more details:
I have four known extrimeties points of a plane. I derived the plain equation from three known points only. Then, I measure the longest diagonal of the plane and I need to measure the inclination angle from that diagonal vector which has two known points. I attached a file that explain the problem with more details.
Can you help me please because i can't find any answer for a while.
0 件のコメント
採用された回答
John D'Errico
2020 年 4 月 5 日
Is there a way?
NO. Sorry, but absolutely not since two points do not determine a plane. There are infinitely many planes that will pass through any two points, Each of which can lie at any angle you so desire.
6 件のコメント
John D'Errico
2020 年 4 月 6 日
We are making some progress now.
Assume you have three points on the surface of a leaf. We can assume this is a planar leaf. (Its a pretty boring leaf, if so, but assume that.)
How can we define a plane? The trick is not to think about a plane in terms of a vector that lies in the plane, because that does not define the plane uniquely. Those three points in the plane can be used to determine the vector normal to the plane. This is far more important. Thus if you have three points, A,B,and C in the plane, then the normal vector is:
N = cross(A-C,B-C);
so the vector cross product between the vectors A-C and B-C. The nice thing is, MATLAB already provides a function called cross that does exactly what you need - compute a cross product.
Now, what vector are we computing the angle with? The Z axis vector, so we have a nicely vertical tree. (Gosh, what a boring forest we have. Planar leaves and vertical trees.) But what vector is the z axis?
TreeVec = [0 0 1];
The trick here is a useful cosine formula. The angle between two vectors u and v is given by
cos(theta) = dot(u,v)/(norm(u)*norm(v))
We can find that formula here:
So how does this apply to your problem? Just solve for theta in that formula.
theta = acos(dot(N,TreeVec)/norm(N)/norm(treeVec));
Theta there will be in radians, since I used acos, not acosd. If you want degrees, use acosd instead.
thetad = acosd(dot(N,TreeVec)/norm(N)/norm(treeVec));
But that is the angle between the two vectors. If you really want the angle between the plane and the vertical tree, you will need to subtract that angle from 90 degrees (or pi/2 radians, depending on how you compute it.)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Map Display についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!