201707-09 sphere() 球 名称:sphere() 例子: noStroke(); lights(); translate(58, 48, 0); sphere(28); 描述: 球形是由镶嵌三角形制成的空心球。 &nb.... Read More >
201707-09 TWO_PI (2*π) 名称:TWO_PI 例子: float x = width/2; float y = height/2; float d = width * 0.8; arc(x.... Read More >
201707-09 TAU 名称:TAU 例子: float x = width/2; float y = height/2; float d = width * 0.8; arc(x, y.... Read More >
201707-09 QUARTER_PI (π/4) 名称:QUARTER_PI 例子: float x = width/2; float y = height/2; float d = width * 0.8; arc(x, y, d, d, 0, QUARTER_PI);.... Read More >
201707-09 PI (π) 名称:PI 例子: float x = width/2; float y = height/2; float d = width * 0.8; arc(x, y, d, d, 0, QUARTER_PI); arc(.... Read More >
201707-09 HAIF_PI (π/2) 名称:HALF_PI 例子: float x = width/2; float y = height/2; float d = width * 0.8; arc(x, y, d, d, 0, QUARTER_PI); .... Read More >
201707-04 || (logical OR)逻辑或 名称: || 逻辑或 例子 for (int i=5; i<=95; i+=5) { if ((i<35) || (i>60)) { line (30, i, 80, i); } } .... Read More >
201707-04 && (logical AND)逻辑与 名称: && 逻辑与 例子: for (int i=5; i<=95; i+=5) { if ((i>35) && (i<60)) { stroke(0); // 设置颜.... Read More >
201707-04 ! (logical NOT)逻辑非 名称: ! 逻辑非 例子: boolean a=false; if (!a) { rect (30, 20, 50, 50); } if (a) { line (20, 10, 90,80); line(20, 8.... Read More >
201707-04 switch 名称: switch 例子: int num=1; switch(num) { case 0: println(“zero”); //b不执行 break; case 1: println(“one”); //输出 one break; }  .... Read More >
201707-04 if如果 名称: if 例子: for (int i=5; i<height; i+=5) { stroke(255); //设置颜色为白色, if (i<35) { str.... Read More >
201707-04 else 名称: else 例子: for (int i=5; i<95; i+=5) { if (i<35) { line(30,i,80,i); } else { line(20, i.... Read More >
201707-04 default 名称: default 例子: char letter=’B’; switch(letter) { case ‘a’: println(“Alpha”); //不执行 break; case ‘b’: println(“Bra.... Read More >
201707-04 continue 名称: continue 例子: for (int i=0; i<100; i+=10) { if (i ==70) { //如果 i 是70,跳出这次循环,所以留不会执行line continue; } line(i, 0, i, height); } 描述: 当在f.... Read More >
201707-04 case 名称: case 例子: char letter=’B’; switch(letter) { case ‘a’: println(“Alpha”); //不执行 break; case ‘b’: println(“Bravo”).... Read More >
201707-04 break 名称: break 例子: char letter=’B’; switch(letter) { case ‘a’: println(“Alpha”); //不执行 case ‘b’: println(“Bravo”); //输出“Bravo” .... Read More >
201707-04 ?: (conditional)条件? 名称: ?: 条件运算符 例子: int s=0; for(int i=5; i<100; i+ =5) { s=(i<50) ? 0:255; stroke(s); line(30,i, 80,i); } 描述:if, else.... Read More >
201707-04 while 名称: while 例子: int i=0; while (i<80) { line(30, i, 80, i); i=i+5; } 描述:控制一系列的循环。输出为真时,while 循环结构会.... Read More >