Computer Science Canada Physics/Molecules |
Author: | AzureFire [ Sun Dec 04, 2005 9:11 pm ] |
Post subject: | Physics/Molecules |
Fist of all, please don't post entire code here, I just need help with the concept. Here's what I'm trying to do. I want to make a screen, where there are about 20 - 30 randomly placed dots. They will start moving in random directions, but they will attract and orbit, then repel each other. I don't really understand how to get them to orbit eachother, before they repell. Any help would be greatly appriciated. P.S. This is for my own personal gain, not for school. |
Author: | Tony [ Sun Dec 04, 2005 9:55 pm ] |
Post subject: | |
well your particles have to exert a force on each other (gravity and/or electrical). Search for gravity in [Turing Source Code] for some examples. For gravity just have each molecule pull towards all others. The model is quite simple, but starting out with the right numbers for a pretty looking effect could take some guess work. |