| Description |
h=vector3d(X,Y,Z,U,V,W,'Property','Value',...)
Plot 3d vectors (real 3d) from .stl file to specified location and direction.
basically same usage as quiver3. Property/value pairs are passed to patch.
Some additional property/values are available:
h=vector3d(...,'FileName',file) : string arry with name of .stl file (for example 'arrow4.stl').
h=vector3d(...,'Scale',[sx sy sz]) : scales along the x-axis by sx, along the y-axis by sy, and along the z-axis by sz. If scalar, Vectors are scaled uniformly.
h=vector3d(...,'MaxVert',nmax) : Maximum number of vertices per vector. Lower this value if many vectors have to be plotted. Default is 200.
h=vector3d(...,'Lighting','gouraud') : Sets both, edge and face lighting. Default is flat lighting
h=vector3d(...,'Color',rgb) : Sets face and edge color to specified color (indexed or true rgb). When omitted the vector length and current colormap are used.
h=vector3d(...,'ColorMap',cmap) : sets the colormap to cmap for plotting. Minimum (but non-zero) and maximum data are mapped to the interval [0 1].
h=vector3d(...,'LightDirection',[x y z]) : Adds a infinite light to the axes with specified position [x y z]
Example:
[X,Y,Z]=sphere(20);
[U,V,W] = surfnorm(X,Y,Z);
surf(X,Y,Z);
hold on
h=vector3d(X,Y,Z,U,V,W,'FileName','arrow2.stl','Scale',0.25,'Lighting',...
'gouraud','ColorMap','jet','LightDirection',[-1 -1 1]) |