201708-07 specular()镜面 Namespecular()镜面 Examples size(100, 100, P3D); background(0); noStroke(); background(0); fill(0, 51, 102); lightSpecular(255, 255, 255); direc.... Read More >
201708-07 shininess()光泽度 Nameshininess()光泽度 Examples size(100, 100, P3D); background(0); noStroke(); background(0); fill(0, 51, 102); ambientLight(102, 102, 102); l.... Read More >
201708-07 emissive()发射率 Nameemissive()发射率 Examples size(100, 100, P3D); background(0); noStroke(); background(0); directionalLight(204, 204, 204, .5, 0, -1); emissive.... Read More >
201708-07 ambient()环境反射率 Nameambient()环境反射率 Examples size(100, 100, P3D); background(0); noStroke(); directionalLight(153, 153, 153, .5, 0, -1); ambientLight(153, 102,.... Read More >
201708-07 screenZ()屏幕Z坐标 NamescreenZ()屏幕Z坐标 Examplesvoid setup() { size(100, 100, P3D); } void draw() { background(204); float x = mouseX; float y = mouseY; float z = -100; // Draw "X" at z = -100 str.... Read More >
201708-07 screenY()屏幕Y坐标 NamescreenY()屏幕Y坐标 Examplesvoid setup() { size(100, 100, P3D); } void draw() { background(204); float x = mouseX; float y = mouseY; float z = -100; // Draw "X" at z = -100 str.... Read More >
201708-07 screenX()屏幕X坐标 NamescreenX()屏幕X坐标 Examplesvoid setup() { size(100, 100, P3D); } void draw() { background(204); float x = mouseX; float y = mouseY; float z = -100; // Draw "X" at z = -100 str.... Read More >
201708-07 modelZ()模型Z坐标 NamemodelZ()模型Z坐标 Examplesvoid setup() { size(500, 500, P3D); noFill(); } void draw() { background(0); pushMatrix(); // start at the middle of the screen translate(width/2, height/2,.... Read More >
201708-07 modelY()模型Y坐标 NamemodelY()模型Y坐标 Examplesvoid setup() { size(500, 500, P3D); noFill(); } void draw() { background(0); pushMatrix(); // start at the middle of the screen translate(width/2, height/2,.... Read More >
201708-07 modelX()模型X坐标 NamemodelX()模型X坐标 Examplesvoid setup() { size(500, 500, P3D); noFill(); } void draw() { background(0); pushMatrix(); // start at the middle of the screen translate(width/2, height/2,.... Read More >
201708-07 printProjection()打印投影矩阵 NameprintProjection()打印投影矩阵 Examplessize(100, 100, P3D); printProjection(); // The program above prints this data: // 01.7321 00.0000 00.0000 00.0000 // 00.0000 -01.7321 00.0000 00.0000 // 00..... Read More >
201708-07 printCamera()打印相机矩阵 NameprintCamera()打印相机矩阵 Examplessize(100, 100, P3D); printCamera(); // The program above prints this data: // 01.0000 00.0000 00.0000 -50.0000 // 00.0000 01.0000 00.0000 -50.0000 // 00.0000 00.... Read More >
201708-07 perspective()角度 Nameperspective()角度 Examples // Re-creates the default perspective size(100, 100, P3D); noFill(); float fov = PI/3.0; float cameraZ = (height/.... Read More >
201708-07 ortho()邻 Nameortho()邻 Examples size(100, 100, P3D); noFill(); ortho(-width/2, width/2, -height/2, height/2); // Same as ortho() translate(width/2, heig.... Read More >
201708-07 frustum()截锥 Namefrustum()截锥 Examples size(100, 100, P3D); noFill(); background(204); frustum(-10, 0, 0, 10, 10, 200); rotateY(PI/6); box(45);Description.... Read More >
201708-05 endCamera()关闭相机 NameendCamera()关闭相机 Examples size(100, 100, P3D); noFill(); beginCamera(); camera(); rotateX(-PI/6); endCamera(); translate(50, 50, 0); ro.... Read More >
201708-05 camera()设置相机位置 Namecamera()设置相机位置 Examples size(100, 100, P3D); noFill(); background(204); camera(70.0, 35.0, 120.0, 50.0, 50.0, 0.0, 0.0, 1.0, 0.0);.... Read More >
201708-05 beginCamera()开始相机 NamebeginCamera()开始相机 Examples size(100, 100, P3D); noFill(); beginCamera(); camera(); rotateX(-PI/6); endCamera(); translate(50, 50, 0); .... Read More >