162

1

#1

32725a68

Haven't finished all the videos yet, but the ones I have seen were incredibly helpful. Not that this was incredibly complex, but from having no prior knowlege of how to code, you can see how helpful they were.

Here's the code: 

size(500, 500);
//current width = 500, current height = 500

//triangles from dark to light
fill(0);
strokeWeight(4);
triangle(200,1, 499,350, 1,499);

fill(10);
strokeWeight(4);
triangle(150,1, 499,300, 50,499);

fill(20);
strokeWeight(4);
triangle(100,1, 499,250, 100,499);

fill(30);
strokeWeight(4);
triangle(50,1, 499,200, 150,499);

fill(40);
strokeWeight(4);
triangle(1,1, 499,150, 200,499);

fill(50);
strokeWeight(4);
triangle(1,50, 499,100, 250,499);

fill(60);
strokeWeight(4);
triangle(1,100, 499,50, 300,499);

fill(120);
strokeWeight(4);
triangle(1,150, 499,1, 350,499);

fill(140);
strokeWeight(4);
triangle(1,200, 450,1, 400,499);

fill(160);
strokeWeight(4);
triangle(1,250, 400,1, 450,499);

fill(180);
strokeWeight(4);
triangle(1,300, 350,1, 499,499);

fill(200);
strokeWeight(4);
triangle(1,350, 300,1, 499,450);

fill(250);
strokeWeight(4);
triangle(1,400, 250,1, 499,400);

//center piece, starting from center rectangle out
fill(0);
strokeWeight(2);
rect(160,160,180,180);

fill(250);
strokeWeight(2);
ellipse(250,250,175,175);

strokeWeight(2);
rect(189,189,122,122);

stroke(0);
fill(10);
strokeWeight(2);
ellipse(250,250,120,120);

stroke(250);
fill(200);
strokeWeight(2);
rect(210,210,80,80);

stroke(0);
fill(40);
strokeWeight(2);
ellipse(250,250,75,75);

stroke(250);
strokeWeight(2);
rect(225,225,50,50);

stroke(0);
fill(140);
strokeWeight(3);
ellipse(250,250,50,50);

fill(250);
stroke(0);
strokeWeight(10);
rect(243,243,15,15);

//line work

strokeWeight(1);

//top left
line(250,250,90,1);
line(250,250,80,1);
line(250,250,70,1);
line(250,250,60,1);
line(250,250,50,1);
line(250,250,40,1);
line(250,250,30,1);
line(250,250,20,1);
line(250,250,10,1);
line(250,250,1,1);
line(250,250,1,10);
line(250,250,1,20);
line(250,250,1,30);
line(250,250,1,40);
line(250,250,1,50);
line(250,250,1,60);
line(250,250,1,70);
line(250,250,1,80);
line(250,250,1,90);
line(250,250,1,100);
//top right
line(250,250,410,1);
line(250,250,420,1);
line(250,250,430,1);
line(250,250,440,1);
line(250,250,450,1);
line(250,250,460,1);
line(250,250,470,1);
line(250,250,480,1);
line(250,250,490,1);
line(250,250,500,1);
line(250,250,500,10);
line(250,250,500,20);
line(250,250,500,30);
line(250,250,500,40);
line(250,250,500,50);
line(250,250,500,60);
line(250,250,500,70);
line(250,250,500,80);
line(250,250,500,90);
//bottom right
line(250,250,500,410);
line(250,250,500,420);
line(250,250,500,430);
line(250,250,500,440);
line(250,250,500,450);
line(250,250,500,460);
line(250,250,500,470);
line(250,250,500,480);
line(250,250,500,490);
line(250,250,500,500);
line(250,250,490,500);
line(250,250,480,500);
line(250,250,470,500);
line(250,250,460,500);
line(250,250,450,500);
line(250,250,440,500);
line(250,250,430,500);
line(250,250,420,500);
line(250,250,410,500);
//bottom left
line(250,250,10,500);
line(250,250,20,500);
line(250,250,30,500);
line(250,250,40,500);
line(250,250,50,500);
line(250,250,60,500);
line(250,250,70,500);
line(250,250,80,500);
line(250,250,90,500);
line(250,250,100,500);
line(250,250,1,500);
line(250,250,1,490);
line(250,250,1,480);
line(250,250,1,470);
line(250,250,1,460);
line(250,250,1,450);
line(250,250,1,440);
line(250,250,1,430);
line(250,250,1,420);
line(250,250,1,410);

Comments

Please sign in or sign up to comment.