Flexible surface and conductive surface

by Yoav

This week I make two projects and also did experiments with the voronoi code. all is here:
1.The code for making a beehive

This is the basic code, from this code it is possible to create spiral, circular and other patterns:
/*This example illustrates a simple method to generate a set of deliberately placed
points to control the structure of a voronoi diagram. This particular example
create a beehive and allows many patterns to be built on it.*/
void setup() {
size(600,600,P3D); //size of your intended pattern
noLoop(); // don't need to use the draw loop
/*unique name for your file. if left unchanged,
will simply save file with current milisecond*/
String fileName= "voronoi"+millis()+".pdf";
beginRaw(PDF, fileName); //enables you to save your design to a pdf
setupVoronoi(); // create your voronoi generator

int spacing=150; // the distace between the centers of the hexagons
float yDiffrence=(cos((float)Math.PI*2/12))*spacing; // the height of the rows
int pointsOnSpiral=40; // for making a spiral
int pointsOnCircle=11; // setting number of points if you want to make circles in the centers of the hexagons
int circleDiameter=50; // setting the diameter if you want to make circles in the centers of the hexagons

for (int j=0;j<=height/spacing;j++){ // loop for creating rows
for (int i=0;i<=width/spacing;i++){ // loop for creating dots in a row , each loop cicle creates two dots (one on fot and offset from the other)

float x1=spacing*i; // the x for the first point
float x2=spacing*i +spacing/2; // the x for the second point
float y1= j*2*(yDiffrence); // the y for the first point
float y2= (j*2+1)*(yDiffrence); // the y for the second point
//
// this will create the beehive
voronoi.addPoint(new Vec2D(x1,y1));
voronoi.addPoint(new Vec2D(x2,y2));

// this will create a spiral in the middle of each hexigon
//spiral(x1,y1,pointsOnSpiral);
// spiral(x2,y2,pointsOnSpiral);

//this will create a circle in the middle of each hexigon
// circle(x1,y1,pointsOnCircle,circleDiameter);
// circle(x2,y2,pointsOnCircle,circleDiameter);
}
}

drawVoronoi(); //renders your voronoi
endRaw(); //ends the recording

}
void spiral (float centerX,float centerY,int drawLimitForSpiral){
int theta=0;
for(int k=0;k<drawLimitForSpiral;k++){
theta +=4;
//drawPoint(width/2,height/8,theta/2,theta/2);
float xPos = sin(theta/2)*theta/2+centerX;
float yPos = cos(theta/2)*theta/2+centerY;
voronoi.addPoint(new Vec2D(xPos, yPos));

}
}

void circle(float cenX,float cenY, int Dlimit,float diameter){
float xPos; // will be filled with the X value of the center of the circel
float yPos;// will be filled with the y value of the center of the circel
for(int i=0;i<Dlimit;i++){ //loop over the number of points in the circle
float _alpha = (float)Math.PI*2/Dlimit; // determines the degree position of your current point
float cirtheta = i*_alpha; //current position on circle for your intended point
xPos = sin(cirtheta)*diameter+cenX;
yPos= cos(cirtheta)*diameter+cenY;
voronoi.addPoint(new Vec2D(xPos, yPos));
}

}



2. The flexible surface








3. The conductive surface

THe conductive surface is made out of two pieces of conductive fabric with regular fabric in between. I used conductive fabrice with glue on one side that can stick with heat when ironing. First I glued the conductive fabric to the regular fabric. I cut it in beehive shape with the laser cutter, then, I cut the other conductive fabric (without gluing it) in the same pattern. Then I glued the fabric to the other side of the regular fabric. So the regular fabric is an insulator.
Each side of the new fabric is now conductive and I can connect one side to positive and other side to negative. I connected LED to one side of the fabric when it touches the other side it is lit.