Versionsvergleich
Aus ProgrammingWiki
Vergleich: 2009-11-13T18:59:25+00:00 → 2011-01-10T19:42:40+00:00
<language>Java</language> | |
| − | <eval id="4afdac47c374a"> |
| + | <run id="4afdac47c374a"> |
canvas.clear(); | |
Turtle John = new Turtle(1); | |
int t = 400; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int x = 50; | |
int y = 90; | |
int z = 12; | |
John.home(); | |
John.move(359,160); | |
John.hide(); | |
John.penErase(); | |
do { | |
John.penColor(t,u,v); | |
John.right(w); | |
John.forward(x); | |
John.right(y); | |
John.forward(z); | |
John.right(y); | |
John.forward(x); | |
John.right(y); | |
John.forward(z); | |
John.right(y); | |
t--; | |
u++; | |
v++; | |
x--; | |
z--; | |
w++; | |
} while (v<=360); | |
| − | </eval> |
| − | <canvas></canvas> |
| + | </run> |
| + | <canvas w=800 h=400></canvas> |
| − | <eval id="4afdac47c3eea"> |
| + | <run id="4afdac47c3eea"> |
canvas2.clear(); | |
Turtle John = new Turtle(2); | |
Turtle Junior = new Turtle(2); | |
int m = 0; | |
int n = 0; | |
int o = 0; | |
int t = 0; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int x = 50; | |
int y = 90; | |
int z = 12; | |
John.home(); | |
John.move(359,160); | |
John.hide(); | |
Junior.home(); | |
Junior.move(239,160); | |
Junior.hide(); | |
do { | |
Junior.penColor(m,n,o); | |
John.penColor(t,u,v); | |
Junior.left(w); | |
John.right(w); | |
Junior.forward(x); | |
John.forward(x); | |
Junior.left(y); | |
John.right(y); | |
Junior.forward(z); | |
John.forward(z); | |
Junior.left(y); | |
John.right(y); | |
Junior.forward(x); | |
John.forward(x); | |
Junior.left(y); | |
John.right(y); | |
Junior.forward(z); | |
John.forward(z); | |
Junior.left(y); | |
John.right(y); | |
m++; n--; o--; t--; u++; v++; x--; z--; w++; | |
} while (m!=320); | |
| − | </eval> |
| − | <canvas></canvas> |
| + | </run> |
| + | <canvas w=800 h=400></canvas> |
| − | <eval id="4afdac47c4b04"> |
| + | <run id="4afdac47c4b04"> |
canvas3.clear(); | |
Turtle John = new Turtle(3); | |
Turtle Junior = new Turtle(3); | |
int t = 0; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int y = 180; | |
int z = 0; | |
John.home(); | |
John.hide(); | |
John.setAngle(270); | |
Junior.home(); | |
Junior.hide(); | |
Junior.setAngle(90); | |
do { | |
Junior.penColor(t,u,v); | |
John.penColor(t,u,v); | |
Junior.left(w); | |
John.right(w); | |
Junior.forward(z); | |
John.forward(z); | |
Junior.left(y); | |
John.right(y); | |
Junior.forward(z); | |
John.forward(z); | |
Junior.left(y); | |
John.right(y); | |
z++; | |
} while (z!=270); | |
| − | </eval> |
| − | <canvas></canvas> |
| + | </run> |
| + | <canvas w=800 h=400></canvas> |
| − | <eval id="4afdac47c56f6"> |
| − | canvas2.clear(); |
| − | Turtle John = new Turtle(2); |
| + | <run id="4afdac47c56f6"> |
| + | canvas4.clear(); |
| + | Turtle John = new Turtle(4); |
int s = 40; | |
int t = 0; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int x = 100; | |
int y = 90; | |
int z = 12; | |
John.home(); | |
John.move(300,150); | |
John.hide(); | |
John.penErase(); | |
do { | |
John.penColor(t,u,v); | |
John.right(w); | |
John.penErase(); | |
John.forward(s); | |
John.penColor(t,u,v); | |
John.forward(x); | |
John.right(y); | |
John.forward(z); | |
John.right(y); | |
John.forward(x); | |
John.penErase(); | |
John.forward(s); | |
John.right(y); | |
John.penErase(); | |
John.forward(z); | |
John.right(y); | |
s++; | |
t++; | |
u--; | |
v--; | |
x--; | |
z--; | |
} while (t<=320); | |
| − | </eval> |
| − | <canvas></canvas> |
| + | </run> |
| + | <canvas w=800 h=400></canvas> |
| − | <eval id="4afdac47c61eb"> |
| − | canvas4.clear(); |
| − | Turtle John = new Turtle(4); |
| + | <run id="4afdac47c61eb"> |
| + | canvas5.clear(); |
| + | Turtle John = new Turtle(5); |
int s = 40; | |
int t = 0; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int x = 100; | |
int y = 90; | |
int z = 12; | |
John.home(); | |
John.move(190,190); | |
John.hide(); | |
John.penErase(); | |
John.setAngle(270); | |
do { | |
John.penColor(t,u,v); | |
John.right(w); | |
John.penErase(); | |
John.forward(s); | |
John.penColor(t,u,v); | |
John.forward(x); | |
John.right(y); | |
John.forward(z); | |
John.right(y); | |
John.forward(x); | |
John.penErase(); | |
John.forward(s); | |
John.right(y); | |
John.penErase(); | |
John.forward(z); | |
John.right(y); | |
s++; | |
t++; | |
u--; | |
v--; | |
x--; | |
z--; | |
} while (t<=320); | |
| − | </eval> |
| − | <canvas></canvas> |
| + | </run> |
| + | <canvas w=800 h=400></canvas> |
| − | <eval id="4afdac47c69b6"> |
| − | canvas5.clear(); |
| − | Turtle John = new Turtle(5); |
| + | <run id="4afdac47c69b6"> |
| + | canvas6.clear(); |
| + | Turtle John = new Turtle(6); |
int s = 40; | |
int t = 0; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int x = 100; | |
int y = 90; | |
int z = 12; | |
John.home(); | |
John.move(300,150); | |
John.hide(); | |
John.penErase(); | |
do { | |
John.penColor(t,u,v); | |
John.right(w); | |
John.penUp(); | |
John.forward(s); | |
John.penDown(); | |
John.forward(x); | |
John.right(y); | |
John.forward(z); | |
John.right(y); | |
John.forward(x); | |
John.penUp(); | |
John.forward(s); | |
John.right(y); | |
John.forward(z); | |
John.right(y); | |
s++; | |
t++; | |
u--; | |
v--; | |
x--; | |
z--; | |
} while (t<=320); | |
| − | </eval> |
| − | <canvas></canvas> |
| + | </run> |
| + | <canvas w=800 h=400></canvas> |