FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Responsive Form, Games
(Moderator: REAS)
   pull
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: pull  (Read 1092 times)
mmuday

WWW
pull
« on: Feb 26th, 2003, 4:36am »

With only a nod and a wink to Newtonian physics, I bring you... pull.
 
http://www.averagejackal.net/processing/pull/
 
Click and hold in the space to form your own instant pseudogravity well.  The motion is damped by sortafriction.
 
The particle outlines vary in hue and saturation with their velocity.
 
Have fun.
 
-Mark
 
benelek

35160983516098 WWW Email
Re: pull
« Reply #1 on: Feb 26th, 2003, 9:37am »

kewlies. what's happening with the particles being shot off faster than when they were pulled in?
 
benelek

35160983516098 WWW Email
Re: pull
« Reply #2 on: Feb 26th, 2003, 10:25am »

hehe, sorry. i've been off bushwalking too much
 
-jacob
 
mmuday

WWW
Re: pull
« Reply #3 on: Feb 26th, 2003, 2:26pm »

the attraction is inversely propotional to the distance from the attraction point, so you can get a real slingshot effect if the particles stray really close.  There may also be a math error there, either in the floating point calculations, or in my code.  I think I'll plead artistic license.
« Last Edit: Feb 26th, 2003, 2:28pm by mmuday »  
Glen Murphy

WWW Email
Re: pull
« Reply #4 on: Feb 27th, 2003, 1:28am »

In most gravity-based things, it's nice to make gravity 'not work' if the particle is within X units of the attractor. Stops the speed approaching infinity (and any potential divide by zero errors).
 
Pages: 1 

« Previous topic | Next topic »