Ciao 访客, welcome back to old school! :p
PImage photo;photo=loadImage("wassilyxxx.jpg");image(photo, 0, 0,width,height);size(800, 600);smooth();noStroke();background(#ffe555);strokeCap(SQUARE); //////////////////////////////////////////////////////rectfill(#faa090);rect(160, 150, 210, 180);//big pink rectfill(#fffad8);rect(190, 200, 20, 20);//little white rect leftfill(#c1da8c);rect(300, 175, 10, 10);//little green leftfill(#fffad8);rect(330, 237, 10, 15);//little white rightfill(#c1da8c);rect(350, 60, 35, 30);//little green rightfill(0);rect(249, 314, 100, 50);//with 2 tri rectfill(0);rect(420, 355, 180, 20);//long black rectfill(#faa090);rect(530, 425, 35, 20);//////////////////////////////////////////////////////triangle//most leftfill(0);triangle(75, 290, 90, 310, 50, 310);triangle(85, 280, 95, 300, 75, 290);//left topfill(#f7e5b7);triangle(120, 50, 150, 110, 90, 110);//left top tri whitefill(0);triangle(120, 50, 133, 75, 107, 75);//left top tri blacktriangle(130, 25, 140, 50, 120, 50);//left top tri black smalltriangle(133, 75, 150, 75, 143, 82);//left top tri black smallltriangle(90, 55, 103, 55, 95, 60);//3 small lefttriangle(103, 55, 113, 55, 110, 60);//3 small righttriangle(95, 60, 110, 60, 105, 70);//3 small bottom//left bottomfill(#3e2844);triangle(90, 500, 180, 500, 135, 530);//purple trifill(0);triangle(120, 530, 150, 530, 135, 550);triangle(130, 550, 140, 550, 135, 560);//big tritriangle(250, 25, 270, 60, 225, 60);//top fill(255);stroke(0);strokeWeight(5);triangle(250, 70, 320, 280, 250, 310);//with lines trifill(0);noStroke();triangle(249, 360, 300, 550, 250, 550);//black trifill(#3e2844);triangle(249, 550, 270, 570, 230, 570);//purplefill(0);triangle(340, 410, 410, 410, 380, 490);fill(#3e2844);triangle(340, 410, 375, 410, 380, 490);//purple black trifill(#9dbcdb);triangle(380, 490, 415, 490, 405, 505);//middlefill(#9bb4d7);triangle(510, 15, 550, 40, 510, 60);//topfill(#7f6b9d);triangle(510, 90, 520, 120, 510, 125);fill(0);triangle(510, 125, 490, 170, 470, 160);fill(#271f2b);triangle(470, 160, 480, 200, 445, 200);triangle(560, 130, 570, 160, 550, 160);//tixingfill(255);triangle(425, 210, 510, 210, 450, 260);///////int start = 0; // 0 = white, 1 = blackfor (int y=210;y<255;y+=7) { int sign = start; if (start == 0) { start = 1; } else { start = 0; } for (int x=425+(y-210)/2;x<503-(y-210);x+=7) { if (sign == 1) { fill(0); sign = 0; } else { fill(255); sign = 1; } quad(x, y, x+7, y, x+12, y+8, x+3, y+8); }}//////fill(#3e2844);triangle(425, 210, 450, 260, 400, 260);fill(0);triangle(511, 210, 530, 260, 450, 260);triangle(425, 260, 435, 320, 420, 320);triangle(490, 260, 500, 320, 485, 320);triangle(480, 480, 610, 480, 550, 505);fill(#af9bc5);triangle(510, 505, 550, 505, 540, 555);//rightfill(0);triangle(650, 70, 690, 105, 640, 105);fill(#5f525a);triangle(660, 105, 705, 170, 590, 170);fill(#cab8b5);triangle(640, 245, 690, 245, 670, 310);fill(0);triangle(740, 300, 750, 300, 745, 320);fill(#50304a);triangle(745, 320, 750, 345, 740, 345);//////////////////////////////////////////////////////line//leftstroke(0);strokeWeight(2);line(40, 210, 100, 210);stroke(#392622);strokeWeight( ;line(120, 165, 120, 380);stroke(#392622);strokeWeight(2);line(300, 25, 300, 75);stroke(0);strokeWeight(4);line(330, 103, 330, 180);line(345, 103, 345, 180);stroke(0);strokeWeight(4);line(360, 400, 410, 400);//middlestrokeWeight(2);line(520, 180, 600, 180);line(530, 190, 590, 190);strokeWeight(1);line(560, 160, 560, 260);line(560, 210, 550, 255);line(560, 210, 570, 255);line(560, 275, 560, 340);line(520, 450, 580, 450);line(510, 460, 590, 460);//rightstrokeWeight(1);line(650, 170, 645, 235);line(650, 170, 655, 235);line(650, 170, 665, 235);line(650, 170, 675, 235);stroke(0);strokeWeight(3);line(670, 320, 670, 405);stroke(#624a60);line(690, 320, 690, 400);stroke(0);strokeWeight(11);line(705, 25, 760, 25);strokeWeight(3);line(705, 50, 760, 50);strokeWeight( ;line(705, 80, 760, 80);strokeWeight(6);line(705, 125, 760, 125);strokeWeight(3);line(705, 160, 760, 160);//////////////////////////////////////////////////////quadfill(0);quad(73, 110, 167, 110, 165, 115, 75, 115);quad(545, 205, 575, 205, 570, 210, 548, 210);quad(645, 235, 675, 235, 673, 240, 647, 240);//////////////////////////////////////////////////////ellipsenoStroke();fill(#bde0d0);ellipse(65, 175, 37, 37);fill(#f3d8c0);ellipse(160, 315, 65, 65);fill(255);ellipse(450, 405, 35, 35);//////////////////////////////////////////////////////arcnoFill();stroke(0);strokeWeight(10);arc(135, 410, 95, 95, radians(0), radians(180));strokeWeight(15);arc(515, 130, 125, 125, radians(165), radians(375));strokeWeight(3);arc(405, 540, 25, 25, radians(0), radians(180));strokeWeight( ;arc(610, 400, 40, 40, radians(160), radians(380));strokeWeight(7);stroke(#402636);arc(640, 440, 50, 50, radians(190), radians(350));stroke(0);strokeWeight(3);arc(665, 450, 40, 40, radians(0), radians(180));stroke(#734750);strokeWeight( ;arc(715, 525, 30, 30, radians(340), radians(560));//////////////////////////////////////////////////////other//rect cross ellipsenoStroke();fill(#54293d);triangle(160, 285, 187, 331, 160, 331);arc(160, 315, 65, 65, radians(270), radians(390));//tri lineeeeeeeestroke(0);strokeWeight(5);line(249, 146, 275, 138);line(249, 162, 275, 152);line(249, 176, 279, 164);line(249, 186, 282, 174);line(249, 196, 285, 183);line(249, 205, 288, 191);line(249, 216, 291, 200);line(249, 227, 294, 209);line(249, 238, 298, 219);line(249, 250, 300, 229);line(249, 263, 304, 240);line(249, 277, 308, 252);line(249, 294, 316, 267);fill(0);triangle(250, 70, 265, 125, 250, 130);strokeWeight(5);line(250, 70, 250, 310);//two purple trifill(#634e76);noStroke();triangle(249, 314, 349, 314, 297, 340);fill(#a697ba);triangle(297, 340, 349, 364, 249, 364);
float xA;float yA;float diam;void setup(){ size(500, 500); background(0); smooth(); noStroke(); xA=250; yA=250; diam=100; colorMode(HSB, 100);}void draw(){ ellipse(xA, yA, diam, diam);}void mouseMoved(){ fill(44); ellipse(xA, yA, diam, diam);}void mousePressed() { float k=dist(mouseX, mouseY, xA, yA); if (k<diam/2) { fill(random(100), random(200), 200); ellipse(xA, yA, diam/2, diam/2); }}
float xB;float yB;float widthB;float heightB;void setup(){ size(500, 500); background(0); smooth(); noStroke(); xB=200; yB=180; widthB=100; heightB=100; colorMode(HSB, 100);}void draw(){ rect(xB, yB, widthB, heightB);}void mouseMoved(){ fill(HSB,333,60,20); rect(xB, yB, widthB, heightB);}void mousePressed() { if (mouseX>xB && mouseX<xB+widthB && mouseY>yB && mouseY<yB+heightB) { fill(random(360), 40, random(200)); rect(20, 20, width-40, height-40); }}
float x,y;float startDegree,endDegree,midDegree;float increment;int count;void setup(){ size(500,500); background(255); frameRate(30); smooth(); x = width/2; y = height/2; startDegree = 180; increment = 5; count = 36; endDegree = startDegree+increment*count; midDegree = (startDegree+endDegree)/2;}void draw(){ background(255); for(int i=0;i<count;i++){ float thickness = (90-abs(startDegree+i*increment-midDegree))/5; strokeWeight(thickness); arc(x,y,200,200,radians(startDegree+i*increment),radians(startDegree+(i+1)*increment)); }}
void setup(){ size(700,600); color bgc = color(232,189,14); background(bgc); color lightBlue = color(131,173,185); color midPurple = color(57,39,98); color darkPurple = color(26,18,44); color lightPurple;}
color lightBlue = color(131,173,185);color midPurple = color(57,39,98);color darkPurple = color(26,18,44);color lightPurple;color bgc = color(232,189,14);void setup(){ size(700,600); background(bgc);}
郭老师,如何把移动过程中的残影弄走而不清空画面上其他的图形?求指导
还有那个在三角形里黑白格格是一个个长方形画上去的还是......郭老师麻烦说一下,谢谢