Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: "particle" sliding along a curve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70535] Re: "particle" sliding along a curve
  • From: dimmechan at yahoo.com
  • Date: Thu, 19 Oct 2006 03:21:45 -0400 (EDT)
  • References: <eh4pd9$8j8$1@smc.vnet.net>

Here I provide you one example of how you can work.

It is based on David Park's solution to one old post of mine
regarding delta sequences.

The advice that follows are also from him and they appeard in
private communication

(THANKS DAVID!!!)

Needs["Graphics`"]

Do[Plot[x^2, {x, -10, 10}, Frame -> {True, True, False, False},
FrameTicks -> {Range[-10, 10, 2.5], Range[0, 100, 20]},
   PlotRange -> {{-10.001, 10.001}, {-2., 100.2}}, Axes -> False,
PlotLabel -> StringJoin["an animation", "\n--------"],
   FrameLabel -> {"x", "\!\(x\^2\)"}, TextStyle -> {FontFamily ->
"Times", FontSize -> 14},
   Epilog -> {{Hue[(i + 4)/13], Text[StyleForm["watch the particle\n
 as it moves \nit changes color", FontWeight -> "Bold",
        FontSlant -> "Italic", FontSize -> 12], {i, i + 50}]}, {Hue[(i
+ 4)/13], PointSize[0.02], Point[{i, i^2}]}},
   ImageSize -> 600], {i, -5, 5, 0.1}]
SelectionMove[EvaluationNotebook[], All,
GeneratedCell]*FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5];
FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime ->
0.1, AnimationDirection -> ForwardBackward]}]

In the Animate statement I have added commands that select the
generated frames, close them up and start the animation.

In viewing an animation like this it is useful to know that you can use
the keyboard to step through the animation.This is often the best way
to view an animation.1) The up/down arrow keys will allow you to
advance one frame at a time.2) The right/left arrow keys will put in
animation into the forward or backward direction.3) The number keys
will control the speed of the animation.4)'p' will pause and restart
the animation.5)'c' will restart the animation in the forward-backward
mode.

For more information regarding the manipulations of notebooks and the
Front End
I highly recomend you

"The Beginner's Guide To Mathematica, Version 4.0" by J. Glynn & T.
Gray
(Campridge University Press 2000).

Regards
Dimitris


  • Prev by Date: Re: Infinity vs DirectedInfinity[1]
  • Next by Date: Re: Infinity vs DirectedInfinity[1]
  • Previous by thread: Re: "particle" sliding along a curve
  • Next by thread: "particle" sliding along a curve