| Contents | Index |
plot::Arrow2d([x1, y1], [x2, y2]) creates a 2D arrow from the point
to the point
.
plot::Arrow2d([x2, y2]) creates a 2D arrow from the point
to the point
.
plot::Arrow3d([x1, y1, z1], [x2, y2, z2]) creates a 3D arrow from the point
to the point
.
plot::Arrow3d([x2, y2, z2]) creates a 3D arrow from the point
to the point
.
Calls:
plot::Arrow2d(<[x1, y1]>, [x2, y2], <a = amin .. amax>, Options)
plot::Arrow3d(<[x1, y1, z1]>, [x2, y2, z2], <a = amin .. amax>, Options)
Parameters:
|
x1, y1, z1: |
the coordinates of the starting point: real numerical values or arithmetical expressions of the animation parameter a. If no starting point is specified, an arrow starting at the origin is created. |
|
x2, y2, z2: |
the coordinates of the end point: real numerical values or arithmetical expressions of the animation parameter a. |
Related Domains:
plot::Line2d, plot::Line3d, plot::VectorField2d
Related Functions:
Details:
The points defining an arrow can also be passed as vectors.
The appearance of arrows can be controlled by various attributes:
Example 1
We create and plot some arrows:
plot(plot::Arrow2d([1, 1]), plot::Arrow2d([1, 3]),
plot::Arrow2d([1, 1], [1, 3]))

Various attributes are available to control the presentation style of an arrow:
plot(plot::Arrow2d([1, 1], Color = RGB::Red,
TipStyle = Open, TipLength = 10*unit::mm),
plot::Arrow2d([-1, 1], Color = RGB::Green,
LineWidth = 0.8*unit::mm,
TipStyle = Closed, TipAngle = PI/2),
plot::Arrow2d([0, -sqrt(2)], Color = RGB::Blue,
LineStyle = Dashed),
Axes = None)

Here are corresponding arrows in 3D:
plot(plot::Arrow3d([1, 1, 0], Color = RGB::Red,
TipStyle = Open, TipLength = 10*unit::mm),
plot::Arrow3d([-1, 1, 0], Color = RGB::Green,
LineWidth = 0.8*unit::mm,
TipStyle = Closed, TipAngle = PI/2),
plot::Arrow3d([0, -sqrt(2), 0], Color = RGB::Blue,
LineStyle = Dashed),
CameraDirection = [0, -1, 1000])

We use Tubular = TRUE:
plot(plot::Arrow3d([1, 1, 0], Color = RGB::Red,
TipLength = 10*unit::mm),
plot::Arrow3d([-1, 1, 0], Color = RGB::Green,
TubeDiameter = 1.5*unit::mm,
TipAngle = PI/2),
plot::Arrow3d([0, -sqrt(2), 0], Color = RGB::Blue),
Tubular = TRUE, CameraDirection = [0, -1, 1000])

Example 2
We plot an arrow with fixed starting point and animated end point:
plot(plot::Circle2d(2, [1, 2]),
plot::Arrow2d([1, 2], [1 + 2*cos(a), 2 + 2*sin(a)],
a = 0..2*PI))



Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |