201707-13 rotateX()/rotateY()/rotateZ()绕轴旋转 rotateX()/rotateY()/rotateZ() 示例 size(100, 100, P3D); translate(width/2, height/2); rotateX(PI/3.0); //rotateY()/rotateZ() rect(-26, -26.... Read More >
201707-13 rotate()旋转 rotate()旋转 例子 translate(width/2, height/2); rotate(PI/3.0); rect(-26, -26, 52, 52);描述旋转由角度参数指定的量。角度必须指定弧度(从0到2PI值),也可以转换成度与radians()功能弧度。坐标总是.... Read More >
201707-13 resetMatrix()重设矩阵 resetMatrix()重设矩阵 size(100, 100, P3D); noFill(); box(80); printMatrix(); // Prints: // 01.0000 00.0000 00.0000 -50.0000 // 00.0000 01.0000.... Read More >
201707-13 printMatrix()打印矩阵 printMatrix() size(100, 100, P3D); printMatrix(); // Prints: // 01.0000 00.0000 00.0000 -50.0000 // 00.0000 01.0000 00.0000 -50.0000 // 00.0000 00.0000 01.0000 -86.6025 // 00.0000 00.0000 00..... Read More >
201707-13 pushMatrix()保存矩阵 pushMatrix()/popMatrix() fill(255); rect(0, 0, 50, 50); //白色方形 pushMatrix(); translate(30, 20); fill(0); rect(0, 0, 50, 50); // 黑色方形 po.... Read More >
201707-13 applyMatrix()矩阵乘法 applyMatrix()矩阵乘法 size(100, 100, P3D); noFill(); translate(50, 50, 0); rotateY(PI/6); stroke(153); box(35); //设置旋转角度 float ct = cos(PI/9.0);.... Read More >
201707-12 PShape类 PShape Name 名称PShape PShape类Examples 例子PShape s; void setup() { size(100, 100); // The file "bot.svg" must be in the data folder // of the cur.... Read More >
201707-12 loadShape()加载形状 loadShape() Name 名称loadShape() 加载形状Examples 例子PShape s; void setup() { size(100, 100); // The file "bot.svg" must be in the data folder // of .... Read More >
201707-12 createShape()创建形状函数 createShape() Name 名称 createShape() 创建形状函数 Examples 例子 PShape square; // The PShape object void setup() { .... Read More >
201707-12 第一期,超炫大boss,圆形、网格、结点 一周后公布源代码和解析 感谢fishVD对代码做的解析 http://iprocessing.cn/2017/07/23/%E7%AC%AC%E4%B8%80%E6%9C%9Fboss%E4%BB%A3%E7%A0%81%E5%AD%A6%E4%B9%A0%E7%AC%94%E8.... 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 >