# Collision Detection – Draw an ortho outline of a rotated ellipsoid

I'm working on a collision system for a 2.5D game, and I stick to the spheroids. As long as the scaling of x = y = z and not spinning, I can just use a r ^ 2 check, but I'm trying to find a way to deal with the TOI solution if it does not.

What I realized is that if I generate an n-gon, it will roll properly (ie no noticeable bumping from corners) as long as the collision mesh itself does not rotate, just a kind of offset …

Anways, so I have a unit sphere at the origin and a 4×4 transformation matrix. And I want to find the lineloop that outlines it in an orthogonal projection.

And I've been trying to figure out how to write a kind of 2D X / Y projection in relation to the matrix-transformed sphere, and I can not figure it out. In part, this is because I do not understand the vector definition of a sphere, z. What is a positive definite matrix and if a rotation matrix is ​​suitable …

That's about as far as I've come:

$$cos ( alpha) r = x m_0 + y m_1 + (1 – x ^ 2 – y ^ 2) m_2$$
$$sin ( alpha) r = x m_4 + y m_5 + (1 – x ^ 2 – y ^ 2) m_6$$

But I am pretty sure that this is not solvable because it has 3 unknown variables in 2 equations and there is no reason to find a maximum value r,

How can I do that and am I on the right track?

Posted on Categories Articles