Filter löschen
Filter löschen

How to draw unit normal vector?

20 Ansichten (letzte 30 Tage)
Dinh Le Dung
Dinh Le Dung am 30 Aug. 2022
Kommentiert: Torsten am 30 Aug. 2022
I have done all , except for the part plot unit normal vector.
Could you help we solving it, thanks a lot <3
  1 Kommentar
Torsten
Torsten am 30 Aug. 2022
quiver3(x0,y0,z0,x0*(1+1/norm([x0,y0,z0])),y0*(1+1/norm([x0,y0,z0])),z0*(1+1/norm([x0,y0,z0])))

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Matt J
Matt J am 30 Aug. 2022
Bearbeitet: Matt J am 30 Aug. 2022
Does the normal vector have to look like an arrow? If not, then with [nx,ny,nz] as the unit normal, you could do,
line([x0,x0+nx], ...
[y0,y0+ny],
[y0,y0+nz])

Matt J
Matt J am 30 Aug. 2022
Bearbeitet: Matt J am 30 Aug. 2022
Once you've plotted the sphere and plane, then with [nx,ny,nz] as the unit normal,
hold on
quiver3(x0,y0,z0, nx,ny,nz);
hold off

Kategorien

Mehr zu Lighting, Transparency, and Shading 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!

Translated by