Grafik "Script Funktionen"

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

Script mit Doppelklick oder STRG+R aufrufen!
____________________________________________


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

var min = 40;   // t Minimum
var max = 250;  // 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 = 0.8; var b = 0.02;

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

function draw()
{ t.setPen("lightblue", 0.2);
  t.drawGraf("fx","fy");

  min= -140; max= 140; dt= 0.2; a=2; b=0.03;
  t.setPen("red", 0.4);
  t.drawGraf("fy");
}
ScriptEnd#LogExp
____________________________________________


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

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

var a = 0.3; var b = 0.2;

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

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

function draw()
{ t.drawGraf("fx","fy");
}
ScriptEnd#Arch
____________________________________________


Spirale ?
=========

ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 150;
var dt  = 0.05;

var a = 0.8;
var b = 0.6;

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

function draw()
{ t.drawGraf("ax","ay");
}
ScriptEnd
____________________________________________


Parameterline 1
===============

ScriptBegin
var Grafik = "Script Funktionen";
var min = 10;
var max = 125;
var d   = 0.05;

function ax(u)
{ var a = 0.3; var b = 0.05;
  return a*Math.exp(b*u)*Math.cos(u);
}

function ay(u)
{var a = 2.5; var b = 0.03; 
 return a*Math.exp(b*u)*Math.sin(u*0.6); 
}

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

function draw()
{ t.drawKoordSystem();
  t.setPen("white", 0.2);

  t.drawGraf("ax","ay");
}
ScriptEnd#Para1
____________________________________________


Zwei Spiralen
=============

ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 208;
var dt  = 0.05;


var a = 0.4; var b = 0.05;
function ax(u){ return a*Math.exp(b*u)*Math.cos(u);}
function ay(u){ return a*Math.exp(b*u)*Math.sin(u);}


function bx(u) {var a = 1.5; return a * u * Math.cos(u*0.5);}
function by(u){ var b = 1.9; return b * u * Math.sin(u); }


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

function draw()
{ t.drawKoordSystem();
  t.setPen("YellowGreen", 0.4);

  t.drawGraf("ax","ay",78,-45);
  
  t.goTo(23,45);
  min   = 10;
  max   = 500;
  d     = 0.02;
     
  t.setPen("red", 0.2);
  t.drawGraf("bx","by",-60,-80);
}

ScriptEnd#Log2
____________________________________________

