From spencer@spline.eecs.umich.edu Wed Oct 5 09:24:27 1988 Path: leah!bingvaxu!sunybcs!boulder!ncar!mailrus!umich!spline.eecs.umich.edu!spencer From: spencer@spline.eecs.umich.edu (Spencer W. Thomas) Newsgroups: comp.graphics Subject: Re: Transforming Quadric Surfaces ( HELP!!!! ) Message-ID: <1232@zippy.eecs.umich.edu> Date: 5 Oct 88 13:24:27 GMT References: <511@uvicctr.UUCP> Sender: news@zippy.eecs.umich.edu Reply-To: spencer@spline.eecs.umich.edu (Spencer W. Thomas) Distribution: na Organization: University of Michigan EECS Dept. Ann Arbor Lines: 56 Summary: Expires: Sender: UUCP-Path: umich!crimspline!spencer Followup-To: Keywords: In article <511@uvicctr.UUCP> bcorrie@uvicctr.UUCP (Brian Corrie) writes: >I have the following problem : Given a quadric of the form > Ax^2 + 2Bxy + 2Cxz + 2Dx + Ey^2 + 2Fyz + 2Gy + Hz^2 + 2Iz + J = 0 > > I store the coefficients in a 4x4 matrix. I believe this is a kind of > standard since I have seen it in several journal articles. The matrix and > the form of the equation is given below. > > | A B C D | | x | > [x,y,z,1] * | B E F G | * | y | = 0 > | C F H I | | z | > | D G I J | | 1 | > > My problem is that I need to translate and rotate this quadric by a standard > 3D translation. ( eg. Translate its center to origin ). It is my > understanding that this can be done by using a standard 4x4 3D homogenous > transformation matrix and its transpose or its inverse. Yup. Thats right. Suppose your transformation is T. I.e. [x,y,z,1] * T = [x',y',z',w'] Letting T(-1) is the inverse of T, you have [x,y,z,1] = [x',y',z',w'] * T(-1) Let Tt be the transpose of T, then Tt | x | = | x' | | y | | y' | | z | | z' | | 1 | | w' | and | x | = Tt(-1) * | x' | | y | | y' | | z | | z' | | 1 | | w' | Thus, | A B C D | | x | [x,y,z,1] * | B E F G | * | y | = 0 | C F H I | | z | | D G I J | | 1 | is the same as | A B C D | | x | [x',y',z',w'] * T(-1) * | B E F G | * Tt(-1) * | y | = 0 | C F H I | | z | | D G I J | | 1 | So your new quadric matrix must be T(-1) * M * Tt(-1). =Spencer (spencer@crim.eecs.umich.edu)