Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: squidgetx on February 22, 2011, 06:04:07 pm

Title: Electric Field Sim
Post by: squidgetx on February 22, 2011, 06:04:07 pm
So in physics we were supposed to be doing a predict-the-electric-field activity, but instead I decided to spend the time writing a program that could do it for me (Axe). I think it's not too shabby, but if someone could help me fine-tune the accuracy of it a bit? In some situations it behaves oddly. Source (Axe) is in prgmA0E.

Controls:
2nd: place positive charge
Alpha: place neg. charge
Enter: advance scenario
Title: Re: Electric Field Sim
Post by: Happybobjr on February 22, 2011, 07:48:14 pm
I read electric fan Sim :O

This is much better than an electric fan.

(I think the jumping is because some number keeps wrapping around between 'a really big number' and 0)
Title: Re: Electric Field Sim
Post by: Darl181 on February 22, 2011, 08:59:49 pm
Wow, this is pretty cool.
What's wrong with it, though?  Is it just he accuracy, or is there something else?
Title: Re: Electric Field Sim
Post by: Deep Toaster on February 22, 2011, 09:31:30 pm
So in physics we were supposed to be doing a predict-the-electric-field activity, but instead I decided to spend the time writing a program that could do it for me (Axe). I think it's not too shabby, but if someone could help me fine-tune the accuracy of it a bit? In some situations it behaves oddly. Source (Axe) is in prgmA0E.

Wow, awesome. Some attraction cases look off, though?
Title: Re: Electric Field Sim
Post by: squidgetx on February 23, 2011, 03:23:46 pm
Ok, I fixed a few of the problems. The program still flips out once a test charge meets with a negative charge (I suspect a divide by 0 leading to a velocity change of 65535, but I haven't been able to fix it). Also I changed the graphics and fixed something that was wrong with one of the formulas before.
Title: Re: Electric Field Sim
Post by: ztrumpet on February 23, 2011, 04:12:21 pm
Make sure to cap the max speed of the vars at whatever you're inflating it to.  That way, it can only move a max of one pixel per frame. :)
Other than that, it looks nice! ;D
Title: Re: Electric Field Sim
Post by: Builderboy on February 23, 2011, 06:30:15 pm
Another thing that might be interesting to make is have you place charges, and then it draws the electric field lines or something :D
Title: Re: Electric Field Sim
Post by: Deep Toaster on February 24, 2011, 10:14:58 am
Ok, I fixed a few of the problems. The program still flips out once a test charge meets with a negative charge (I suspect a divide by 0 leading to a velocity change of 65535, but I haven't been able to fix it). Also I changed the graphics and fixed something that was wrong with one of the formulas before.

That looks great :D Do the test charges still attract/repel each other? I can't tell from the shot...
Title: Re: Electric Field Sim
Post by: squidgetx on February 24, 2011, 03:21:43 pm
Test charges don't have any effect on each other :P
Title: Re: Electric Field Sim
Post by: Deep Toaster on February 24, 2011, 03:54:35 pm
Oh, I see. I got confused at first because I thought the first screenshot had only "test charges." Makes sense now :)
Title: Re: Electric Field Sim
Post by: DJ Omnimaga on February 26, 2011, 02:34:16 pm
This is interesting. I think this could be fun to mess around :D
Title: Re: Electric Field Sim
Post by: shmibs on February 26, 2011, 08:02:31 pm
SQUIDGET!!!
you know what you need to do?
turn this simulator into electric field hockey.
http://phet.colorado.edu/en/simulation/electric-hockey
Title: Re: Electric Field Sim
Post by: DJ Omnimaga on February 28, 2011, 07:24:51 pm
Hmm that sounds cool actually :D
Title: Re: Electric Field Sim
Post by: meishe91 on February 28, 2011, 07:27:58 pm
I remember playing that in AP Physics last year :P

Very cool simulator though :)
Title: Re: Electric Field Sim
Post by: Deep Toaster on March 01, 2011, 08:01:38 pm
And a suggestion for this one: Having a mode where the test charges interact with each other too.
Title: Re: Electric Field Sim
Post by: Darl181 on March 01, 2011, 09:10:02 pm
Quote from: shmibs
SQUIDGET!!!
you know what you need to do?
turn this simulator into electric field hockey.
http://phet.colorado.edu/en/simulation/electric-hockey
^++
That would be awesome.
Would smoothscrolling be out of the question?