Calculating an AABB for a transformed sphere

后端 未结 4 545
夕颜
夕颜 2021-02-05 16:37

I have a sphere represented in object space by a center point and a radius. The sphere is transformed into world space with a transformation matrix that may include scales, rota

4条回答
  •  难免孤独
    2021-02-05 17:17

    @comingstorm's answer is elegant in the way that it uses the homogeneous coordinates and the duality of the conic.

    The problem can also be viewed as a constrained maximization problem that can be solved by the Lagrange multiplier method. Use the AABB at y axis as an example. The optimization target is

    and the constraint is the ellipsoid equation

    and the Lagrange is

    where lambda is the multiplier. The extrema are simply the solutions of the following equations

    which gives

提交回复
热议问题