czwartek, lutego 14, 2008

Dziwna Walętynka


var a = new Array(3);

a[0] = new Array(87, 115, 122, 121, 115, 116, 107, 105, 101, 103, 111);
a[1] = new Array(110, 97, 106, 108, 101, 112, 115, 122, 101, 106, 115, 122, 101, 103, 111, 32, 119);
a[2] = new Array(87, 97, 108, 101, 110, 116, 121, 110, 107, 105, 33);

for(j = 0; j< a.length; j++) {
for(i = 0; i< a[j].length; i++)
document.write(String.fromCharCode(a[j][i]));

document.write(' ');
}
document.write("<br>");

var table =new Array(18);
for(i = 0; i<table.length; i++) {
table[i] = new Array(36);
for(j =0; j<table[i].length; j++)
table[i][j] = ' ';
}

for(t = 0; t < 60; t++) {
x = 0.02 * (40*t +1200 - Math.pow(t, 2)) * Math.sin(Math.PI * t / 180);
y = 0.01 * (40*t +1200 - Math.pow(t, 2)) * Math.cos(Math.PI * t / 180);
x = Math.round(x);
x1 = 18 - x;
x2 = 18 + x;
y = Math.round(16 - y);
table[y][x1] = '*';
table[y][x2] = '*';
}

for(j =0;j<table.length; j++) {
document.write(table[j].join(''));
document.write("<br>");
}


Tutaj można zobaczyć wynik, ale ostrzegam!

3 komentarze:

Dobowet pisze...

Ktoś Cię na tym świecie kocha!

Anonimowy pisze...

:hahaha: walentynka informatyka :D
śliczna
Nene

Anonimowy pisze...

:D fajny pomysł, ale mi sie bardziej podoba ta która dostałam pocztą
G

Prześlij komentarz