Animation to morph the SHAPE of an object

S

Steve House

Animating a shape to move around the screen or to fade in/out, etc, is easy
enough. But I'm trying to figure out how to animate a shape so that it
stays put but its shape and dimensions are what changes. Specifically, I
have a slide with a simple isosceles triangle set with its base horizontal
and its vertex pointing up. When the object is selected, there's a little
yellow diamond - don't know the correct term for it - that one can drag to
move that vertex left or right without moving the base. Of course one can
also click and drag the top centre sizing handle to make the triangle taller
or shorter. So what I'm trying to do is this - on a mouse click the top
vertex will smoothly move to the right and down so the triangle "morphs"
from an isosceles triangle into a right triangle with a vertical right side.
In other words, I want to vertex to shift to the right and down while
leaving the rest of the base of the triangle unchanged. Any ideas how to
accomplish this other than a stacked series of triangles that fade into each
other as hand-built animation frames?

Steve House
 
J

Jeff Chapman

Steve - It's possible to adjust that little yellow diamond
(I think they call it the "adjustment handle")
on your triangle using a macro. However, what you're talking
about is dynamically adjusting that yellow dimaond, to morph
the shape of the triangle, right? I don't think there is a custom
animation in PPT 2000 or in 2002 that can do this for you,
but it can be done using VBA, if you're willing to take the time
to mess with it.
The code you can use to change the position of that little yellow
diamond for the active shape is
ActiveWindow.Selection.ShapeRange.Adjustments.Item(1) =
[position of adjustment handle]

You would have to build in a series of timings into your code,
however, to smoothly change the adjustment handle. Maybe
someone else here with a greater knowledge of VBA can assist
you. If you get it working, let us know - sounds like an
interesting challenge!

Jeff Chapman
 
S

Steve House

Sounds like on the right track, but I notice the code is addressing a
selected object. That would mean we're in the editing mode, right? I want
to do this at runtime while presenting a show and so there would be no
selected object. The same idea could be used to have a stick figure that
waves at the audience or trees swaying in the breeze some such animation. I
know I can do it with an animated GIF but I'm looking for an easier way,
something that doesn't require me to hand create all the intermediate frames
one by one.
..


Jeff Chapman said:
Steve - It's possible to adjust that little yellow diamond
(I think they call it the "adjustment handle")
on your triangle using a macro. However, what you're talking
about is dynamically adjusting that yellow dimaond, to morph
the shape of the triangle, right? I don't think there is a custom
animation in PPT 2000 or in 2002 that can do this for you,
but it can be done using VBA, if you're willing to take the time
to mess with it.
The code you can use to change the position of that little yellow
diamond for the active shape is
ActiveWindow.Selection.ShapeRange.Adjustments.Item(1) =
[position of adjustment handle]

You would have to build in a series of timings into your code,
however, to smoothly change the adjustment handle. Maybe
someone else here with a greater knowledge of VBA can assist
you. If you get it working, let us know - sounds like an
interesting challenge!

Jeff Chapman


Steve House said:
Animating a shape to move around the screen or to fade in/out, etc, is easy
enough. But I'm trying to figure out how to animate a shape so that it
stays put but its shape and dimensions are what changes. Specifically, I
have a slide with a simple isosceles triangle set with its base horizontal
and its vertex pointing up. When the object is selected, there's a little
yellow diamond - don't know the correct term for it - that one can drag to
move that vertex left or right without moving the base. Of course one can
also click and drag the top centre sizing handle to make the triangle taller
or shorter. So what I'm trying to do is this - on a mouse click the top
vertex will smoothly move to the right and down so the triangle "morphs"
from an isosceles triangle into a right triangle with a vertical right side.
In other words, I want to vertex to shift to the right and down while
leaving the rest of the base of the triangle unchanged. Any ideas how to
accomplish this other than a stacked series of triangles that fade into each
other as hand-built animation frames?

Steve House
 
B

B

Something like this would be simplest, I'd think.

Sub MovePoint(oShp As Shape)
StartingPoint = oShp.Adjustments.Item(1)
For AdjLoc = StartingPoint To 0 Step -0.003
oShp.Adjustments.Item(1) = AdjLoc
DoEvents
Next AdjLoc
End Sub

Goal: When a shape (point up triangle) is clicked on, change it into a
right triangle by moving the point to the left.

This takes a couple of seconds on the dinosaur here at work, you'll need to
adjust the step value to make the timing right for your use. Oh, and don't
forget to assign the macro to the shape with action settings on mouse click.

B


Steve House said:
Sounds like on the right track, but I notice the code is addressing a
selected object. That would mean we're in the editing mode, right? I want
to do this at runtime while presenting a show and so there would be no
selected object. The same idea could be used to have a stick figure that
waves at the audience or trees swaying in the breeze some such animation. I
know I can do it with an animated GIF but I'm looking for an easier way,
something that doesn't require me to hand create all the intermediate frames
one by one.
.


Jeff Chapman said:
Steve - It's possible to adjust that little yellow diamond
(I think they call it the "adjustment handle")
on your triangle using a macro. However, what you're talking
about is dynamically adjusting that yellow dimaond, to morph
the shape of the triangle, right? I don't think there is a custom
animation in PPT 2000 or in 2002 that can do this for you,
but it can be done using VBA, if you're willing to take the time
to mess with it.
The code you can use to change the position of that little yellow
diamond for the active shape is
ActiveWindow.Selection.ShapeRange.Adjustments.Item(1) =
[position of adjustment handle]

You would have to build in a series of timings into your code,
however, to smoothly change the adjustment handle. Maybe
someone else here with a greater knowledge of VBA can assist
you. If you get it working, let us know - sounds like an
interesting challenge!

Jeff Chapman


Steve House said:
Animating a shape to move around the screen or to fade in/out, etc, is easy
enough. But I'm trying to figure out how to animate a shape so that it
stays put but its shape and dimensions are what changes.
Specifically,
drag
to into
each
 
S

Steve House

Getting close to what I'm looking for. Where do I find info on mask based
animation? What I've done is create a series of triangles as frames for the
transition, starting with isoceles and ending with a right triangle. Only
the first is visible when the slide opens. A click triggers it to fade out
and the next in line has an animated entrance of fade in, triggered to occur
simultaneously with the previous event. When the entrance event ends it
immediately exits with a fade out and the next fades in, etc etc Is the
what you refer to as "mask animation?"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top