Grafik: "Script Funktionen"

Dieses Fenster dient zum Anzeigen von
Parameterfunktionen fx(t), fy(t).

Beschreibung siehe Hilfe.

Script mit Doppelklick oder STRG+R aufrufen!
____________________________________________


Lissajousche Kurven
===================
ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 2*Math.PI;
var dt  = 0.005;

var a =  100; var m1= 7;
var b =   85; var m2= 13;
var c = 0.15;

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

function fx(t){ return a * Math.cos(m1*t); }
function fy(t){ return b * Math.sin(m2*t+c); }


function draw()
{ t.drawKoordSystem();
  t.drawRaster();  
  t.setPen("red",0.4);
  t.drawGraf("fx","fy");
}
ScriptEnd#Lissajou
-------------------------------------------



Archimedische Spirale
=====================
ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 340;
var dt  = 0.05;

var a = 0.4; var b = 0.2;

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

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


function draw()
{ t.drawKoordSystem();
  //t.drawRaster();  
  t.setPen("red",0.4);
  t.drawGraf("ax","ay");
}
ScriptEnd#Archim
-------------------------------------------


Planetenbewegungen
==================
ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 6.3;
var dt  = 0.005;

var a = 15; var r1 = 70; var r2 = 20;

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

function gx(u) { return (r1-r2)*Math.cos(u);}
function gy(u) { return (r1-r2)*Math.sin(u);}

function ex(u) { return (r1+r2)*Math.cos(u);}
function ey(u) { return (r1+r2)*Math.sin(u);}

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

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

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

  t.setPen("green",0.4);
  t.drawGraf("gx","gy");

  t.setPen("blue",0.4);
  t.drawGraf("ex","ey");
}


ScriptEnd#Planeten
-------------------------------------------


Radlinien
=========
ScriptBegin
var Grafik = "Script Funktionen";
var min = -10;
var max = 10;
var dt  = 0.05;

function init()
{ t.setPage(-140,150,4)
  t.setAntiAliasing();
}

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

  t.setPen("yellowgreen",1.2);
  t.drawGraf("ax","ay");

  t.setPen("gold",1.2);
  t.drawGraf("bx","by");

  t.setPen("cadetblue",1.2);
  t.drawGraf("cx","cy");
}

var ra1 = 20;
var ra2 = 10;
function ax(u) { return ra1*u - ra2*Math.cos(u);}
function ay(u) { return ra2*Math.sin(u) - ra1 + 65;}


var rb1 = 20;
var rb2 = 45;
function bx(u) { return rb1*u - rb2*Math.cos(u);}
function by(u) { return rb2*Math.sin(u) - rb1 + 65;}

var rc1 = 20;
var rc2 = 20;

function cx(u) { return rc1*u - rc2*Math.cos(u);}
function cy(u) { return rc2*Math.sin(u) - rc1 + 65;}

ScriptEnd#Rad
-------------------------------------------

Fermatsche Spirale
==================
ScriptBegin
var Grafik = "Script Funktionen";
var min = 0;
var max = 2.10*Math.PI;
var dt  = 0.005;

var a = 1; var b = a;

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

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


function draw()
{ t.drawKoordSystem();
  //t.drawRaster();  
  
  t.goTo(0,0);
  t.beginPolygon();
 
  t.setPen("red",0.4);
  t.drawGraf("ax","ay");
  
  b=-a; a=-a;
  min=-max+0.08*Math.PI;
  //min=-max;
  max=0;
  t.setPen("green",0.4);
  t.drawGraf("ax","ay");
  t.endPolygon();

  t.setBrush("black");
  t.drawPolygon();
}
ScriptEnd#Fermat
-------------------------------------------
