วันพฤหัสบดีที่ 23 กรกฎาคม พ.ศ. 2558

Spoon&Fox variable x,y,w,h (line&ellipse not rect)

VERSION 6
i can expand the spoon and fox picture in x-plane,y-plane (used line&ellipse not rect)











ใน VERSION 6 ได้มีการสร้างตัวแปร w และ ตัวแปร h เพื่อใช้ในการขยายภาพในแกน x และแกน y (used line&ellipse not rect)

void setup() {
       size(800, 800);
       stroke(0);
       background(255, 255, 255);
       
        int x=300;
        int y=300;
        int w=0;//40
        int h=100;//100
        
       //rect(x-w,y, 20+w+w,130+h);
       line(x-5-w,y+20,x+25+w,y+20);
       line(x-5-w,y+140+h,x+25+w,y+140+h);
       line(x-5-w,y+20,x-5-w,y+140+h);
       line(x+25+w,y+20,x+25+w,y+140+h);
       
       ellipse(x+10, y-60-(h/2), 70+w, 90+h);
       
       
       line(x+145-w,y+20,x+175+w,y+20);
       line(x+145-w,y+140+h,x+175+w,y+140+h);
       line(x+145-w,y+20,x+145-w,y+140+h);
       line(x+175+w,y+20,x+175+w,y+140+h);
       
       line(x+130-w,y-10,x+190+w,y-10);
       line(x+130-w,y-10,x+130-w,y-100-(h)+10);
       line(x+160,y-10,x+160,y-100-(h)+10);
       line(x+190+w,y-10,x+190+w,y-100-(h)+10);
       
       
       
       stroke(126);
       
     } 

ไม่มีความคิดเห็น:

แสดงความคิดเห็น