Anwendung der Pflasterungen M1, Typ2.

Konstruktion siehe Pflaster02.txt
============================================

ScriptBegin
var Grafik = "Script Escher"

var a=8;              // Strecke AB 
    wb=130;           // Winkel AB,BC
    b=1.3*a;          // Strecke BC 
    wc=88;            // Winkel BC,CD
    c=1.8*a;          // Strecke CD
    
    w=40;              // Drehung  
    x0=-65; y0=-120;  // PflasterAnfangspunkt
    RandC  ="black";
    RandW  =0.3;
    ShiftC ="green";
    Fill0  ="DeepSkyBlue";//"lightblue";
    Fill1  ="royalblue";
    Fill2  ="lightgreen";
    Fillp  ="crimson";
    morph  =2.5; 


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


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

  defBefehle();
  defSplines();
  defFliesen();
  drawPflaster();

  t.setPen(RandC); t.rahmen();
}


function morphX(x,y)
{//return x;
 return x*(morph*Math.exp(-Math.sqrt(x*x+y*y)/30)+1);
}

function morphY(x,y)
{//return y;
 return y*(morph*Math.exp(-Math.sqrt(x*x+y*y)/30)+1);
}



function defBefehle()
{ wd=720-wb-wc;
  t.setPen("black");
  
  t.beginPolygon(); t.setNoStyle();
  t.goTo(0,0);               t.defPoint("A"); 
  t.turnTo(0);    t.move(a); t.defPoint("B");
  t.turn(180-wb); t.move(b); t.defPoint("C");
  t.turn(180-wc); t.move(c); t.defPoint("D");
  t.turn(180-wd); t.move(a); t.defPoint("E");
  t.turn(180-wb); t.move(b); 
  t.endPolygon(2);
  t.setPen(); t.defDraw("Sechseck");

  t.setPen(RandC,RandW); 
  t.defLine("AB","A","B");
  t.defLine("BC","B","C");
  t.defLine("CD","C","D");

  t.setPen(ShiftC,0.5);
  t.defVector("Shift1","A","C");    
  t.defVector("Shift2","B","D");  
  t.defVector("Shift3","C","E");  
}



function defSplineAB()
{t.setNoStyle();
 t.beginPolygon();
 t.goTo(0,0);
 t.moveTo(8,-10);
 t.moveTo(9,3);
 t.moveTo(21,-7);
 t.moveTo(25,-5);
 t.moveTo(17,5);
 t.moveTo(25,10);
 t.moveTo(35,0);
 t.endPolygon(3);
 t.splinePolygon()
} 


function defSplineBC()
{t.setNoStyle();
 t.beginPolygon();
 t.goTo(30,0);
 t.moveTo(26,32);
 t.moveTo(55,15);
 t.moveTo(55.0687,29.8757);
 t.endPolygon(3);
 t.splinePolygon();
}

function defSplineCD()
{t.setNoStyle();
 t.beginPolygon();
 t.goTo(0,0);
 t.moveTo(8,-10);
 t.moveTo(9,3);
 t.moveTo(21,-7);
 t.moveTo(25,-5);
 t.moveTo(17,5);
 t.moveTo(25,10);
 t.moveTo(35,0);
 t.endPolygon(3);
 t.splinePolygon()
} 



function defSplines()
{ t.setPen(RandC,RandW); 
  
  t.setPolygon("AB"); t.endPolygon(3);
  defSplineAB(); t.defDraw("AB",3);

  t.setPolygon("BC"); t.endPolygon(3);
  defSplineBC(); t.defDraw("BC",3);

  t.setPolygon("CD"); t.endPolygon(3);
  defSplineCD(); t.defDraw("CD",3);
} 



function  defFliesen()
{ t.beginPolygon();
  t.setPolygon("AB",0);
  t.addPolygon("BC",0);
  t.addPolygon("CD",0);
  t.addPolygon("AB",-1);
  t.addPolygon("BC",-1);
  t.addPolygon("CD",-1);
  t.endPolygon();
  t.setPen(RandC,RandW,1);

  t.setBrush(Fill0); t.defDraw("Fliese0"); 
  t.setBrush(Fill1); t.defDraw("Fliese1");
  t.setBrush(Fill2); t.defDraw("Fliese2");

  t.setNoStyle();
  t.goTo(-9,13); t.isoPolygon(1,-2);  
  t.setPen(RandC,0); t.setBrush(Fillp); t.defDraw("Fliese2",1);
}



function drawPflaster()
{
  t.turnTo(w);
  t.setPen(RandC);  t.setNoStyle(); 
 
  for(j=-5; j<17; j++)
  { t.goTo(x0,y0);
    t.shift("Shift2",j);
  
    for(i=-8; i<16; i++)
    { n=(i+j) % 3;  
      t.morphDraw("Fliese"+n);
      t.shift("Shift3",-1);
    }    
  }
}


ScriptEnd#1

============================================
Script 2
Konstruktion Pflasterung Gruppe M1, Typ2.

============================================
ScriptBegin
var Grafik = "Script Escher"
    w=0;              // Drehung   
    x0=-135; y0=-120;  // PflasterAnfangspunkt
    RandC  ="black";
    Fillp  ="crimson";
    morph  =2.5; 

function init() //Initialisierungen
{ //t.clrDraw();
  t.defScript("Fliesen","./Pflaster02a.txt");
  t.setBrush(Fillp);
  t.setPage();
  t.setAntiAliasing(); 
} 


function draw() //Zeichenbefehle
{ //t.drawKoordSystem();
  //t.drawRaster();
  drawPflaster();
}

function morphX(x,y)
{//return x;
 return x*(morph*Math.exp(-Math.abs(x)/30)+0.9);
}

function morphY(x,y)
{//return y;
 return y*(morph*Math.exp(-Math.abs(y)/20)+0.9);
}


function drawPflaster()
{
  t.turnTo(w);
  t.setPen("black");  t.setNoStyle(); 
 
  for(j=-5; j<24; j++)
  { t.goTo(x0,y0);
    t.shift("Shift2",j);
  
    for(i=-2; i<18; i++)
    { n=(i+j) % 3;  
      t.morphDraw("Fliese"+n);
      t.shift("Shift3",-1);
    }    
  }
}

ScriptEnd#2

============================================
Script 3
Variante: Pflasterung Gruppe M1, Typ2.

============================================
ScriptBegin
var Grafik = "Script Escher"
    w=0;              // Drehung   
    x0=-65; y0=-120;  // PflasterAnfangspunkt
    RandC  ="black";
    Fillp  ="crimson";
    morph  =2.5; 

function init() //Initialisierungen
{ //t.clrDraw();
  t.defScript("Fliesen","./Pflaster02a.txt");
  t.setBrush(Fillp);
  t.setPage();
  t.setAntiAliasing(); 
} 


function draw() //Zeichenbefehle
{ //t.drawKoordSystem();
  //t.drawRaster();
  drawPflaster();
}

function morphX(x,y)
{//return x;
 return x*(morph*Math.exp(-Math.abs(x)/30)+0.9);
}

function morphY(x,y)
{//return y;
 return y*(morph*Math.exp(-Math.abs(y)/20)+0.9);
}


function drawPflaster()
{
  t.turnTo(w);
  t.setPen("black");  t.setNoStyle(); 
 
  for(j=-5; j<17; j++)
  { t.goTo(x0,y0);
    t.shift("Shift2",j);
  
    for(i=-8; i<16; i++)
    { n=(i+j) % 3;  
      t.morphDraw("Fliese"+n);
      t.shift("Shift3",-1);
    }    
  }
}

ScriptEnd#3

