So in the If[evecs==Re[evecs]
, I want to then change the colour in PlotStyle
of the ParametricPlot3D
s (say, green if eval<0, orange if eval==0 and red if eval>0). As you can see, I've already tried to add another If statement but it doesn't quite appear to be doing exactly what I want.
Manipulate[{evals, evecs} =
Eigensystem[({{-\[Sigma], \[Sigma],
0}, {r - X[[3]], -1, -X[[1]]}, {X[[2]], X[[1]], -\[Beta]}})];
GraphicsColumn[{Show[
If[evecs == Re[evecs],
ParametricPlot3D[
Evaluate[ConstantArray[X, 3] + t*evecs], {t, -2, 2},
PlotStyle -> {{If[evals < 0, Green, Red]}}], {}],
Graphics3D[{PointSize[0.025], Red, Point[X]}],
ImageSize -> {275, 275}]}],
Row[{Spacer[60],
Dynamic[Style[
Text@TraditionalForm[
HoldForm[({{x}, {y}, {z}})' ==
Dynamic[Round[({{-\[Sigma], \[Sigma],
0}, {r - X[[3]], -1, -X[[1]]}, {X[[2]],
X[[1]], -\[Beta]}}), 0.01]] ({{x}, {y}, {z}})]],
Medium]]}], Delimiter, {{r, 1, Style["r", Medium]}, 0, 40, .1,
Appearance -> "Labeled",
TrackingFunction -> ((r = #; updateFN[]) &)}, {{\[Beta], 8/3,
Style["\[Beta]", Medium]}, 0, 20, .01, Appearance -> "Labeled",
TrackingFunction -> ((\[Beta] = #; updateFN[]) &)}, {{\[Sigma], 10,
Style["\[Sigma]", Medium]}, 0, 50, 5, Appearance -> "Labeled",
TrackingFunction -> ((\[Sigma] = #;
updateFN[]) &)}, Delimiter, {{X, {0, 0, 0}}, 0, 1,
ControlType -> None}, {{X0, 1,
"Fixed Point:"}, {1 -> "\!\(\*SubscriptBox[\(C\), \(0\)]\)",
2 -> "\!\(\*SubscriptBox[\(C\), \(+\)]\)",
3 -> "\!\(\*SubscriptBox[\(C\), \(-\)]\)"}, RadioButtonBar,
TrackingFunction -> ((X0 = #; updateFN[]) &)}, Delimiter, {evecs,
ControlType -> None}, {evals,
ControlType -> None}, {{updateFN, updateFN},
ControlType -> None}, Delimiter, ControlPlacement -> Left,
AutorunSequencing -> {1, 2, 3, 5},
Initialization :> (updateFN[] := (X = {{0, 0,
0}, {Sqrt[\[Beta]*(r - 1)], Sqrt[\[Beta]*(r - 1)],
r - 1}, {-Sqrt[\[Beta]*(r - 1)], -Sqrt[\[Beta]*(r - 1)],
r - 1}}~Part~X0; {evals, evecs} =
Eigensystem[({{-\[Sigma], \[Sigma],
0}, {r - X[[3]], -1, -X[[1]]}, {X[[2]],
X[[1]], -\[Beta]}})];);
updateFN[])]
Thank you in advance for your help!
evals
a list of numbers? If so,evals < 0
won't work. $\endgroup$Sign[evals] /. {-1 -> Green, 0 -> Orange, 1 -> Red}
, maybe? $\endgroup$