Scaling of 3D objects

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


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


plot::Scale3d([sx, sy, sz], objects) applies the scaling transformation with the diagonal matrix A = diag(sx, sy, sz) to 3D 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.


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, 1]
ScaleXscaling factor in x-direction1
ScaleYscaling factor in y-direction1
ScaleZscaling factor in z-direction1
TimeEndend time of the animation10.0
TimeBeginstart time of the animation0.0
TimeRangethe real time span of an animation0.0 .. 10.0


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))

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:


sx, sy, sz

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

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

obj1, obj2, …

Arbitrary plot objects of the appropriate dimension


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?