Skip to Main Content Skip to Search
Product Documentation

VisibleBeforeBeginobject visible before its animation time starts?

VisibleAfterEndobject visible after its animation time ended?

VisibleBeforeBegin, VisibleAfterEnd determine the visibility of an object before the begin and after the end of its own animation time span, respectively.

→ Examples

Attribute

Type

Value

See Also:

Frames, ParameterBegin, ParameterEnd, ParameterName, ParameterRange, TimeBegin, TimeEnd, TimeRange, VisibleAfter, VisibleBefore, VisibleFromTo

Details:

Example 1

In the first 5 seconds of the following animation, the sine function draws itself. Afterwards, a point wanders along the graph:

f := plot::Function2d(sin(x), x = -PI..a, a = -PI..PI,
                      TimeRange = 0..5):
p := plot::Point2d(a, sin(a), PointSize = 5*unit::mm,
                   a = -PI..PI, TimeRange = 5..10):
plot(f, p)

MuPAD graphicsimage

The point is visible for the first 5 seconds, too, because it used the default setting VisibleBeforeBegin = TRUE. With VisibleBeforeBegin = FALSE, the point is invisible at the start of the animation. It appears after 5 seconds, when its own animation begins:

p::VisibleBeforeBegin := FALSE:
plot(f, p)

MuPAD graphicsimage

delete p, f:

Example 2

The plot::Polar object in the following animation is only visible in its TimeRange from the 3rd to the 7th second:

Speaker :=
     plot::Polygon2d([[0.5, -1], [0.5, 1], [0, 0.3],
                     [-0.5, 0.3], [-0.5, -0.3], [0, -0.3],
                     [0.5, -1]], Color = RGB::Black, Filled):
Point := plot::Point2d([2, a], a = -2.5..2.5,
                       PointSize = 3*unit::mm):

plot(plot::Polar([1 + 0.1*(2 + sin(20*a))*cos(20*phi), phi],
                 phi = -1..1, a = 0..3, TimeRange = 3..7,
                 VisibleBeforeBegin = FALSE,
                 VisibleAfterEnd = FALSE),
     Speaker, Point, Axes = None)

MuPAD graphicsimage

The previous command is equivalent to:

plot(plot::Polar([1 + 0.1*(2 + sin(20*a))*cos(20*phi), phi],
                 phi = -1..1, a = 0..3, VisibleFromTo = 3..7),
     Speaker, Point, Axes = None)

MuPAD graphicsimage

delete Speaker, Point:

Example 3

A circle is tumbling around in 3D. After 3 seconds, a growing sphere becomes visible. From the 5th second through to the end of the animation, the sphere stays visible with the constant radius 5, while the circle moves further out:

plot(plot::Circle3d(4, [sin(a), cos(a), a],
                    [sin(a), cos(a), a], a = 0..10,
                    Frames = 100, TimeRange = 0..10,
                    Filled = TRUE, FillColor = RGB::Blue),
     plot::Sphere(a, [0, 0, 0], Color=RGB::Red,
                  a = 3..5, TimeRange = 3 .. 5, Frames = 20,
                  VisibleBeforeBegin = FALSE)):

MuPAD graphicsimage

  


Recommended Products

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