Size of this preview: 800 × 450 pixels. Other resolution: 1,280 × 720 pixels.
Original file (1,280 × 720 pixels, file size: 171 KB, MIME type: image/jpeg)
Summary
void setup(){
size(500,500); background(255);
}
void draw(){
if (mousePressed);{ background(129, 130, 87); noFill(); strokeWeight(4); stroke(174, 221, 60); }
float o=60;
for(int x=0; x<500; x+=2*o+2*o*sin(PI/6)){ for(int y=0; y<500; y+=2*o*cos(PI/6)){ drawHexagon(x, y, o); drawHexagon(x+o+o*sin(PI/6), y+o*cos(PI/6), o); }
} }
void drawHexagon(float x, float y, float radius) {
pushMatrix(); translate(x, y); beginShape(); for (int i = 0; i < 6; i++) { pushMatrix(); float angle = PI*i/3; vertex(cos(angle) * radius, sin(angle) * radius); popMatrix(); } endShape(CLOSE); popMatrix(); fill (mouseX, (mouseX+mouseY), mouseY); ellipse ( x, y, 40, 40 );
float dimension = mouseX; if (mousePressed) { ellipse (dimension,dimension,dimension,dimension); } else { stroke (0); fill (255); }
}
Copyright status:
Source:
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 10:44, 21 November 2014 | 1,280 × 720 (171 KB) | Kiso8235 (talk | contribs) | void setup(){ size(500,500); background(255); } void draw(){ if (mousePressed);{ background(129, 130, 87); noFill(); strokeWeight(4); stroke(174, 221, 60); } float o=60; for(int x=0; x<500; x+=2*o+2*o*sin(PI/6)){ for(in |
You cannot overwrite this file.
File usage
The following page uses this file: