Protons and electrons

About advanced scenes, and the Thyme scripting language used in Algodoo.

Protons and electrons

Postby Ivan » Tue Nov 03, 2009 2:44 pm

How to make objects have positive or negative charge, like protons and electrons?
Image
User avatar
Ivan
 
Posts: 202
Joined: Tue Oct 06, 2009 2:01 pm
Location: Croatia

Re: Protons and electrons

Postby RicH » Tue Nov 03, 2009 4:08 pm

Charge? AFAIK, you can't do that.
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: Protons and electrons

Postby davidz40 » Tue Nov 03, 2009 9:05 pm

You can use negative/positive attraction and right collision groups to simulate charge. Example:
Proton and electron consist of one col. A circle that has positive attraction. Protons have also col. B circle that has negative attraction, electrons have col. C circle that have negative attraction. Protons attract electrons, but repel other protons, and electrons repel other electrons.
Phundamentalist
User avatar
davidz40
 
Posts: 438
Joined: Sun Sep 06, 2009 10:30 am

Re: Protons and electrons

Postby cgyule » Tue Nov 03, 2009 9:12 pm

One way of creating 'charged' particles is as follows :-

Create a circle
Set its collision group to A and its attraction to -0.5 (this has to be done using the scripting box)

Clone the first circle
Set its collision group to B and its attraction to 0.5. Tick no self-intersection.
Place this circle over the first one and fix them together.

Set the colour on these circles.

This represents one type of particle.

Repeat this process for the second particle type but set the collision group for the first circle to C and
for the second to C and D (with no self-intersection selected).

Create copies of the particles, switch gravity off and set running.

Particles of the same type will repel each other but the nsc setting stops them from attracting. The components of the particles don't affect each other. Particles of differing types will attract (the addition of collision group D to the second particle ensures this).

Obviously they don't need to be of the same size and the rate of attraction/repulsion can be anything you want.

Collision groups can be whatever you want, of course.

You can join particles of different types with a box element to create a dipole. I'm sure there are plenty of other uses!
cgyule
 
Posts: 1
Joined: Tue Nov 03, 2009 8:12 pm

Re: Protons and electrons

Postby RA2lover » Tue Nov 03, 2009 9:25 pm

that's impossible with the current tools. the "attraction" slider's 1 value represents the newton's gravity constant. in fact, algodoo shouldn't even have gravity, and automatically set the attraction value to 1 :D
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Protons and electrons

Postby xplane80 » Fri Nov 13, 2009 8:12 pm

What I do is that you need for get those laws and make up your own e.g.

Red = +1 A
Green = 0 AB
Blue = -1 BC
Yellow = +2 AC
Image<- Designed by PhysicsGuy
User avatar
xplane80
 
Posts: 498
Joined: Mon Aug 31, 2009 7:28 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron