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-12 tan() 正切 名称:tan() 例子: float a = 0.0; float inc = TWO_PI/50.0; for (int i = 0; i < 100; i = i+2) { line(i, 50, i, 50+tan(a)*2.0); a.... Read More >
201707-12 sin() 正弦 名称:sin() 例子: float a = 0.0; float inc = TWO_PI/25.0; for (int i = 0; i < 100; i=i+4) { line(i, 50, i, 50+sin(a)*40.0); a .... Read More >
201707-12 radians() 名称:radians() 例子: float deg = 45.0; float rad = radians(deg); println(deg + " degrees is " + rad + " radians"); 描述: 将度量度值转换为其对应的弧度值。弧度和度数是测量同一事物的两种方式。 一个.... Read More >
201707-12 degrees() 名称:degrees() 例子: float rad = PI/4; float deg = degrees(rad); println(rad + " radians is " + deg + " degrees"); 描述: 将弧度测量值转换为相应的度数值。弧度和度数是测量同一事物的两种方式。 一个圆圈有360度,有2 * P.... Read More >
201707-12 cos() 余弦 名称:cos() 例子: float a = 0.0; float inc = TWO_PI/25.0; for (int i = 0; i < 25; i++) { line(i*4, 50, i*4, 50+cos(a)*40.0); a =.... Read More >
201707-12 atan2() 名称:atan2() 例子: void draw() { background(204); translate(width/2, height/2); float a = atan2(mouseY-height/2, mouseX-width/2); rotate(a); rect(-30, -5, 60, 10); } 描述:.... Read More >