23 สิงหาคม 2558

Lab1 Positive Sign (Resize,Move)







void setup(){
int pos_x = -50;//center default = 0
int pos_y = -50;//center default = 0
float size_draw=150;

size(500,500);
background(#FCFAD3);
rectMode(CENTER);

//----- Circle 1 -----//
noStroke();
fill(0);
ellipse(pos_x+width/2 , pos_y+height/2 , size_draw*1.2 , size_draw*1.2);

//----- Circle 2 -----//
stroke(#48494C);
strokeWeight((((size_draw*1.2)-size_draw)/2)*0.32);
ellipse(pos_x+width/2 , pos_y+height/2 , size_draw*1.1 , size_draw*1.1);

//----- Circle 3 -----//
noStroke();
fill(#FD3A3B);
ellipse(pos_x+width/2 , pos_y+height/2 , size_draw , size_draw);

//----- Positive Sign -----//
fill(255);
rect(pos_x+width/2,pos_y+height/2,size_draw*0.8,size_draw*0.2,size_draw*0.02); //Horizontal Rectangle
rect(pos_x+width/2,pos_y+height/2,size_draw*0.2,size_draw*0.8,size_draw*0.02); //Vertical Rectangle


strokeWeight(0.5);
stroke(0);
line(0,height/2,width,height/2);
line(width/2,0,width/2,height);
fill(0);
ellipse(pos_x+width/2,pos_y+height/2,2,2);

}

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

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