1.
size(600,600,P3D);
background(255);
beginShape(TRIANGLE);
fill(255,0,0);vertex(300,100);
fill(255,255,0);vertex(500,500);
fill(0,0);vertex(100,500);
endShape();

2.
void setup()
{size(600,600,P3D);
}
void draw()
{
background(255);
beginShape(TRIANGLE);
beginShape(TRIANGLE);
fill(255,0,0);vertex(100,100,0);
fill(255,0,255);vertex(100,500,100);
fill(255,255,0);vertex(500,500,0);
endShape();
beginShape(TRIANGLE);
fill(0,255,0);vertex(500,100,0);
fill(0,255,255);vertex(500,500,100);
fill(255,255,0);vertex(100,500,0);
endShape();}

3.學姊的馬力歐程式
3D上下左右移動,跳躍
沒有留言:
張貼留言