Author Topic: Lorenz  (Read 2619 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Lorenz
« on: May 29, 2013, 08:59:55 AM »
Deleted
« Last Edit: April 25, 2015, 04:16:26 AM by Peter »

JRS

  • Guest
Re: Lorenz
« Reply #1 on: June 04, 2013, 08:34:37 PM »
Here is your Butterfly example in SB/JAPI after running about a minute. I'm surprised how well/fast JAPI works being a socket interface to Java primitives.



Code: [Select]
import japi.bas

j_start
win = j_frame("Peter's Butterfly")
can = j_canvas(win, 640, 480)
j_pack(win)
j_show(win)

x =  0.0
y = 20.0
z = 20.0

while obj <> win
  xx = x + 0.01 * ( -10.0 * x + 10.0 * y)
  yy = y + 0.01 * (  28.0 * x - y - x * z )
  zz = z + 0.01 * ( -8.0  * z / 3.0  + x * y )
  j_setcolor(can, Rnd(), Rnd(), Rnd())
  j_drawline(can, x*10+320, -z*10+500, xx*10+320, -zz*10+500)
  x = xX
  y = yY
  z = zZ
  obj = j_getaction()
wend                          
j_quit

I attached Peter's Simple Window in OxygenBasic version as well.


X
« Last Edit: June 04, 2013, 09:13:46 PM by JRS »

JRS

  • Guest
Re: Lorenz
« Reply #2 on: June 04, 2013, 10:38:19 PM »
Peter,

Do you think you could come up with the code for this Lorenz example?



Something like this would also be nice.


Charles Pegge

  • Guest
Re: Lorenz
« Reply #3 on: June 05, 2013, 02:29:08 AM »
Good article on Chaos theory:

http://www.imho.com/grae/chaos/chaos.html

JRS

  • Guest
Re: Lorenz
« Reply #4 on: June 05, 2013, 07:41:13 AM »
Quote
Chaos has already had a lasting effect on science, yet there is much still left to be discovered. Many scientists believe that twentieth century science will be known for only three theories: relativity, quantum mechanics, and chaos.

JRS

  • Guest
Re: Lorenz
« Reply #5 on: June 05, 2013, 09:24:46 PM »
I think this is what Peter intended with his example.





Chaos: When the present determines the future, but the approximate present does not approximately determine the future.

"By Edward Lorenz"
« Last Edit: June 07, 2013, 07:59:45 PM by JRS »