| Author |
Comment/Response |
Lindsay Paroczai
|
03/24/09 4:11pm
Hi everyone! I'm working on trying to model the Lorenz equations in 3D, and my teacher would like me to try and figure out how to color different t-values different colors. The basic premise of the Lorenz system is to solve three differential equations and plot the solutions in 3D. The independent variable in this case is t, so she wanted me to do 3d plots where from t between 1 and 10 is one color to see how the model progresses. Can anyone help me out? I've attached the code at the bottom in case anyone wants to try it out...
s = 10;
b = 8/3;
r = 28;
Lorenz = NDSolve[{x'[t] == s (y[t] - x[t]),
y'[t] == -x[t] z[t] + r*x[t] - y[t], z'[t] == x[t] y[t] - b*z[t],
x[0] == 0, y[0] == 1, z[0] == 0}, {x, y, z}, {t, 0, 100},
MaxSteps -> Infinity]
ParametricPlot3D[Evaluate[{x[t], y[t], z[t]} /. Lorenz], {t, 0, 100},
PlotPoints -> 10000]
URL: , |
|