Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Coloring Functions' topicStudent Support Forum > General > Archives > "Coloring Functions"

Next Comment >Help | Reply To Topic
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: ,

Subject (listing for 'Coloring Functions')
Author Date Posted
Coloring Functions Lindsay Paro... 03/24/09 4:11pm
Re: Coloring Functions yehuda ben-s... 03/29/09 11:25am
Next Comment >Help | Reply To Topic