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: Graphics--combining graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66137] Re: [mg66108] Graphics--combining graphics
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Sun, 30 Apr 2006 04:22:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

> I am trying to create an animation of a piecewise function.  
> I have a graph of a ball rolling and I would like to combine 
> an animation for one equation of motion for the first part 
> with another equation for the second part of the motion.  It 
> is easy enough to create the two animations individually, 
> however I am stumped on how to combine them into one 
> continuous animation. 
> Link to the forum page for this post:
> http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?
> pageName=Special:Forum_ViewTopic&pid=10007#p10007
> Posted through http://www.mathematica-users.org [[postId=10007]]

Without access to some code, it's difficult to answer in anything other than
generalities but the way I'd approach this is to produce a list of images as
in ...

Img = (If[# < somevalue,
		code to produce motion for first part,
            code to produce motion for second part
		]
	)& /@ Range[timevalues]

Another way to look at this is to write your separate animations to two
separate lists (say a1 & a2), join those lists (to form say a3) to for a
single list list which contains all your images.  You can then display this
list (Show[#]& /@ a3) and animate the cell (using Control-Y).

I also suggest looking at the ElasticCollision notebook on Dave Park's web
site (http://home.earthlink.net/~djmp/Mathematica.html) as an excellent
example along the lines of what I think you're trying to do.

Regards,

Dave.


  • Prev by Date: Re: Graphics--combining graphics
  • Next by Date: Re: Why D[x', x] isn't 0 ?
  • Previous by thread: Re: Graphics--combining graphics
  • Next by thread: Re: Graphics--combining graphics