Processing画小黄人

新的作业是画一个小黄人~

运行结果

代码

void setup(){
  size(420,640);
}
void draw(){
  cloth();
  hands();
  body();
  cloth_();
  eyes_glasses();
  legs();
  mouth();
}
void hands(){
  stroke(0);
  strokeWeight(10);
  fill(249,217,70);//黄色
  triangle(80,335,30,380,80,420);
  triangle(330,335,380,380,330,420);
}
void body(){
  fill(249,217,70);//黄色
  stroke(0);
  strokeWeight(5);
  ellipse(205,200,250,250);
  rect(80,200,250,220); 
}
void eyes_glasses(){
  stroke(0);
  strokeWeight(5);
  fill(0);
  rect(85,200,240,20); 
  fill(255);
  ellipse(160,200,90,90);
  ellipse(250,200,90,90);
  strokeWeight(30);
  point(160,200);
  point(250,200);
}
void mouth(){
  stroke(0);
  strokeWeight(10);
  line(180,300,230,300);
}
void cloth_(){ 
  noStroke();
  fill(32,116,160);//蓝色
  rect(120,350,170,95);
  noFill();
  stroke(0);
  strokeWeight(10);
  rect(175,380,60,75);
  strokeWeight(5);
  line(120,350,290,350);
  line(120,350,120,420);
  line(290,350,290,420);
  stroke(32,116,160);//蓝色
  strokeWeight(25);
  line(80,340,115,350);
  line(330,340,290,350);
  stroke(0);
  point(115,350);
  point(290,350);
}
void cloth(){
  fill(32,116,160);//蓝色
  stroke(0);
  strokeWeight(5);
  ellipse(205,420,250,250);
}

void legs(){
  stroke(0);
  strokeWeight(40);
  line(185,540,185,590);
  line(226,540,226,590);
  line(150,590,190,590);
  line(226,590,266,590);
}
  • 6
    点赞
  • 57
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值