Orthogonal projection - embarrassed

AI Thread Summary
The discussion revolves around projecting 3D points onto the span of two orthogonal vectors using MATLAB. The user initially applied the orthogonal projection formula but encountered issues with the visualization of the results. After troubleshooting, it was determined that the problem stemmed from MATLAB's quiver3 function not plotting the vectors accurately. The user resorted to creating a custom plot to demonstrate the projection, despite it not being suitable for formal documentation. Ultimately, the mathematical approach was confirmed to be correct, highlighting the importance of verifying software functionality in computational tasks.
physical101
Messages
41
Reaction score
0
Hi there

I am trying to project some 3D points on to the span of two orthogonal vectors.

v1 = [ -0.1235 -0.9831 0.1352]
v2 = [ 0.7332 -0.1822 -0.6552]

I used the orthogonal projection formula

newpoint = oldpoint-dot(oldpoint,normal(v1,v2))*normal(v1,v2);

but when I plot it in MATLAB I don't get the points projected onto the plane.

Any ideas were I am going wrong?

Cheers

Duane
 
Mathematics news on Phys.org
Looks right to me. Have you inspected the intermediate results to see where it diverges from what you expect? (You could start with a simpler pair of vectors.) If still stuck, pls post the intermediate results.
 
Hi there,

Thank you for the reply. I went mental yesterday because I knew the math was right and subsequent calculations, such as the within plane angle, were all correct.

The problem I found was with matlabs quiver3 function. It wasn't plotting the vectors correctly and so in the end I made my own and plotted them using + points. Can't put that in a paper lol but at least it demonstrates what I was trying to do.

Thanks again for thinking about this

Duane
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Back
Top