关键词不能为空

当前您在: 主页 > 英语 >

processing绘制可爱动物

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-28 11:32
tags:

-

2021年2月28日发(作者:上颚)


使用


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();


}



-


-


-


-


-


-


-


-



本文更新与2021-02-28 11:32,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/680715.html

processing绘制可爱动物的相关文章