Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to generate an ellipse outside two points (two-dimensional vectors).

Is there a formular for that, or a cool way of doing that in C# XNA?

What I am trying to do is have a particle circle around one player and another.

share|improve this question
up vote 2 down vote accepted

One approach would be to consider the coordinates of the two entities (the player and the opponent) to be somewhere on the major axis of the ellipse, preferably placed such that their visual extents do not intersect with the intended ellipse. From that you should be able to compute the extents of the major axis. The minor axis is then derivable from the major axis by multiplying the extent of the major axis by some aspect ratio.

Once you have the equation for a parametric ellipse, you can sample along it to compute coordinates suitable for particle placement - if you combine this with some perturbation of the equation you can probably get some nice artistic control over the effect.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.