Image processing 色彩及;处理中导入STL图像后的大小问题
我在处理中编写了一个程序,导入一个STL文件,然后根据需要进行三维旋转 但我面临一个问题,进口图像是非常彩色和小的大小。它看起来和原来的很不一样 你能帮我解决这个问题吗。 下面给出了编码和图像Image processing 色彩及;处理中导入STL图像后的大小问题,image-processing,3d,processing,windows-7-x64,stl-format,Image Processing,3d,Processing,Windows 7 X64,Stl Format,我在处理中编写了一个程序,导入一个STL文件,然后根据需要进行三维旋转 但我面临一个问题,进口图像是非常彩色和小的大小。它看起来和原来的很不一样 你能帮我解决这个问题吗。 下面给出了编码和图像 import toxi.geom.*; import toxi.geom.mesh.*; import toxi.processing.*; TriangleMesh mesh; ToxiclibsSupport gfx; void setup() { size(displayWidth, di
import toxi.geom.*;
import toxi.geom.mesh.*;
import toxi.processing.*;
TriangleMesh mesh;
ToxiclibsSupport gfx;
void setup() {
size(displayWidth, displayHeight,P3D);
mesh=(TriangleMesh)new STLReader().loadBinary(sketchPath("check.stl"),STLReader.TRIANGLEMESH);
gfx=new ToxiclibsSupport(this);
}
void draw() {
background(51);
translate(width/2,height/2,0);
rotateX(mouseY*0.01);
rotateY(mouseX*0.01);
gfx.mesh(mesh,false);
}
我也和你一样感到困惑,但在滚动
Processing.org
我发现有两个命令可以对STL对象产生积极的影响。
一些命令是:
import toxi.geom.*;
import toxi.geom.mesh.*;
import toxi.processing.*;
TriangleMesh mesh;
ToxiclibsSupport gfx;
void setup() {
size(displayHeight, displayWidth,P3D);
mesh=(TriangleMesh)new STLReader().loadBinary(sketchPath("check.stl"),STLReader.TRIANGLEMESH);
gfx=new ToxiclibsSupport(this);
}
void draw() {
background(51);
translate(width/2,height/2,0);
rotateX(mouseY*0.01);
rotateY(mouseX*0.01);
directionalLight(192, 168, 128,0, -1000, -0.5);
directionalLight(255, 64, 0, 0.5f, -0.5f, -0.1f);
noStroke();
scale(3);
gfx.mesh(mesh,false);
}
程序运行后的图像交叉张贴:如果不进行旋转,会得到相同的结果吗?@MarkRansom不,我总是得到像图1一样的结果,但我想要的结果是图2@IrfanGhaffar7请读这篇:@KevinWorkman我能理解