
In 1922 he traveled to Spain where he copied many of the tiling patterns of Alhambra.Filling the plane has become a real mania to which I have become addicted and from which I sometimes find it hard to tear myself away.








, hold SHIFT and move it to the bottom








//this clears the combo box
colors.removeAll();
//this sets the combo box to the elements in the list
colorList = new Array("red", "green", "blue", "mix");
//this loops over the color list and adds the items to the combo box
for (i=0; i<colorList.length; i++) {
colors.addItem(colorList[i]);
}
//this loops from 10 to 100 in steps of ten
//and adds those values to the scale combo
for (i=10; i<=100; i+=10) {
scaleCombo.addItem(i);
}
//this sets the initial scale to 10
scale=10;
//this creates a listener for the scale combo
selectScale=new Object();
selectScale.change=function(eventObj){
//when the user changes the combo box, the scale is updated
scale=eventObj.target.value;
}
//this attaches the listener to the combo box
scaleCombo.addEventListener("change",selectScale);
//this creates a listener for the color combo
selectColor = new Object();
selectColor.change = function(eventObj) {
//when the user changes the combo box, the tessellate method
//is called and a color (or number 0-3) is passed to it
tessellate(eventObj.target.selectedIndex);
};
//this attaches the listener to the combo box
colors.addEventListener("change", selectColor);
//this defines the getColor() function
function getColor(whichColor) {
switch(whichColor+1){
case 1:
//case 1 is red
//sets red to a random number between 0 and 255
red = Math.floor(Math.random()*256);
//sets green to 0
green=0;
//sets blue to 0
blue=0;
//gets you out of the switch structure
break;
case 2:
//case 2 is green
//set green to a random number between 0 and 255
green = _____________________________
red=0;
blue=0;
break;
case 3:
//case 3 is blue
set blue to a random number between 0 and 255
blue = Math.floor(Math.random()*256);
green=_____;
red=_____;
break;
default:
//default is a random mix of red, green and blue
red = Math.floor(Math.random()*256);
green=Math.floor(Math.random()*256);
blue=Math.floor(Math.random()*256);
}
/* bitwise shift
To get a random color you will use the << operator with the | to get a random
number*/
//create a variable named randomColor and set it to (red shifted left 16)
//bitwise OR green shifted left 8 bitwise OR blue
__________ = red << 16 | green << 8 | _____;
}
//this defines the tessellate function
function tessellate(whichColor) {
//if there is a tessellation already, this removes it
if(canvas){
removeMovieClip(canvas);
}
//a new movie clip that will hold the tessellation is created
_root.createEmptyMovieClip("canvas",1);
//this keeps the combo boxes on top
_root.colors.swapDepths(_root.getNextHighestDepth());
_root.scaleCombo.swapDepths(_root.getNextHighestDepth());
/*this is the _x property of the tile to the right of the original.
Multiplied by 100 then divided by the width of the tile*/
ratioW = (______*100)/____;
/*this is the _y property of the tile below the original.
Multiplied by 100 then divided by the height of the tile*/
ratioH = (______*100)/_____;
//how many rows do you want?
for (r=0; r<=___; r++) {
//how many columns do you want?
for (c=0; c<=___; c++) {
mc = canvas.attachMovie("tile", "tile"+r+"_"+c, canvas.getNextHighestDepth());
mc._xscale = scale;
mc._yscale = _____;
mc._x = (c*(mc._width*ratioW)/100)-mc._width;
mc._y = (r*(mc._height*ratioH)/100)-mc._height;
getColor(whichColor);
//change the color of the col movie clip of the tile (mc)
nc = new Color(mc.____);
nc.setRGB(randomColor);
mc.onRelease = function() {
getColor(3)
nc = new Color(this.col);
nc.setRGB(randomColor);
};
}
}
}