matlab - Object orbiting a moving object in 2D -


i working on system in have small moving objects in 2d , if 2 objects close each other, 1 starts orbit other. limited information:

i know angle between object not orbiting , object orbiting @ each time step know distance between centers of 2 objects @ each time step orbiting object can move @ maximum speed of d_max/t_step < max_radius/t_step max_radius maximum distance between 2 objects in can interact. if distance > max_radius 2 objects don't attract anymore.

what have right formula this:

fxy = e^(-alpha*d^2); dx = 2*alpha*fxy*(sin(theta)*d); dy = -2*alpha*fxy*(cos(theta)*d); 

if sum dx , dy coordinates of orbiting obejct orbit around other, if remains still. how can extend object keeps orbiting if other moves (obviously constraints talked above)?

add dx , dy delta-x , delta-y of object orbiting.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -