<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi ..still on the topic of Lorenz attarctors and 
chaos..it might be fun to see if one could  design an anlogue circuit 
that solves the so called' logistic equation'</FONT></DIV>
<DIV><FONT face=Arial size=2>(for those who like maths see </FONT><FONT 
face=Arial size=2><A 
href="http://mathworld.wolfram.com/LogisticEquation.html">http://mathworld.wolfram.com/LogisticEquation.html</A> for 
a nice review and pretty pictures) . The solutions to this equation (or at least 
the recurrence relation thats based on this equation) can approach chaos 
..and show period doubling and bifurcation etc. I would guess  it must 
be possible to solve simple recurrence relations using analogue computer type 
circuits?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>cheers</FONT></DIV>
<DIV><FONT face=Arial size=2>steve thomas</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=aon.912230836@aon.at href="mailto:aon.912230836@aon.at">Jaroslaw 
  Ziembicki</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=synth-diy@dropmix.xs4all.nl 
  href="mailto:synth-diy@dropmix.xs4all.nl">SDIY</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, July 04, 2003 11:07 
AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [sdiy] Digital simulation of the 
  Lorenz attractor</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
  <DIV><FONT face=Arial size=2>I wrote a C program that simulates the 
  Lorenz attractor</FONT></DIV>
  <DIV><FONT face=Arial size=2>and plots the results. The graphic mode 
  should be set.</FONT></DIV>
  <DIV><FONT face=Arial size=2>Here is the basic subroutine. Maybe somebody 
  will find</FONT></DIV>
  <DIV><FONT face=Arial size=2>it useful.</FONT></DIV>
  <DIV><FONT face=Arial size=2>
  <DIV><FONT face=Arial size=2>Regards</FONT></DIV>
  <DIV><FONT face=Arial size=2>Jarek</FONT></DIV></FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT size=2></FONT> </DIV>
  <DIV><FONT size=2>void Lorenz(void)<BR>{<BR>/* simulation 
  variables/parameters: */<BR>  float x = 0.1;<BR>  float y 
  = 0.0;<BR>  float z = 0.0;<BR>  float s = 10.00;<BR>  
  float r = 28.00;<BR>  float b =  2.67;<BR>  
  float dt = 100E-6;<BR>/* graphics' variables/parameters: */<BR>  
  float xxscale = 0.02*(float)(getmaxx()+1); /* for plot scaling 
  */<BR>  float yyscale = 0.01*(float)(getmaxy()+1); /* for plot 
  scaling */<BR>  WORD xx0 = 
  (getmaxx()+1)/2;     /* plot center x */<BR>  
  WORD yy0 = (getmaxy()+1)/2;     /* plot center y 
  */<BR>  WORD color = 15;</FONT></DIV>
  <DIV><FONT size=2></FONT> </DIV>
  <DIV><FONT size=2>/* border, x and y axes: */<BR>  
  setcolor(DARKGRAY);<BR>  
  rectangle(0,0,getmaxx(),getmaxy());<BR>  line(0,yy0,getmaxx(),yy0); 
  line(xx0,0,xx0,getmaxx());<BR>/* loop: */<BR>  while ( kbhit() ) 
  getch();<BR>  do<BR>  {<BR>  
    float dx,dy,dz;<BR>    WORD    
  xx,yy;</FONT></DIV>
  <DIV><FONT size=2></FONT> </DIV>
  <DIV><FONT size=2>    /* put a pixel: */<BR>  
    xx = xx0+(int)(xxscale*x); yy = yy0-(int)(yyscale*z);<BR>  
    putpixel(xx,yy,color);<BR>    /* new x,y,z values: 
  */<BR>    dx = dt * (s*(y-x));<BR>    dy = dt * 
  (r*x - y - x*z);<BR>    dz = dt * (x*y - 
  b*z);<BR>    x += dx; y += dy; z += dz;<BR>  
    /* next color: */<BR>    color++; if ( color > 
  15 ) color = 0;<BR>  }<BR>  while ( !kbhit() );<BR>}</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>