Quadric
In mathematics, a quadric or quadric surface is a generalization of conic sections. In three-dimensional space, quadrics include ellipsoids, paraboloids, and hyperboloids.
More generally, a quadric hypersurface embedded in a higher dimensional space is defined as the zero set of an irreducible polynomial of degree two in variables; for example, D1 is the case of conic sections. When the defining polynomial is not absolutely irreducible, the zero set is generally not considered a quadric, although it is often called a degenerate quadric or a reducible quadric.
A quadric is an affine algebraic variety, or, if it is reducible, an affine algebraic set. Quadrics may also be defined in projective spaces; see, below.
Formulation
In coordinates, the general quadric is thus defined by the algebraic equationwhich may be compactly written in vector and matrix notation as:
where is a row vector, xT is the transpose of x, Q is a matrix and P is a -dimensional row vector and R a scalar constant. The values Q, P and R are often taken to be over real numbers or complex numbers, but a quadric may be defined over any field.
Euclidean plane
As the dimension of a Euclidean plane is two, quadrics in a Euclidean plane have dimension one and are thus plane curves. They are called conic sections, or conics.Image:Eccentricity.svg|center|thumb|280px|Circle, ellipse, parabola, and hyperbola with fixed focus F and directrix.
Euclidean space
In three-dimensional Euclidean space, quadrics have dimension two, and are known as quadric surfaces. Their quadratic equations have the formorwhereandThe quadric surfaces are classified and named by their shape, which corresponds to the orbits under affine transformations. That is, if an affine transformation maps a quadric onto another one, they belong to the same class, and share the same name and many properties.
The principal axis theorem shows that for any quadric, a suitable change of Cartesian coordinates or, equivalently, a Euclidean transformation allows putting the equation of the quadric into a unique simple form on which the class of the quadric is immediately visible. This form is called the normal form of the equation, since two quadrics have the same normal form if and only if there is a Euclidean transformation that maps one quadric to the other. The normal forms are as follows:
where the are either 1, −1 or 0, except which takes only the value 0 or 1.
Each of these 17 normal forms corresponds to a single orbit under affine transformations. In three cases there are no real points: , , and . In one case, the imaginary cone, there is a single point. If one has a line. For one has two intersecting planes. For one has a double plane. For one has two parallel planes.
Thus, among the 17 normal forms, there are nine true quadrics: a cone, three cylinders and five non-degenerate quadrics, which are detailed in the following tables. The eight remaining quadrics are the imaginary ellipsoid, the imaginary cylinder, the imaginary cone, and the reducible quadrics, which are decomposed in two planes; there are five such decomposed quadrics, depending whether the planes are distinct or not, parallel or not, real or complex conjugate.
When two or more of the parameters of the canonical equation are equal, one obtains a quadric of revolution, which remains invariant when rotated around an axis.
Intersection of a Ray with a Quadric Surface
Source:One can represent a three-dimensional ray parametrically as
where,, and are the,, and components of the normalized direction vector of the ray and is the distance along the ray. Inserting these values into the equation for a three-dimensional quadric surface, one obtains a quadratic equation for. If there are two real roots, this gives the two intersection points of the ray with the quadric surface. If there is a double root, then the ray grazes the surface. If there are no real roots, then the ray misses the quadric surface.
Alternatively, using homogeneous coordinates, one may represent the ray aswhereis a line through the point andis the direction vector of the ray. The equation for the intersection of a ray with a quadric surface is then represented asyielding the same quadratic equation in t.
The normal to any point on the surface is
Quadric surface patches in graphical ray tracing
In computer graphics, the visual representation of mathematically modeled objects is frequently determined by ray tracing. Frequently, the surfaces of the objects are described in terms of a number of points on the surface and the normals to the surface at those points. The intermediate points on the surface are described by a set of surface patches between the points. Quadric surfaces are frequently used this way when the surface is described as a set of triangles using the positions and normals to the points of those triangles. Using quadric surfaces to model these patches has the advantage that it is easy to tell if and where a light ray intersects a patch, as was described in the previous section.The equation for a quadric surface has ten variables, but only nine independent variables, since the multiplication of the equation by any non-zero constant has no effect. The normals and locations of three points gives nine constraints. Thus it would seem that it is possible to uniquely determine a quadric surface triangular patch from this information. Indeed, one can construct a linear matrix to designate these constraints. However, it can be shown that this matrix will always be singular, so some additional constraint must be added to uniquely determine the quadric surface of that patch.
Determining the quadric surface type and the displacement from standard position
Sources:In general, quadric equations may not be in normal form, and it may be difficult to determine the type of quadric surface by visual inspection unless the quadric surface has its center at the origin and the principal axes are along the x, y, and z directions However, if one defines the submatrix of then the following table allows classification of the quadric surface, based on the ranks, determinants, and eigenvalues of the and matrices.
| Rank of | Rank of | Sign of determinant of | Non-zero eigenvalues of of the same sign? | Are all eigenvalues of of the same sign? | Type of quadric surface |
| 3 | 4 | Negative | No | Yes | Real ellipsoid |
| 3 | 4 | Positive | Yes | Yes | Imaginary ellipsoid |
| 3 | 4 | Positive | No | No | Hyperboloid of one sheet |
| 3 | 4 | Negative | No | No | Hyperboloid of two sheets |
| 3 | 3 | - | No | No | Real quadric cone |
| 3 | 3 | - | Yes | Yes | Imaginary quadric cone |
| 2 | 4 | Negative | No | Yes | Elliptic paraboloid |
| 2 | 4 | Positive | No | No | Hyperbolic paraboloid |
| 2 | 3 | - | No | Yes | Real elliptic cylinder |
| 2 | 3 | - | Yes | No | Imaginary elliptic cylinder |
| 2 | 2 | - | No | No | Real intersecting planes |
| 2 | 2 | - | Yes | Yes | Imaginary intersecting planes |
| 1 | 3 | - | No | - | Parabolic cylinder |
| 1 | 2 | - | No | - | Parabolic cylinder |
| 1 | 2 | - | Yes | - | Imaginary parallel planes |
| 1 | 1 | - | - | - | Coincident planes |
All real quadric surfaces except ellipsoids and hyperboloids are special limiting cases. Any real ellipsoid or hyperbolic and be expressed as a repositioned matrix of the formwith containg only the diagonal components of, and, the others being zeroes. Here the x, y, and z axis columns of the affine matrix are the normalized eigenvectors of. where the acute accent implies the matrix transpose. The location of the centroid, isThe axis radii have the valueswhere the radial axes and along the eigenvectors of the corresponding eigenvalues, andFor a real ellipsoid, radii for all of the eigenvalues are positive. For a hyperboloid of one sheet, one of the squared radii is negative, the other two being those of the ellipse at the neck of the hyperboloid. For a hyperboloid of two sheets, two of the squared radii are negative and the real radius is the distance from the center point to the points of the sheets. If all three eigenvalues give negative squared radii, then the quadric surface is an imaginary ellipsoid.
Quadric Surface Affine Transformation
are used to represent coordinate transformations. Such a matrix has the formHere the first column of the matrix is the normalized direction vector of the -axis of the new coordinate system, with respect to the original coordinate system,. The second column represents the -axis, the third column the -axis, and the fourth column is the location of the origin in in the original coortinate system. A point at the location, in terms of the coordinate system is at the pointin the original coordinate system. Note that here, the vector has a "1" as its fourth term, since it is a location vector, while direction vectors have "0" for the fourth term. Using the usual rules for matrix algebra, the inverse transformation is obtained as the inverse of the matrix, that is,These transformations can be concatenated, so that if there is a coordinate system, with a location and orientation with respect to, its orientation with respect to isas calculated using matrix multiplication. These transformation matrices are frequently used to calculate the locations and orientation of vehicles. For example, an aircraft at a point in the aircraft frame of reference with be at a point in the ground coordinate system, if is the transformation between the ground frame of reference and the aircraft frame of reference.Quadric surfaces have the nice property that they also transform under affine coordinate transformations. If a quadric surface,, is moved to a coordinate location and orientation, its description as seen from the original coordinate system isHowever, this needs to be distinguished from a quadric surface defined in coordinate system as viewed from a coordinate system, where the transformation is
Note that since, it does not matter whether or not this matrix is transposed, and one may see it either way in the literature.