Name

quiver3 — 3D vector field plot on 3D surface

Calling Sequence

hdl = quiver3(X,Y,Z,U,V,W,fact)

Parameter

X

1 by n matrix or n by n matrix

Y

1 by n matrix or n by n matrix

Z

n by n matrix

U

n by n matrix

V

n by n matrix

W

n by n matrix

fact

scalar

hdl

Handle of the created Fac3d entity

Description

quiver3(X,Y,Z,U,V,W) plots vector field with cartesian coordinaes (U,V,W) defined on a parametric or non parametric surface defined by (X,Y,Z) (see e.g. surf for a discussion about the relative sizes of X,Y and Z). The vectors are automatically scaled to fit in the grid defined by X and Y.

The last argument 'fact' is a scale factor for the vectors, if you want to change the length of vectors. If you don't want any scaling at all, use fact=0.

Examples

[X,Y]=meshgrid(-2:0.2:2,-1:0.2:1);
Z=cos(X.*Y);
surf(X,Y,Z);
hold on
[U,V,W] = surfnorm(X,Y,Z);
quiver3(X,Y,Z,U,V,W,'r');
legend 'Surface normals'
colormap gray
hold off

Screenshot

See Also

quiver , surf

Authors

Stéphane Mottelet