find the way to transfer 2D projection back to 3D
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi:
I have a 3D line and I want to
1) project the 3D line to 2D space
2) perform analysis
3)transfer back to 3D
however I could not find the appropriate way in 3rd step.
for example, I have a line
A= [0.001 0.0001 -0.0004;0.002 0.0001 -0.0004];
I would like to project to X-Y plane based on normal vector
nv=[0,0,1];
to transfer the 3D line to 2D, I use command:
B=A*null(nv);
however when I want to transfer it back, I use command:
C=B*null(nv)';
C =
0.0010 0.0001 0
0.0020 0.0001 0
where C is different from A.
maybe the approach I'm using is not correct, my question is, is there any other better way, to make sure the transform from 3D and 2D is correct and robust?
Thanks!
Yu
0 Commenti
Risposta accettata
John D'Errico
il 1 Apr 2024
Modificato: John D'Errico
il 1 Apr 2024
The projection you used into the nullspace was correct, AND robust. However the inverse operation is less easy to perform. You need to understand what you are doing, what these operations do.
Start with the "line". In fact, this is not a line, but two points in a 3-d space, which connected, imply a line of infinite extent.
A= [0.001 0.0001 -0.0004;0.002 0.0001 -0.0004];
You want to project that line into a plane defined by the normal vector, here
N = [0 0 1];
In this case of course, the implied projection plane is just the (x,y) plane. So the projection is simple enough. You are correct that null(N) will perform the projection.
null(N)
ans =
0 -1
1 0
0 0
Ahat = A*null(N)
ans =
0.0001 -0.001
0.0001 -0.002
The result is a pair of points as rows of Ahat. This now lives in a 2-d projection plane. Note that the projection is not unique. It was arbitrarily chosen by null, which effectively mapped the triad (x,y,z) into the pair (y,-x). Effectively, that projection throws away all information about z, just tossing all that information into the proverbial bit bucket of mathematics.
Having done so, what happens when you want to do the reverse operation? What did I just tell you? YOU THREW IT ALL AWAY! That is to say, any information about z no longer exists in youe data!
The reverse operation, thus
Ahat*null(N)'
ans =
0.001 0.0001 0
0.002 0.0001 0
restores x and y, but all information about z no longer exists! YOU THREW IT AWAY! GONE. Bit bucket limbo. Nada remains about z.
Effectively what that operation does is to view the projection plane as now a plane in 3-dimensions. But it is still just that 2-d plane.
What goes into the bit bucket of mathematics stays in the bit bucket. You cannot recover 3-dimensional information content from 2-dimensional data. All you can do is return the 2-d data into a 2-dimensional subspace of that 3-d domain.
Hmm. Let me say this another way. I'll take a picture of you with my trusty Polaroid camera. In effect, I have reduced the all of the information content in that original 3-d domain into a single 2-d projection of that scene. But having done so, now you want to recover the entire 3-d domain from simply that picture of it, knowing only the view point where you stood while taking the picture. While a picture paints a thousand words, it ain't enough.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Software Development Tools in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!