Versionsvergleich
Aus ProgrammingWiki
Vergleich: 2009-11-13T17:57:24+00:00 → 2011-01-10T19:42:38+00:00
<language>Java</language> | |
| − | <eval id="4afd9c7381919"> |
| + | <run id="4afd9c7381919"> |
canvas.clear(); | |
Turtle John = new Turtle(1); | |
int t = 0; | |
int u = 0; | |
int v = 0; | |
int w = 1; | |
int x = 200; | |
int y = 90; | |
int z = 50; | |
John.home(); | |
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); | |
x--; | |
z--; | |
} while (x>=-380); | |
| − | </eval> |
| + | </run> |
<canvas></canvas> | |
| − | <eval id="4afd9d6070e35"> |
| + | <run id="4afd9d6070e35"> |
canvas2.clear(); | |
Turtle John = new Turtle(2); | |
int w = 1; | |
int x = 50; | |
int y = 90; | |
int z = 12; | |
John.home(); | |
John.hide(); | |
do { | |
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); | |
x--; | |
z--; | |
} while (x>=-1000); | |
| − | </eval> |
| + | </run> |
<canvas></canvas> | |
| − | <eval id="4afd9d60719de"> |
| + | <run id="4afd9d60719de"> |
canvas3.clear(); | |
Turtle John = new Turtle(3); | |
Turtle Junior = new Turtle(3); | |
int m = 50; | |
int n = 50; | |
int o = 50; | |
int t = 50; | |
int u = 50; | |
int v = 50; | |
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--; | |
} while(m!=360); | |
| − | </eval> |
| + | </run> |
<canvas></canvas> | |
| − | <eval id="4afd9d6072598"> |
| + | <run id="4afd9d6072598"> |
canvas4.clear(); | |
Turtle John = new Turtle(4); | |
Turtle Junior = new Turtle(4); | |
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--; | |
} while (m!=320); | |
| − | </eval> |
| + | </run> |
<canvas></canvas> | |
| − | <eval id="4afd9d6073156"> |
| + | <run id="4afd9d6073156"> |
canvas5.clear(); | |
java.util.Random random = new java.util.Random(); | |
Turtle John = new Turtle(5); | |
Turtle Junior = new Turtle(5); | |
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(); | |
void lol(int d, int e){ | |
while (u<=300){ | |
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); | |
x--; | |
z--; | |
u++; } | |
u = 0; } | |
void Spirale(int b){ | |
while(v<=b){ | |
John.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); | |
Junior.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); | |
lol(random.nextInt(500),random.nextInt(200)); | |
v++; } } Spirale(0); | |
| − | </eval> |
| + | </run> |
<canvas></canvas> | |
| − | |
| − | |
| − | <eval id="4afd9e03e2f4c"> |
| − | canvas6.clear(); |
| − | java.util.Random random = new java.util.Random(); |
| − | Turtle John = new Turtle(6); |
| − | Turtle Junior = new Turtle(6); |
| − | int a = 0; |
| − | int c = 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(); |
| − | void Ros(int d, int e){ |
| − | while (a < 20){ |
| − | 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); |
| − | x--; |
| − | z--; |
| − | a++; } |
| − | a = 0; } |
| − | void Spirale(int b){ |
| − | while(c <= b){ |
| − | John.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | Junior.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | Ros(random.nextInt(500),random.nextInt(200)); |
| − | c++; } } Spirale(15); |
| − | </eval> |
| − | <canvas></canvas> |
| − | |
| − | <eval id="4afd9e03e3a96"> |
| − | canvas7.clear(); |
| − | java.util.Random random = new java.util.Random(); |
| − | Turtle John = new Turtle(7); |
| − | Turtle Junior = new Turtle(7); |
| − | int a = 0; int c = 0; |
| − | 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(); |
| − | void Ros(int x, int y){ |
| − | John.move(x,y); |
| − | while (a < 20){ |
| − | 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--; |
| − | a++; } |
| − | a = 0; } |
| − | void Spirale(int b){ |
| − | while(c <= b){ |
| − | John.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | Ros(random.nextInt(500),random.nextInt(200)); |
| − | c++; } } Spirale(5); |
| − | </eval> |
| − | <canvas></canvas> |
| − | |
| − | <eval id="4afd9e03e4649"> |
| − | canvas8.clear(); |
| − | java.util.Random random = new java.util.Random(); |
| − | Turtle John = new Turtle(8); |
| − | Turtle Junior = new Turtle(8); |
| − | int a = 0; |
| − | int c = 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(); |
| − | void Ros(int x, int y){ |
| − | John.move(x,y); |
| − | while (a < 20){ |
| − | 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); |
| − | x--; |
| − | z--; |
| − | a++; } |
| − | a = 0; } |
| − | void Spirale(int b){ |
| − | while(c <= b){ |
| − | John.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | Junior.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | Ros(random.nextInt(500),random.nextInt(200)); |
| − | c++; } } Spirale(5); |
| − | </eval> |
| − | <canvas></canvas> |
| − | |
| − | <eval id="4afd9e03e5201"> |
| − | canvas9.clear(); |
| − | java.util.Random random = new java.util.Random(); |
| − | Turtle John = new Turtle(9); |
| − | Turtle Junior = new Turtle(9); |
| − | int u = 0; |
| − | int v = 0; |
| − | int w = 1; |
| − | int x = 50; |
| − | int y = 300; |
| − | int z = 12; |
| − | John.home(); |
| − | John.move(359,160); |
| − | John.hide(); |
| − | Junior.home(); |
| − | Junior.move(239,160); |
| − | Junior.hide(); |
| − | void lol(int d, int e){ |
| − | while (u<=300){ |
| − | 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); |
| − | x--; |
| − | z--; |
| − | u++; } |
| − | u = 0; } |
| − | void Spirale(int b){ |
| − | while(v<=b){ |
| − | John.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | Junior.penColor(random.nextInt(255),random.nextInt(255),random.nextInt(255)); |
| − | lol(random.nextInt(500),random.nextInt(200)); |
| − | v++; } } Spirale(0); |
| − | </eval> |
| − | <canvas></canvas> |
| − | |
| − | <eval id="4afd9e03e5dba"> |
| − | canvas10.clear(); |
| − | Turtle John = new Turtle(10); |
| − | int s = 40; |
| − | int t = 30; |
| − | int u = 30; |
| − | int v = 400; |
| − | int w = 1; |
| − | int x = 10; |
| − | int y = 300; |
| − | int z = 12; |
| − | John.home(); |
| − | 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 (v<=1700); |
| − | </eval> |
| − | <canvas></canvas> |