|
Author |
Topic: pull (Read 1092 times) |
|
mmuday
|
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
|
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
|
Re: pull
« Reply #2 on: Feb 26th, 2003, 10:25am » |
|
hehe, sorry. i've been off bushwalking too much -jacob
|
|
|
|
mmuday
|
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
|
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).
|
|
|
|
|