# Circular fighter motion algorithm

Is there an algorithm to make ships take semi-circular patterns? I need something like the below image:

Big Blue- Command Ship Small blues - fighters Red lines - path of movement

I want the fighters to zip around the command ship while avoiding obsticles such as space debris and eachother. I need at most a dozen fighters zipping around each ship and there would be up to a dozen command ships zipping around at a slower pace. All the fighters should return to the ship every once in a while for repair and rearming.

I chiefly need the circular path and I need to keep the path centered constantly on the command ship despite any movements. Are there any circular path finding algorithms? (and a better question; is there an official term for this kind of algorithm/path?)? Also note that I am developing this as an RTS for mobile, so the least expensive the operation the better.

• You'll have an easier time thinking about this in terms of implementing simple orbital behavior for the drone ships (a "circular path finding algorithm" is just the equation of a circle), and adding basic steering avoidance (as with flocking behaviors) to that, probably.
– user1430
Apr 19, 2016 at 19:27
• @JoshPetrie what I meant by "circular path finding algorithm" was essentially the orbital algorithm you speak of. I obviously never thought of it that way (and I am making a space game, so yeah) or I probably wouldn't have needed to ask here. The orbital paths would not necessarily be circles, and would be anything from ovals to triangles depending on the speed of the "mothership" and how fast they would have to move to keep up. Apr 20, 2016 at 12:37
• They should naturally end up looking that way if they follow a moving object (the main ship) and have to correct for that plus avoiding other ships.
– user1430
Apr 20, 2016 at 13:53