Grafik: Lindenmayer02

Script mit Doppelklick oder STRG+R aufrufen!
____________________________________________


===========================================
L-Systeme Bäume
--------------------------- ScriptBegin
var Grafik  = "Script Lindenmayer";
var Tiefe   = 5;
var Alpha   = 65.7;
var Schritt = 2.2;
var Axiom   = "F";
var Regeln  = "F()";


function F()
{ return "F[+F]F[-F]F"; 
}


function init()
{ //t.setBrush("LightGray");
  //t.showScript();
}

function draw()
{ //t.drawKoordSystem();
  t.setPen("Black",0.3);
  
  var x=-100;
  Baum( x     ,-85, 1, this);
  Baum( x+40  ,-85, 2, this);
  Baum( x+80  ,-85, 3, this);
  Baum( x+150 ,-85, 4, this);
}


function Baum(x,y, n, t)
{ Tiefe=n;
  t.makeLSystem();
  t.msg(t.showLInfo()); t.setNoStyle(); t.turnTo(90); t.moveTo(x,y);

  t.drawLSystem();  t.text(x-2,y-5, "n="+n); 
}
ScriptEnd#1 -------------------------------


===========================================
L-Systeme Bäume
--------------------------- ScriptBegin
var Grafik  = "Script Lindenmayer";
var Tiefe   = 1;
var Alpha   = 22.5;
var Schritt = 2.2;
var Axiom   = "F";
var Regeln  = "F()";


function F()
{ return "FF-[-F+F+F]+[+F-F-F]"; 
}


function init()
{ t.setBrush("LightCyan");
}

function draw()
{ //t.drawKoordSystem();
  t.setPen("Red",0.3);
  
  Baum(-120,-85, 1, this);
  Baum( -90,-85, 2, this);
  Baum( -45,-85, 3, this);
  Baum(  30,-85, 4, this);
}


function Baum(x,y, n, t)
{ Tiefe=n;
  t.makeLSystem();
  t.msg(t.showLInfo()); t.setNoStyle(); t.turnTo(90); t.moveTo(x,y);

  t.drawLSystem();  t.text(x-2,y-5, "n="+n); 
}
ScriptEnd#2 -------------------------------




===========================================
L-Systeme Bäume
--------------------------- 
ScriptBegin
var Grafik  = "Script Lindenmayer";
var Tiefe   = 1;
var Alpha   = 20;
var Schritt = 2.8;
var Axiom   = "F";
var Regeln  = "F()";


function F()
{ return "F[+F]F[-F][F]"; 
}


function init()
{ t.setBrush("DarkKhaki");
  t.setPage();
}

function draw()
{ //t.drawKoordSystem();
  t.setPen("white",0.3);
  
  var x=-100;
  Baum( x    ,-85, 1);
  Baum( x+30 ,-85, 2);
  Baum( x+60 ,-85, 3);
  Baum( x+95 ,-85, 4);
  Baum( x+160,-85, 5);
}


function Baum(x,y, n)
{ Tiefe=n;
  t.makeLSystem();
  t.msg(t.showLInfo()); 
  t.setNoStyle(); t.turnTo(90); t.moveTo(x,y);

  t.drawLSystem();  t.text(x-2,y-5, "n="+n); 
}
ScriptEnd#3
-------------------------------

