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
`AffectViewingBox`influence of objects on the `ViewingBox` of a scene`TRUE`
`Frames`the number of frames in an animation`50`
`Name`the name of a plot object (for browser and legend)
`ParameterEnd`end value of the animation parameter
`ParameterName`name of the animation parameter
`ParameterBegin`initial value of the animation parameter
`ParameterRange`range of the animation parameter
`Scale`scaling factors[`1`, `1`]
`ScaleX`scaling factor in x-direction`1`
`ScaleY`scaling factor in y-direction`1`
`TimeEnd`end time of the animation`10.0`
`TimeBegin`start time of the animation`0.0`
`TimeRange`the real time span of an animation`0.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.