当前位置: 代码迷 >> 综合 >> the first meet with Processing
  详细解决方案

the first meet with Processing

热度:27   发布时间:2023-12-12 20:29:55.0

一个强大的东西 http://processing.org/

Processing是一个用于生成图像、动画、交互的开源编程语言。。。

 

 

 

void setup() {size(width, height);background(256, 256, 256);stroke(0, 128, 0);smooth();frameRate(24);
}// float GOLD = 0.618;int width = 300;
int height = 150;int a = 100;
float b = 10;int left = width;
int right;boolean sign = true;void draw() {  if (sign) {int tmp = (int)(left * (a - b) / a);right = width - tmp;line(width - left, 0, right, height);left = tmp;} else {line(right, height, right, 0);} sign = !sign;if (left < 0) {noLoop();}
}
  相关解决方案