animation based on math in PP

J

JanAdam

Is it possible to make an animation based on a math equation for a curve in
Power Point?

Suppose we have a horizontal rectangle. We have points A(x1,y1) on the left
and B(x2,y1) on the right side of the rectangle. Can we connect points A and
B with a curve given by a function, say of the type
y=a*sin(g*x(t)) + b*cos(h*x(t))
(where a, b, g, and h are constants and t is a variable to be incremented in
a loop) and fill the upper and lower parts (above and below the curve) with
different colors?

In another words:

(question 1) can draw a curve following a math formula and

(question 2) if so, will the curve close a shape formed by a part of the
rectangle and the curve such that the upper and lower parts of the rectangle
could be filled with different colors.

Finally, the most important (question 3): is it possible that a piece of
code incrementing t and updating the shape is executed, such that an
animation is created with the line oscillating in the slide show mode?

I feel competent with the math involved and am somehow familiar with VBA. My
questions are if things like that are possible in PP and if so, where should
I look for more info. If anybody could direct me to a book, web site or
whatever, I will appreciate it very much.

Thanks,
 
D

David M. Marcovitz

If you can calculate it, VBA can do it, but I doubt it is going to be
easy. You might want to explore something like AddCurve as in:

ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddCurve

to add a curve to the current slide. It will need some an array of points
to draw the curve (calculated by your advanced mathematical formulas).
Once it is in place, it can be filled.

For question 3, you could have some code that loops and adds a curve,
waits a short time, deletes the curve, and adds another. This might do
what you want.

--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
J

JanAdam

Thanks David,

I will check it out. Do you by a chance know if the varArr in
AddCurve(varArr) is to be defined as varArr(1 to 2, 1 to 151) or varArr(1 to
151, 1 to 2), assuming 50 Bezier segments on the curve?

Thanks again, JanAdam

PS. any other ideas anybody?
 
D

David M. Marcovitz

Sorry, I don't know. For AddCurve, my knowledge is no more extensive than
what is in the Help (just type AddCurve into the VBA Editor Help, and
you'll get something). This seems very specialized, so I wouldn't assume
that anyone in this group has done this before, but I'm hoping someone
more knowledgeable pipes in with a good answer to all your questions.
--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
J

JanAdam

Thanks Gentlemen,

I think I can make it work. I can add a curve OK and it looks I can do it in
a loop. I have to slow it down otherwise the animation is too fast. Have to
find a pause or timer function and I remember seeing one so hopefully I can
do this.

I have another problem. The curve I am adding does not divide the rectangle
into two separate shapes, or I do not know how to make it to do so. It starts
and ends on the rextangle sides to a pixel. I have thus two shapes: the
rectangle and the curve. I would like to have two different shapes the bottom
part of the rectangle to the curve and the upper part, such that I can fill
them with different colors.

Any suggestions?

JanAdam
 
J

JanAdam

Thanks Steve again. I will try the Sleep.

To the curve: I cannot do it free hand. It is sort of a simulation and the
math behind the curve is exact.

Imagine I want to show vibrations of a string, the base tone plus some
harmonics, decaying with different time scales. Not exactly my goal but close
enough in general principle. But I can get away without the fills, although
it would be nicer to have them.

JanAdam
 

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