Visualize the Lorenz Attractor
Visualize the Lorenz Attractor
Use NDSolve to obtain numerical solutions of differential equations, including complex chaotic systems.
s = NDSolve[{Derivative[1][x][t] == -3 (x[t] - y[t]), Derivative[1][y][t] == -x[t] z[t] + 26.5 x[t] - y[t], Derivative[1][z][t] == x[t] y[t] - z[t], x[0] == z[0] == 0, y[0] == 1}, {x, y, z}, {t, 0, 400}, MaxSteps -> ∞];
Show[ParametricPlot3D[Evaluate[{x[t], y[t], z[t]} /. s], {t, 0, 400}, PlotPoints -> 1000, PlotStyle -> Directive[Thick, RGBColor[.8, 0, 0]], ColorFunction -> (ColorData["SolarColors", #4]&)], Graphics3D[{ColorData["SolarColors"][0], Sphere[First[({x[t], y[t], z[t]} /. s) /. t -> 0], .75]}], RotationAction -> "Clip", Boxed -> False, SphericalRegion -> False, Axes -> False, ImageSize -> 500]