필터 지우기
필터 지우기

convert 3D plane to 2D plane

조회 수: 25 (최근 30일)
Katharina Heitger
Katharina Heitger 2021년 10월 1일
댓글: Katharina Heitger 2021년 11월 19일
My Problem/My aim:
I have a plane in 3D, described in the form ax+by+cz=0. The equation was formed with the edge points of the plane, which I know as well. This plane is tilted, so that the z-coordinates are not always the same. Now I want to convert this 3D plane into a 2D plane, so that I can take its points as an input for fitgeotrans().
What I have done:
I tried a projection from the edge points, however the resulting points are too close together, which leads me to the thought, that this is not the right method for me. The calculation was similar to x/z and y/z.
In my research I have not found any matlab functions, which will do the trick. (maybe there is one and I haven't found it.)
I found this post: https://de.mathworks.com/matlabcentral/answers/81694-rotate-3d-plane-to-a-new-2d-coordinate-system , but honestly I do not have an axis around which I rotate the plane.
However I found this answered question, which coul be useful to me, but I am irritated by the naming and repetition of the variables.
Now my question is: Is there any matlab function I have overseen? Does someone know this method mentioned in the line before or has someone a differenet approach?
Any answers are deeply appreciated.

채택된 답변

Matt J
Matt J 2021년 10월 1일
One possible projection is,
[x2;y2]=null([a,b,c]).'*[x3;y3;z3]
However, the mapping you are looking for is non-unique. There are infinite 2D bases for a 3D plane.
  댓글 수: 2
Katharina Heitger
Katharina Heitger 2021년 10월 1일
Thank you! That works fine!
Katharina Heitger
Katharina Heitger 2021년 11월 19일
As I overthink my code once again, I looked over this line of code and wanted to understand it a bit more.
So essentially, what this code does is first calculate the null space (although Matlab has 2 doumentation with this syntax, one which states "Z = null(A) returns an orthonormal basis for the null space of A." and one which states "Z = null(A) returns a list of vectors that form the basis for the null space of a matrix A. The product A*Z is zero. size(Z, 2) is the nullity of A. If A has full rank, Z is empty.")
Then it transposes this nullspace and multiplies it with the 3D-Point I wnat in 2D.
Did I understand this right?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by