-
使用
processing
绘制萌萌哒熊猫脑袋
:
void setup(){
size(900,300);
smooth();
}
///////////////////////////
///////////////////
void draw(){
background(200);
for(int x = 60; x < width;
x += 160){
for(int y = 50; y < height;
y += 160){
panda(x,y);
}
}
}
///////////////////////////////////////
//////
void panda(int x, int y){
pushMatrix();
translate(x,y);
fill(0);
strokeWeight(1);
ellipse(-35,-25,35,35);
ellipse(35,-25,35,35);
fill(255);
strokeWeight(1);
stroke(0);
ellipse(0,0,100,90);
fill(0);
ellipse(-25,5,30,35);
ellipse(25,5,30,35);
fill(255);
ellipse(-25,0,6,6);
ellipse(25,0,6,6);
fill(0);
ellipse(0,25,7,5);
noFill();
stroke(0);
strokeWeight(1);
bezier(-2.5,35,-2.5,37,2.5,37,2.5,35);
popMatrix();
}
-
-
-
-
-
-
-
-
-
上一篇:用 Processing 进行数据可视化
下一篇:考研英语一完形填空词组及固定搭配