Re: Population simulations using SVG animation

Gavin,


On Sun, 2006-10-15 at 21:38 -0600, Gavin Kistner wrote:
> On Oct 13, 2006, at 9:05 AM, Philip Rhoades wrote:
> 
> > I want to be able to make the populations dynamic (changing for each
> > generation) which will affect the position and diameter of each circle
> > ie the sub-pops can be moving, growing & shrinking i.e. the circles  
> > are
> > animated.  This of course may also mean the fill colours would  
> > change if
> > the overlapping of the sub-pops changes.
> >
> > Could someone direct me to the most sensible way of coding this? - ie
> > direct me to some code that will animate one circle to begin with  
> > (size
> > and position).
> >
> 
> Check out the source SVG for: http://phrogz.net/svg/grusn.svgz
> (There's also a 2.4MB un-gzipped version here: http://phrogz.net/svg/ 
> grusn.svg)
> 
> See all the <animate> elements in the file. I don't have the circles  
> changing size or color (only position), but the SMIL syntax is very  
> similar and easy to extrapolate.
> 
> 
> Alternatively, write out a static SVG file and write out the results  
> of all your animations as data in JS embedded in the the SVG, and  
> have the JS control the SVG DOM. For a simple example: http:// 
> phrogz.net/svg/circleanim.svg
> 
> 
> Or, you could have JS controlling the SVG load the animation data  
> from a separate XML source. (Don't have a simple example showing  
> that, but it, you know, just coding. :)


Excellent!  Many thanks for all your help - I had made progress
animating one circle in position and size but only in constant
directions - I will study your stuff.

It looks like ECMASscript is Javascript - I would like to use Ruby if it
is possible but I will check this out.

Regards,

Phil.
-- 
Philip Rhoades

Pricom Pty Limited  (ACN 003 252 275  ABN 91 003 252 275)
GPO Box 3411
Sydney NSW      2001
Australia
Mobile:  +61:(0)411-185-652
Fax:     +61:(0)2-8221-9599
E-mail:  phil@pricom.com.au

Received on Monday, 16 October 2006 04:41:40 UTC