2025年4月10日 星期四

weeek0008

01.Java程式:鋼彈模型: 

 size(400,400,P3D);

PShape gundam = loadShape("Gundam.obj");

translate(width/2,height/2);

pushMatrix();

translate(0,100);

scale(10,-10,10);

shape(gundam, 0, 0);

popMatrix();

02.Java程式:鋼彈模型x2: 

PShape gundam;
void setup(){
size(400,400,P3D);
gundam = loadShape("Gundam.obj");
}
void draw(){
background(128);
translate(width/2,height/2+100);
pushMatrix();
scale(10,-10,10);
rotateY(radians(frameCount));
shape(gundam, 0, 0);
popMatrix();
pushMatrix();
translate(100,0,0);
scale(10,-10,10);
shape(gundam, 0, 0);
popMatrix();
}

沒有留言:

張貼留言