Verschiedene Spiralen mit "Script Funktionen"

Es werden zwei Paramterfunktionen fx(u)
und fy(u) mit drawGraf("fx","fy") verwendet.

Script mit Doppelklick oder STRG+R aufrufen!
____________________________________________


Logarithmische Spirale
======================
ScriptBegin
var Grafik = "Script Funktionen";

var min = -60;   // t Minimum
var max = -1;  // t Maximum
var dt  = 0.05; // dt Schritt

function fx(u){ return a*Math.exp(b*u)*Math.cos(u);}
function fy(u){ return a*Math.exp(b*u)*Math.sin(u);}

var a = 180; var b = 0.1;

function init()
{ t.setPage();
  t.setAntiAliasing();
}

function draw()
{ t.drawKoordSystem();
  t.drawRaster();  
  t.setPen("red", 0.3);
  t.drawGraf("fx","fy");

  t.text(80,-86,"Logarithmische Spirale");
}
ScriptEnd#SpiraleLog
____________________________________________


Archimedische Spirale
=====================

ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 80;
var dt  = 0.01;

var a = 1.3; var b = 1.2;

function fx(u){ return a * u * Math.cos(u); }
function fy(u){ return b * u * Math.sin(u); }

function init()
{ t.setPage();
  t.setAntiAliasing();
}

function draw()
{ t.drawKoordSystem();
  t.drawRaster();  

  t.setPen("red", 0.3);
  t.drawGraf("fx","fy");

  t.text(80,-86,"Archimedische Spirale");
}
ScriptEnd#SpiraleArch

____________________________________________



Fermatsche Spirale
=====================
ScriptBegin
var Grafik = "Script Funktionen";

var min = 0;
var max = 28*Math.PI;
var dt  = 0.01;

var a = 10; 
    b = a;


function init()
{ t.setAntiAliasing();
}

function fx(x) {return x;}

function ax(u){ return a * Math.sqrt(u) * Math.cos(u) }
function ay(u){ return b * Math.sqrt(u) * Math.sin(u) }


function draw()
{ //t.drawKoordSystem();
  //t.drawRaster();  

  t.setPen("red");
  t.drawGraf("ax","ay");
  
  a=-a; b=-b; max = max - Math.PI;
  t.setPen("green");
  t.drawGraf("ax","ay");
  t.text(80,-86,"Zwei Fermatsche Spiralen");
}
ScriptEnd#SpiraleFerm
____________________________________________


Hyperbolische Spirale
=====================

ScriptBegin
var Grafik = "Script Funktionen";
var min = 0.25;
var max = 50;
var dt  = 0.05;

var a = 60;
    b = a;

function ax(u){ return a * (1/u) * Math.cos(u); }
function ay(u){ return b * (1/u) * Math.sin(u); }

function init()
{ t.setPage(-50,105,4);
  t.setAntiAliasing();
}

function draw()
{ t.drawKoordSystem();
  t.drawRaster();  

  t.setPen("red"); 
  t.drawGraf("ax","ay");

  t.text(30,-26,"Hyperbolische Spirale");
}
ScriptEnd#SpiraleHype
____________________________________________


Lituus Spirale
==============

ScriptBegin
var Grafik = "Script Funktionen";
var min = 0.07;
var max = 1000;
var dt  = 0.05;

var a = 60;
    b = a;

function ax(u){ return a * Math.sqrt(1/u) * Math.cos(u); }
function ay(u){ return b * Math.sqrt(1/u) * Math.sin(u); }

function init()
{ t.setPage(-50,105,4);
  t.setAntiAliasing();
}

function draw()
{ t.drawKoordSystem();
  t.drawRaster();  

  t.setPen("red"); 
  t.drawGraf("ax","ay");

  t.text(30,-26,"Lituus Spirale");
}
ScriptEnd#SpiraleLith
____________________________________________

