6.54.9 Quadric reduction: reduced_quadric
The reduced_quadric command finds the reduced equation of a
quadric.
-
reduced_quadric takes two arguments:
-
eq, the equation of a quadric.
- vars, a vector of variable names.
- reduced_quadric(eq,vars) returns a
list whose elements are:
-
the origin,
- the matrix of a basis where the quadric is reduced,
- 0 or 1 (0 if the quadric is degenerate),
- the reduced equation of the quadric
- a vector with its parametric equations.
Warning !
u,v will be used as parameters of the parametric equations:
these variables should not be assigned (purge them before
calling reduced_quadric).
Example.
Input:
reduced_quadric(7*x^2+4*y^2+4*z^2+ 4*x*y-4*x*z-2*y*z-4*x+5*y+4*z-18)
Output:
| ⎡
⎢
⎢
⎢
⎣ |
| ⎡
⎢
⎢
⎣ | | ,− | | ,− | | ⎤
⎥
⎥
⎦ | ,
| ⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣ | | ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦ | ,
| ⎡
⎣ | 9,3,3 | ⎤
⎦ | ,1,9 x2+3 y2+3 z2− | | , |
| | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| u=0… π ,v=0… 2 π ,ustep= | | ,vstep= | | π
| ⎤
⎥
⎥
⎥
⎦ | ⎤
⎥
⎥
⎥
⎦ |
| | | | | | | | | |
|
The output is a list containing:
-
The origin (center of symmetry) of the quadric
- The matrix of the basis change:
⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣ | | ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦ | ,
|
- 1, hence the quadric is not degenerated
- the reduced equation of the quadric:
- The parametric equations (in the original frame):
| ⎡
⎢
⎢
⎢
⎣ | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| u=0… π ,v=0… 2 π ,ustep= | | ,vstep= | | π
| ⎤
⎥
⎥
⎥
⎦ |
| | | | | | | | | |
|
Hence the quadric is an ellipsoid and its reduced equation is:
9x2+3y2+3z2+(−602)/27 = 0
|
after the change of origin [11/27,(−26)/27,(−29)/54],
the matrix of basis change is:
⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣ |
| |
| ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦ |
Its parametric equation is:
⎧
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎩ | |
|
Remark:
Note that if the quadric is degenerate and made of 1 or 2 plane(s),
each plane is not given by
its parametric equation but by the list of a point of the plane
and of a normal vector to the plane.
Example.
Input:
reduced_quadric(x^2-y^2+3*x+y+2)
Output:
| ⎡
⎢
⎢
⎢
⎣ | ⎡
⎢
⎢
⎣ | − | | , | | ,0 | ⎤
⎥
⎥
⎦ | , | ⎡
⎢
⎢
⎣ | | ⎤
⎥
⎥
⎦ | , |
| | | | | | | | | |
| | | | | | | | | | |
| ⎡
⎢
⎢
⎣ | hyperplan | ⎛
⎜
⎜
⎝ | ⎡
⎣ | 1,1,0 | ⎤
⎦ | , | ⎡
⎢
⎢
⎣ | − | | , | | ,0 | ⎤
⎥
⎥
⎦ | ⎞
⎟
⎟
⎠ | ,hyperplan | ⎛
⎜
⎜
⎝ | ⎡
⎣ | 1,−1,0 | ⎤
⎦ | , | ⎡
⎢
⎢
⎣ | − | | , | | ,0 | ⎤
⎥
⎥
⎦ | ⎞
⎟
⎟
⎠ | ⎤
⎥
⎥
⎦ | ⎤
⎥
⎥
⎥
⎦ |
| | | | | | | | | |
|