-
2009年08月25日
1 Pixels - [PROCESSING]
TIPS:
X - axis left:0 right:width
Y - axis top:0 bottom:heightpoint(X,Y);
line(X1,Y1,X2,Y2);
ellipseMode(CENTER);
ellipse(CENTERx,CENTERy,WIDTH,HEIGHT);
ellipseMode(CORNER);default!!!
ellipse(TOP,LEFT,WIDTH,HEIGHT);default!!!
ellipseMode(CORNERS);
ellipse(TOP,LEFT,RIGHT,BOTTOM)rectMode(CENTER);
rect(CENTERx,CENTERy,WIDTH,HEIGHT);
rectMode(CORNER);default!!!
rect(TOP,LEFT,WIDTH,HEIGHT);default!!!
rectMode(CORNERS);
rect(TOP,LEFT,RIGHT,BOTTOM)0-255代表256种switch
8bit - gray mode
24bit - color mode
红绿蓝alpha各8bitdefault:
stroke(0);
fill(255);hide:
nostroke();
nofill();前包含后,后包含于前
Exercise 1-4: Try to guess what the instructions would be for the following screenshot.
stroke(0);
fill(255);
rect(width/2-1,0,(width-1)/2,(height-1)/2);
fill(10);
rect(0,0,(width-1)/2,(height-1)/2);
fill(100);
rect(width/2-1,height/2-1,(width-1)/2,(height-1)/2);
fill(255);
rect(0,height/2-1,(width-1)/2,(height-1)/2);(有错请帮忙指正下谢谢。)Exercise 1-5: Complete the following program. Guess what RGB values to use (you will be
able to check your results in Processing after reading the next chapter). You could also use the
color selector
