We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Gravity Trails
Page Index Toggle Pages: 1
Gravity Trails (Read 3021 times)
Gravity Trails
Jul 30th, 2007, 12:14am
 
This code is terribly simple, but hypnotic. 4 particles are created in 3-D space (the visualization is a 2-D projection), and all interact gravitationally (using the traer physics library) with one another. Each particle traces out a coloured trail, and each is connected to all the rest by a straight line. Simple, but the end results are beautiful:

http://quark.physics.uwo.ca/~sdevet/GravityTrailForces3D/


This is an earlier version, 10 particles in 2-D, with only the particles tracing out paths. Also pretty:

http://quark.physics.uwo.ca/~sdevet/GravityTrail/

Re: Gravity Trails
Reply #1 - Aug 15th, 2007, 3:34pm
 
So awesome. Is that entirely mathematical? I'd love to try and modify it and use it for a game background. I'm not sure what kind of effect it has on the resources.

Would it be possible to have the game input effect the parameters of the trails? So say you're doing poorly the trails slow and become colourless.

Seems so perfect.
Re: Gravity Trails
Reply #2 - Aug 15th, 2007, 3:41pm
 
Yes, they're both completely physical and mathematical. The only random element is the initial position and velocity of the particles (and the colours).

I don't know how resource intensive it is. I used the Traer physics package, but it could probably be rewritten from scratch for this particular, simplified task.

Making any of the parameters dependent on some external factor would be pretty easy to do.
Re: Gravity Trails
Reply #3 - Sep 6th, 2007, 11:01am
 
nice, hope I get the time to understand it.
Re: Gravity Trails
Reply #4 - Sep 6th, 2007, 2:42pm
 
Really nice!
I made something similar a while ago, with user interaction:
http://seltar.org/sketch.php?pid=42

But yours was very nice indeed Smiley
Re: Gravity Trails
Reply #5 - Oct 18th, 2007, 4:36am
 
I really like this! Giving me some ideas.
Re: Gravity Trails
Reply #6 - Oct 19th, 2007, 12:15pm
 
very nice!

simple rules and great result : well done! Smiley
Page Index Toggle Pages: 1