2016年12月15日 星期四

60508013E_林子婷,Week14

105/12/15

1.介紹Processing 年度票選
https://processingfoundation.org/

*用字拼出的圖

2.Project Tango
3.Processing 繪製愛心圖案


void setup(){
  size(500,500);
}
void draw(){
  for(float theta=0;theta<PI*2;theta+=0.01){
    float r=1-sin(theta),r2=1-sin(theta+0.01);
    float x=r*cos(theta),y=r*sin(theta);
    float x2=r2*cos(theta+0.01),y2=r2*sin(theta+0.01);
    line(250+100*x,250-100*y,250+100*x2,250-100*y2);
  }
}





沒有留言:

張貼留言