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

Drum (Music)


size (300 , 300) ;
int cx = 150 ; // center of X-axis
int cy = 100 ; // center of Y-axis
int h = 100 ; // Height of Drum

fill (0) ;
ellipse (cx, cy + h, 150, 50) ; // Bottom
rect (75, 100, 150, h) ; // Body

// Drumhead
fill (255) ;
ellipse (cx, cy, 150, 50) ; 
fill (0) ;
ellipse (cx, cy, 100, 25) ;

// Wooden drum
strokeWeight (5) ;
stroke (255, 150, 0) ;
line (90, 50, 140, 90) ;
line (160, 90, 210, 50) ;

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

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