skupers
1st November 2003 18:19 UTC
Electromagnetic Demo (for AVS2.70)
This demo uses global vars to simulate the movement of a charged particle in promixity to two other particles: a postively charged one and negatively charged one.
In this preset, the positive one is red and the negative one is green. Using vector addition the white particle is moved around. I also made three scopes which draw the different components of the vector.
Everything in the preset is customizable in the first 'control scope': the movement of the two charged particles, their charge and the charge of the white particle.
You'll also need Texer II.
The next challenge will be to make this work in 3d.
NemoOrange
1st November 2003 18:41 UTC
Neat stuff, but why does the white particle sometimes just automatically shift to another location?
NemoOrange
1st November 2003 18:42 UTC
oh, I guess once it reaches the green particle, it resets.
skupers
1st November 2003 22:03 UTC
Yes, because otherwise the next frame c1a and c2a will be divided by 0 and then the scope goes crazy.
horse-fly
2nd November 2003 11:12 UTC
i don't understand what exactly i am looking at... what is the white dot doing in accordance to red and green?
edit: oh... ok i get it
Deamon
2nd November 2003 12:34 UTC
Nice coding job.
gaekwad2
2nd November 2003 20:05 UTC
Couldn't you make it so that when the white particle hits the green one it gets a negative charge and thus gets attracted to the red particle, then you wouldn't have to reset it.
Deamon
2nd November 2003 21:30 UTC
or that is explodes :) I like explosions.
horse-fly
2nd November 2003 21:58 UTC
hooray for explosions that don't makes sense