3010浏览
查看: 3010|回复: 2

[高级教程] growing的 字母 然后有button可以控制 要怎么用array ...

[复制链接]
在一开始的时候字母就只是普通的样子没有身上的装饰。随着不断叠加第三个营养元素的时候的那些装饰才慢慢出来 参考我给的例子字母

void drawA(float x, float y, color cl) {
  pushMatrix();
  translate(x, y);
  fill(cl);
  strokeWeight(outline/20);
  stroke(#31302E);

  // letter A

  beginShape();
  vertex(0, 0);
  vertex(unit/2, 0);
  vertex(unit*4, tall*10);
  vertex(aside02*3, tall*10);
  vertex(aside*2.5, amiddle*8.5);
  vertex(0 - aside*2.5, amiddle*8.5);
  vertex(0 - aside02*3, tall*10);
  vertex(0 - unit*4, tall*10);
  vertex(0 - unit/2, 0);
  beginContour();      //  inside A
  vertex(0, tall*2);
  vertex(0 - aside*1.5, amiddle*7);
  vertex(aside*1.5, amiddle*7);
  endContour();
  endShape(CLOSE);


  popMatrix();
}


void drawAd(float x, float y, color cl) {
  pushMatrix();
  translate(x, y);


  fill(cl);
  //stroke(color(57,181,74));
  strokeWeight(1);
  beginShape();
  //vertex(0,tall);
  vertex(unit/4, tall);
  vertex(unit*3, tall*10);
  vertex(aside02*3, tall*10);
  vertex(aside*2.5, amiddle*8.5);
  vertex(0 - aside*2.5, amiddle*8.5);
  vertex(0 - aside02*3, tall*10);
  vertex(0 - unit*3, tall*10);
  vertex(0 - unit/4, tall);
  beginContour();      //  inside A
  vertex(0, tall*2);
  vertex(0 - aside*1.5, amiddle*7);
  vertex(aside*1.5, amiddle*7);
  endContour();
  endShape(CLOSE);



  popMatrix();
}






finat w1.png

窗边的豆豆  学徒
 楼主|

发表于 2019-5-1 00:28:34

此帖仅作者可见

使用道具 举报

窗边的豆豆  学徒
 楼主|

发表于 2019-5-1 00:31:32

此帖仅作者可见

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail