| Contents | Index |
creates a 2D line segment between the points
and
.
creates a 3D line segment from
to
.
Calls:
plot::Line2d([x1, y1], [x2, y2], <a = amin .. amax>, Options)
plot::Line3d([x1, y1, z1], [x2, y2, z2], <a = amin .. amax>, Options)
Parameters:
|
x1, y1, z1: |
the coordinates of one end point: real numerical values or arithmetical expressions of the animation parameter a. |
|
x2, y2, z2: |
the coordinates of the other end point: real numerical values or arithmetical expressions of the animation parameter a. |
See Also:
plot, plot::copy, plot::Polygon2d, plot::Polygon3d, plot::Rectangle
Details:
The end points may be passed as lists or vectors.
Example 1
We create a 2D line segement:
plot(plot::Line2d([1, 2], [3,-1]))

The LineStyle can be changed from Solid, as is the default, to Dashed or Dotted. Likewise LineColor and LineWidth can be set explicitly:
plot(plot::Line2d([1, 2], [3, -1],
LineStyle = Dashed,
LineWidth = 2.5*unit::mm,
LineColor = RGB::Green))

Example 2
We plot two animated 3D line segements starting off parallel, ending up skew:
plot(plot::Line3d([0, 0, 0], [a, a, 1], a = 0..1),
plot::Line3d([1, 0, 0], [a, 0, 1], a = 1..0))


In addition to LineStyle, LineColor and LineWidth, 3D line segments support the style option Tubular. If this is set to TRUE, the TubeDiameter can be set explicitly:
plot(plot::Line3d([0.1, 0, 0], [1, 0, 0]),
plot::Line3d([0, 0.1, 0], [0, 1, 0]),
plot::Line3d([0, 0, -0.1], [0, 0,-1]),
ViewingBox = [-0.2..1.2, -0.2..1.2, -1..0.2],
Tubular = TRUE, TubeDiameter = 5.0*unit::mm)


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 |