plot::Scale2d

Scaling of 2D objects

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

plot::Scale2d([sx, sy], obj1, <obj2, …>, <a = amin .. amax>, options)

Description

plot::Scale2d([sx, sy], objects) applies the scaling transformation with the diagonal matrix A = diag(sx, sy) to 2D objects.

Scale objects can scale several graphical objects simultaneously. Plotting the scale object renders all graphical objects inside.

Transformation objects can be used inside scale objects. If they are animated, the animations run simultaneously.

Animated scale objects are rather "cheap" concerning computing and storing costs. For more complex graphical objects, it is more efficient to use an animated scale object than to redefine the object for each frame.

The function op allows to extract the graphical objects inside a scale object.

Attributes

AttributePurposeDefault Value
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
Framesthe number of frames in an animation50
Namethe name of a plot object (for browser and legend) 
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
Scalescaling factors[1, 1]
ScaleXscaling factor in x-direction1
ScaleYscaling factor in y-direction1
TimeEndend time of the animation10.0
TimeBeginstart time of the animation0.0
TimeRangethe real time span of an animation0.0 .. 10.0

Examples

Example 1

A scaling transformation turns a sphere into an ellipsoid:

plot(plot::Scale3d([1 + 3*a, 1 + 2*a, 1 + a], 
                   plot::Sphere(1, [0, 0, 0]),
                   a = 0..1))

We plot a (southern) hemisphere and two scaled copies:

A0 := plot::Spherical([1, u, v], u = 0..2*PI, v = PI/2 .. PI):
A1 := plot::Scale3d([0.5, 0.4, 0.5], A0):
A2 := plot::Scale3d([0.2, 0.3, 0.2], A0):
plot(A0, A1, A2, CameraDirection = [-1, -2, 2.5]):

delete A0, A1, A2:

Parameters

sx, sy

The scaling factors: numerical real values or arithmetical expressions of the animation parameter a.

sx, sy are equivalent to the attributes Scale, ScaleX, ScaleY.

obj1, obj2, …

Arbitrary plot objects of the appropriate dimension

a

Animation parameter, specified as a = amin..amax, where amin is the initial parameter value, and amax is the final parameter value.

Was this topic helpful?