1
\$\begingroup\$

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.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .