[url=https://youtu.be/8_BLhxjrho0]Lorenz Attractor in GeoGebra[/url]
With the following GeoGebra script you can plot the numerical solution of systems of differential equations.[br][br]The main command used here is NSolveODE(). More info: [url=https://wiki.geogebra.org/en/NSolveODE_Command]https://wiki.geogebra.org/en/NSolveODE_Command[br][br][/url]Other Auxiliary commands used are:[br][url=https://wiki.geogebra.org/en/Sequence_Command]https://wiki.geogebra.org/en/Sequence_Command[/url][br][url=https://wiki.geogebra.org/en/Point_Command]https://wiki.geogebra.org/en/Point_Command[br][/url][url=https://wiki.geogebra.org/en/Polyline_Command]https://wiki.geogebra.org/en/Polyline_Command[/url][br][br]The 3D graphics view must be opened!
[code]##Parameters##[br]d = 10[br]b = 8/3[br]p = 28[br][br]##System of differential equations: Lorenz attractor##[br]x'(t,x,y,z) = d * (y - x)[br]y'(t,x,y,z) = x * (p - z) - y[br]z'(t,x,y,z) = x * y - b * z[br][br]##Initial Condition##[br]x0 = 1[br]y0 = 1[br]z0 = 1[br][br]##Numerical solution##[br]NSolveODE({x', y', z'}, 0, {x0, y0, z0}, 20)[br][br]##Note## [br]# The command NSolveODE() creates three curves[br]# containing the numerical silution of the system[br]# per variable (x,y and z) and they are plotted[br]# against time in the 2D graphic view.[br][br]##Calculate length of solution 1##[br]len = Length(numericalIntegral1)[br][br]##Define points from the solution##[br]L_1 = Sequence( (y(Point(numericalIntegral1, i)), y(Point(numericalIntegral2, i)), y(Point(numericalIntegral3, i))), i, 0, 1, 1 / len )[br][br]##Draw curve##[br]f = Polyline(L_1)[br][br]##Finally, you need to hide numericalIntegra1, numericalIntegra2, numericalIntegra3, and L_1##[/code][br]
If you like these tutorials, you can support my work in Patreon:[br][br]https://www.patreon.com/jcponce[br][br]∞ Thanks!