void setup() { size(450, 300); //(450,300) smooth(); } void draw() { background(#FA3F58); int y=0; if (mouseX>=width/2) { while (y<mouseY) { tobu(mouseX, y, 255, 130); y+=130; } } else { tobu(mouseX, mouseY, 255, 130); } } void tobu(int x, int y, int w, int h) { fill(255); noStroke(); fill(100, 100, 100, 150); quad(x+w*0.0314, y+h*0.731, x+w*0.876, y+h*0.731, x+w*0.882, y+h*0.78, x+w*0.047, y+h*0.78); //T fill(255); quad(x, y, x+w*0.43, y, x+w*0.35, y+h*0.154, x+w*0.078, y+h*0.154); quad(x+w*0.196, y+h*0.154, x+w*0.294, y+h*0.154, x+w*0.118, y+h*0.731, x+w*0.02, y+h*0.731); stroke(#FA3F58); strokeWeight(4); line(x+w*0.36, y, x+w*0.314, y+h*0.154); //B fill(255); ellipse(x+w*0.53, y+h*0.5, w*0.263, h*0.5); fill(#FA3F58); ellipse(x+w*0.53, y+h*0.5, w*0.098, h*0.1923); fill(255); noStroke(); triangle(x+w*0.416, y+h*0.423, x+w*0.416, y+h*0.0769, x+w*0.51, y+h*0.3); //O stroke(#FA3F58); ellipse(x+w*0.314, y+h*0.5, w*0.263, h*0.5); fill(#FA3F58); ellipse(x+w*0.314, y+h*0.5, w*0.098, h*0.1923); //U stroke(#FA3F58); fill(255); ellipse(x+w*0.745, y+h*0.5, w*0.263, h*0.5); fill(#FA3F58); ellipse(x+w*0.745, y+h*0.5, w*0.098, h*0.1923); rect(x+w*0.627, y+h*0.231, w*0.235, h*0.16); }
วันศุกร์ที่ 11 กันยายน พ.ศ. 2558
Lab04 : Song
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
commit เพิ่มเติม : เพื่ม userstory, bookmark
>> add userstory ทำการเพิ่ม userstory ใน functional tests >> add bookmark for user เพิ่มระบบ Bookmark โดยการสร้าง model ขึ...
-
1 2 3 4 5 6 7 8 9 def setup (): print (d2b( 8 )) def d2b (num): x = "" while num > 0 : x = str ( int (n...
-
1 2 3 4 5 6 7 8 9 10 11 12 13 def test_layout_and_styling ( self ): # Edith goes to the home page self . brow...
-
การใช้ template inheritence คือการสืบทอดเทมเพลต เพื่อให้ไม่ต้องเขียนโค้ดหน้าเว็บๆซ้ำๆ เราจะมีหน้าหลักอันเดียว (base.html or parent) ภายในนั...
ไม่มีความคิดเห็น:
แสดงความคิดเห็น