2
$\begingroup$

I have a ellipsoid equation given bellow. I want to find $\pm\Delta_{c^1}$, $\pm\Delta_{c^2}$, $\pm\Delta_{c^3}$ around the point $(81.32, 10.62, 17.17)$

Show[
  ContourPlot3D[
    425182.22 + 64.14985 c1^2 + 2.176 c2^2 + 
    c2 (-1.013*10^-13 - 0.006 c3) + 
    c1 (-10442.15 - 0.567c2 + 0.863846077 c3) - 
    70.3549202 c3 + 0.0052366 c3^2 == 1, 
    {c1,81,81.7}, {c2,9,12},{c3,-5,40},
    AxesLabel -> {c1, c2, c3},
    ContourStyle -> Directive[Orange, Opacity[0.7]],
    LabelStyle -> Directive[Black, 15], 
    Mesh-> None],
  Graphics3D[{Black, PointSize[0.015], Point[{81.32, 10.62, 17.17}]}]]
$\endgroup$
  • $\begingroup$ The meaning of $\pm\Delta_{c^1}$, $\pm\Delta_{c^2}$, $\pm\Delta_{c^3}$ may be clear to you, but not to me. Definitions for these quantities are needed. $\endgroup$ – m_goldberg Jan 20 at 13:40
  • $\begingroup$ Sorry. Just leave that part. I asked something wrong. Leave that part. I only need the projection. $\endgroup$ – Sahabub Jahedi Jan 20 at 15:58
3
$\begingroup$
f = 425182.22 + 64.14985 c1^2 + 2.176 c2^2 + 
   c2 (-1.013*10^-13 - 0.006 c3) + 
   c1 (-10442.15 - 0.567 c2 + 0.863846077 c3) - 70.3549202 c3 + 
   0.0052366 c3^2 - 1;

c = {c1, c2, c3};
(*Finding the center by finding the minimum of the quadratic function*)

center = c /. Solve[D[f, {c, 1}] == {0, 0, 0}, c][[1]];
x = {x1, x2, x3};
(*Finding the principal axes with  Eigensystem.*)
A = 1/2 D[f /. Thread[c -> x], {x, 2}] /(-f /. Thread[c -> center]);
{a, e} = Eigensystem[A];
paxes = 1/Sqrt[a] e;


contour = 
  ContourPlot3D[f == 0, {c1, 81, 81.7}, {c2, 9, 12}, {c3, -5, 40},
   PlotPoints -> 60,
   ContourStyle -> Opacity[.25],
   Mesh -> None
   ];

Show[
 contour,
 Graphics3D[{Opacity[0.25], Blue, 
   Ellipsoid[center, Inverse[A]], PointSize[Large], 
   Point[center],
   Thick, Black, Opacity[1],
   Red, Line[{center, center + paxes[[1]]}],
   Green, Line[{center, center + paxes[[2]]}],
   Blue, Line[{center, center + paxes[[3]]}]
   }]
 ]
$\endgroup$
  • $\begingroup$ Thank you so much. $\endgroup$ – Sahabub Jahedi Jan 20 at 15:58
  • $\begingroup$ You're welcome. $\endgroup$ – Henrik Schumacher Jan 20 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.