> restart; > q:=(a,b,c)->a*(x^2+2*y*z)+b*(y^2+2*x*z)+c*(z^2+2*x*y)=1; q := (a, b, c) -> 2 2 2 a (x + 2 y z) + b (y + 2 x z) + c (z + 2 x y) = 1 > with(plots); [animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, graphplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot] > implicitplot3d(q(1,2,-2/3), x=-5..5, y=-5..5, z=-5..5, color=blue, scaling=constrained, axes=boxed); > implicitplot3d(q(1,1,1), x=-5..5, y=-5..5, z=-5..5, color=blue, scaling=constrained, axes=boxed); > with(LinearAlgebra); [&x, Add, Adjoint, BackwardSubstitute, BandMatrix, Basis, BezoutMatrix, BidiagonalForm, BilinearForm, CharacteristicMatrix, CharacteristicPolynomial, Column, ColumnDimension, ColumnOperation, ColumnSpace, CompanionMatrix, ConditionNumber, ConstantMatrix, ConstantVector, Copy, CreatePermutation, CrossProduct, DeleteColumn, DeleteRow, Determinant, Diagonal, DiagonalMatrix, Dimension, Dimensions, DotProduct, EigenConditionNumbers, Eigenvalues, Eigenvectors, Equal, ForwardSubstitute, FrobeniusForm, GaussianElimination, GenerateEquations, GenerateMatrix, Generic, GetResultDataType, GetResultShape, GivensRotationMatrix, GramSchmidt, HankelMatrix, HermiteForm, HermitianTranspose, HessenbergForm, HilbertMatrix, HouseholderMatrix, IdentityMatrix, IntersectionBasis, IsDefinite, IsOrthogonal, IsSimilar, IsUnitary, JordanBlockMatrix, JordanForm, KroneckerProduct, LA_Main, LUDecomposition, LeastSquares, LinearSolve, Map, Map2, MatrixAdd, MatrixExponential, MatrixFunction, MatrixInverse, MatrixMatrixMultiply, MatrixNorm, MatrixPower, MatrixScalarMultiply, MatrixVectorMultiply, MinimalPolynomial, Minor, Modular, Multiply, NoUserValue, Norm, Normalize, NullSpace, OuterProductMatrix, Permanent, Pivot, PopovForm, QRDecomposition, RandomMatrix, RandomVector, Rank, RationalCanonicalForm, ReducedRowEchelonForm, Row, RowDimension, RowOperation, RowSpace, ScalarMatrix, ScalarMultiply, ScalarVector, SchurForm, SingularValues, SmithForm, StronglyConnectedBlocks, SubMatrix, SubVector, SumBasis, SylvesterMatrix, ToeplitzMatrix, Trace, Transpose, TridiagonalForm, UnitVector, VandermondeMatrix, VectorAdd, VectorAngle, VectorMatrixMultiply, VectorNorm, VectorScalarMultiply, ZeroMatrix, ZeroVector, Zip] > mq:=Matrix(3,3,[a,c,b,c,b,a,b,a,c]); [a c b] [ ] mq := [c b a] [ ] [b a c] > vp:=Eigenvalues(mq); [ c + b + a ] [ ] [ 2 2 2 1/2 ] vp := [(b + a - c b - c a + c - b a) ] [ ] [ 2 2 2 1/2] [-(b + a - c b - c a + c - b a) ] > implicitplot3d(q(1,1,-1/2), x=-5..5, y=-5..5, z=-5..5, color=yellow, scaling=constrained, axes=boxed); > mqr:=subs(c=-a*b/(a+b),mq); [ a b ] [ a - ----- b ] [ a + b ] [ ] [ a b ] mqr := [- ----- b a ] [ a + b ] [ ] [ a b ] [ b a - -----] [ a + b] > (v, e) := Eigenvectors(mqr); [ 2 2 ] [ b a + a + b ] [ ------------- ] [a + b b ] [ a + b ] [----- - a/b - -----] [ ] [ b a + b] [ 2 2 ] [ ] v, e := [ b a + a + b ], [ a ] [ ------------- ] [ 0 1 - -----] [ a + b ] [ a + b] [ ] [ ] [ 2 2] [ 1 0 1 ] [ b a + a + b ] [- -------------] [ a + b ] > base:=[(a+b)*Column(e,3),b*Column(e,1),b*Column(e,2)]; [ -b ] [a + b] [-a] [ ] [ ] [ ] base := [[ -a ], [ 0 ], [b ]] [ ] [ ] [ ] [a + b] [ b ] [0 ] Tentative intéressante, mais à réserver à des cas simples (sans paramètres, par ex.) : > baseortho:=GramSchmidt(base,normalized); [ %2 b ] [ ---- + a + b ] [ %7 ] [ b ] [ %1 ] [ ----- ] [- ------] [ ------------ ] [ 1/2 ] [ 1/2] [ 1/2 ] [ %9 ] [ %11 ] [ %10 ] [ ] [ ] [ ] [%6 a %5 %2 a ] [ a ] [ %2 a ] [---- - ------- + b] baseortho := [[- ------], [ --------- ], [ %1 %4 %1 ]] [ 1/2] [ 1/2 ] [------------------] [ %11 ] [ %10 %1 ] [ 1/2 ] [ ] [ ] [ %9 ] [ a + b ] [ %2 (a + b) ] [ ] [ ------ ] [- ---------- + b] [ %8 ] [ 1/2 ] [ %1 ] [ ----- ] [ %11 ] [----------------] [ 1/2 ] [ 1/2 ] [ %9 ] [ %10 ] _ _ _______ %1 := b b + a a + (a + b) (a + b) _ _______ %2 := -(a + b) b + b (a + b) ______________ /%2 b \ %3 := |---- + a + b| \ %1 / ______ /%2 a\ %2 a |----| /%2 b \ \ %1 / %4 := |---- + a + b| %3 + ----------- \ %1 / %1 __________________ / %2 (a + b) \ / %2 (a + b) \ + |- ---------- + b| |- ---------- + b| \ %1 / \ %1 / ______ /%2 a\ %5 := -a %3 + b |----| \ %1 / _ _ %6 := a b - b a /%2 b \ %5 |---- + a + b| %6 b \ %1 / %7 := ---- - ----------------- - a %1 %4 / %2 (a + b) \ %5 |- ---------- + b| %6 (a + b) \ %1 / %8 := - ---------- - --------------------- %1 %4 2 | %6 a %5 %2 a |2 2 %9 := | %7 | + | ---- - ------- + b | + | %8 | | %1 %4 %1 | 2 | %2 b |2 | %2 a | | %2 (a + b) |2 %10 := | ---- + a + b | + --------- + | - ---------- + b | | %1 | 2 | %1 | %1 2 2 2 %11 := | b | + | a | + | a + b | > axe:=Vector([-b,-a,a+b]); [ -b ] [ ] axe := [ -a ] [ ] [b + a] > axe1:=(a,b)->spacecurve([-b*t,-a*t,(a+b)*t],t=-4..4); > axe1 := (a, b) -> plots:-spacecurve([-b t, -a t, (a + b) t], t = -4 .. 4) > > a:=1;b:=1; > o:=(a^2+b^2+a*b)/(a+b); > zz:=(1-1/o)/2+t*(1+o); > yy:=(1+1/o)/2+t*(o-1); > xx:=-2*t*sqrt(o); > n1:=sqrt(a^2+b^2); > n3:=sqrt(2*(a^2+b^2+a*b)); > n2:=n1*n3; > e_ortho:=Matrix(3,3,[a/n1,b*(a+b)/n2,-b/n3,-b/n1,a*(a+b)/n2,-a/n3,0,(b^2+a^2)/n2,(a+b)/n3]); > oldxyz:=e_ortho.Vector([xx,yy,zz]); > droite:=spacecurve([oldxyz[1],oldxyz[2],oldxyz[3]],t=-4..4,color=red,thickness=2): > > a := 1 b := 1 o := 3/2 5 t zz := 1/6 + --- 2 yy := 5/6 + t/2 1/2 xx := -t 6 1/2 n1 := 2 1/2 n3 := 6 1/2 1/2 n2 := 2 6 [ 1/2 1/2 1/2 1/2] [ 2 2 6 6 ] [ ---- --------- - ----] [ 2 6 6 ] [ ] [ 1/2 1/2 1/2 1/2] e_ortho := [ 2 2 6 6 ] [- ---- --------- - ----] [ 2 6 6 ] [ ] [ 1/2 1/2 1/2 ] [ 2 6 6 ] [ 0 --------- ---- ] [ 6 3 ] oldxyz := [ 1/2 / 5 t\] [ 1/2 1/2 1/2 1/2 6 |1/6 + ---|] [ 2 t 6 2 6 (5/6 + t/2) \ 2 /] [- ----------- + --------------------- - ----------------] [ 2 6 6 ] [ 1/2 / 5 t\] [ 1/2 1/2 1/2 1/2 6 |1/6 + ---|] [2 t 6 2 6 (5/6 + t/2) \ 2 /] [----------- + --------------------- - ----------------] [ 2 6 6 ] [ 1/2 / 5 t\] [ 1/2 1/2 6 |1/6 + ---|] [2 6 (5/6 + t/2) \ 2 /] [--------------------- + ----------------] [ 6 3 ] > surf:=implicitplot3d(q(1,1,-1/2), x=-5..5, y=-5..5, z=-5..5, color=yellow, scaling=constrained, axes=boxed): > display([surf,droite,axe1(1,1)]); >