From
, To
, FromX
, FromY
, FromZ
, ToX
, ToY
, ToZ
Starting point of arrows and lines
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
From  Library wrapper for “[FromX , FromY ]” (2D), “[FromX , FromY , FromZ ]”
(3D)  List of 2 or 3 expressions, depending on the dimension 
To  Library wrapper for “[ToX , ToY ]” (2D), “[ToX , ToY , ToZ ]”
(3D)  List of 2 or 3 expressions, depending on the dimension 
FromX , FromY , FromZ , ToX , ToY , ToZ  Mandatory  MuPAD^{®} expression 
Objects  Default Values 

plot::Arrow2d , plot::Line2d 

plot::Arrow3d , plot::Line3d 

plot::Reflect2d 
The vectors From
and To
determine
the starting point and the end point, respectively, of arrows and
lines.
From
is a vector determining the position
of the starting point of arrows and lines. Depending on the dimension,
it is given by a list or vector of 2 or 3 components.
FromX
etc. refer to the x, y, z components
of this vector.
To
is a vector determining the position of
the end point of arrows and lines. Depending on the dimension, it
is given by a list or vector of 2 or 3 components.
To
etc. refer to the x, y, z components
of this vector.
The values of these attributes can be animated.
We define an arrow:
p := plot::Arrow2d([0, 0], [1, 2]): plot(p):
The arguments are the starting point and the end point of the
arrow. Internally, they are stored as the attributes From
and To
.
We can access the object's attributes and change them:
p::From, p::To
p::From := [1, 0]: p::To := [0, 1]: plot(p):
delete p:
The values of From
and To
can
be animated. Here is a simple clock:
plot(plot::Circle2d(1, [0, 0], Color = RGB::Black), plot::Line2d([0.9*cos(a*PI/6), 0.9*sin(a*PI/6)], [1.0*cos(a*PI/6), 1.0*sin(a*PI/6)], Color = RGB::Black, LineWidth = 0.8*unit::mm) $ a = 0 .. 11, plot::Line2d([0.95*cos(a*PI/30), 0.95*sin(a*PI/30)], [1.0*cos(a*PI/30), 1.0*sin(a*PI/30)], Color = RGB::Black, LineWidth = 0.5*unit::mm) $ a = 0 .. 59, plot::Arrow2d([0, 0], [0.85*sin(12*a), 0.85*cos(12*a)], a = 0 .. 2*PI, LineWidth = 2*unit::mm), plot::Arrow2d([0, 0], [0.6*sin(a), 0.6*cos(a)], a = 0 .. 2*PI, LineWidth = 3*unit::mm), Axes = None, Frames = 600, TimeRange = 0..120):