3595| 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(); } |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed