Find a new ortonormal coordiante vectors with a point and vector given
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, for an university problem, I have to find a new tern with the origin in the point P1=[2 2 1], the z axis oriented along the vector N=[1 1 2] and with the x and y axes belonging to the plane passing through point P1 and identified from the normal N. I also have to make it's graphic representation, with red color for the x axis, green for y and blue for z. All that I can manage to do was using null space
clc;
clear all;
P1=[2 2 1];
N=[1 1 2];
VN=N/norm(N);
BVN=null(VN);
NV=[BVN(:,1) BVN(:,2) VN'];
8 Kommentare
Antworten (1)
Brahmadev
am 26 Sep. 2023
Hi Federico,
I understand that you would like to get two vectors normal to the given vector originating at P1 = [2 2 1] towards N = [1 1 2]. If we assume a random vector, say, towards N1 = [1 1 3] from P1, we can get their cross-product to find a vector that is normal to P1N. If we further take the cross-product of P1N and P1N1, we can get the third vector which will be normal to both these vectors. This can be chosen as our third co-ordinate axes.
Further, "quiver3" can be used to plot these vectors and it's "LineSpec" can be used to set the color or the lines as you mentioned.
You can refer to the following documentation to know more about “quiver3” function:
Hope this helps in solving your issue.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!