       Re: Animation = Translation + Vibration, But How?

• To: mathgroup at smc.vnet.net
• Subject: [mg95192] Re: Animation = Translation + Vibration, But How?
• From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
• Date: Fri, 9 Jan 2009 06:24:39 -0500 (EST)

```Hi, Gidil,
there was a nice joke (though I would not take a risk of repeating it here)
ending up with a dialog: "But why?" "But how?". Did you mean it?  :-)

To be serious, why not to take a well-known solution of a cantilever and animate it? It will then at least
behave as it should.

See for instance, Landau, L. D. & Lifshitz, E. M. Theory of Elasticity (Pergamon Press, Oxford, 1986)
the chapter on bending of rods. Take the one with one end clumped, another loaded by a point force. You will
easily find it in problems to the chapter on small bending.

Just to give an example:

(* Begin of the example 1 *)
(* This is the solution I mean for a cantilever, length 1, clumped at its left end and *)
(* loaded by a force 0.1*Sin[t] at its another end *)

z[x_, t_] := x^2*(3 - x)*0.1*Sin[t];

(* This shows vibration of its free end. Play here with the option Thickness[n] *)
(* to display the rod as a rod, rather than a line *)

Animate[Plot[z[x, t], {x, 0, 1}, PlotStyle -> Thickness[0.02],
PlotRange -> {-1, 1}, Frame -> False, Ticks -> None,
Axes -> None], {t, 0, 10 Pi, 0.1}, Paneled -> False]

(* End of the example 1 *)

Try this. If you need to show a more complex motion you may again play with equation of motion of its left end
for which you can give any function.
For example, try this:

(* Begin of example 2 *)

(* this is the law of motion of the left end *)
x0[t_] := Cos[t/5];

(* This we already had in the previous example, but now the left end moves *)

z[x_, t_] := (x - x0[t])^2*(3 - (x - x0[t]))*0.1*Sin[t];

Animate[Plot[z[x, t], {x, x0[t], 1 + x0[t]},
PlotStyle -> Thickness[0.02], PlotRange -> {{-1, 2}, {-1, 1}},
Frame -> False, Ticks -> None, Axes -> None], {t, 0, 10 Pi, 0.1},
Paneled -> False]

(* End of Example 2 *)

You may want to attach any object to the oscillating cantilever end. Try this:

(* Begin of the example 3  *)

x0[t_] := Cos[t/5];
z[x_, t_] := (x - x0[t])^2*(3 - (x - x0[t]))*0.1*Sin[t];
Animate[Show[{Plot[z[x, t], {x, x0[t], 1 + x0[t]},
PlotStyle -> Thickness[0.02], PlotRange -> {{-1, 2.3}, {-1, 1}},
Frame -> False, Ticks -> None, Axes -> None],
Graphics[Disk[{x0[t] + 1, z[x0[t] + 1, t]}, 0.1]]}], {t, 0, 10 Pi,
0.1}, Paneled -> False]

(* End of the example 3 *)

.... and so on.

Finally, if you need to to have a self-standing movie, have a look into the today-posted discussion
Re: [mg95123]  Manipulate, Export, .avi, forward run without the slider in the...

Have fun  :-) , Alexei

GidiL wrote:

> Dear All!

>

> I created a cantilever in Mathematica (nothing fancy, a Graphics 3D

> object created with Polygon).

> The only thing that I want now is to simulate its movement. I thought

> it would be easy, but it's proving to be diabolically difficult.

> Boundary conditions: the cantilever should be fixed in one end, and

> allowed to oscillate in the other (the oscillations are predetermined

> by some simple trigonometric function).

> This system should be allowed to translate in space (a moving beam, so

> to speak).

> So it should be allowed to move in the X-Y plane and oscillate along

> the Z- axis.

>

> Moving it in the X-Y plane is accomplished with the Translate

> function. But how can I make it oscillate in a specific manner? How

> can I combine in one animation both movements?

>

> Any help would be greatly apprerciated,

>

> Gideon

--
Alexei Boulbitch, Dr., Habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.

```

• Prev by Date: Re: Manipulate, Export, .avi, forward run without the
• Next by Date: Re: Excel as a Front End for Mathematica?
• Previous by thread: Re: Animation = Translation + Vibration, But How?
• Next by thread: Transformation matrix