gravity
Asked by
Robert Sarracino
Each time step I would like to assign a different acceleration (call it a different 'gravity'). and a different damping constant, to each particle depending on its position. This acceleration is similar to gravity in that it would be added to whatever acceleration arises from interaction with neighboring particles. However, its value would be different for each particle. How do I do that?
I've begun by setting up a runnable in which I've added the loop
for pp in particleList:
centre = pp.getPosn()
radius = pp.getRadius()
{calculation of acceleration}
{calculation of damping constant}
What command do I use to assign the acceleration and the damping constant to the particle?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Dion Weatherley
- Solved:
- Last query:
- Last reply:
To post a message you must log in.