Random image thread
category: residue [glöplog]
@lorents, oh not good!
Quote:
Brink back the only Wiener Art?
Gasman: That's a great book.
@inwalda: WRONG THREAD!
Translation :
"Because of speeding trucks, the house of Mr. Andrew (54 y-old) is shaking"
"I don't sleep because i'm holding the sideboard"
"2:00 AM, when everyone is sound asleep, Andrew Bednarek is holding his sideboard"
Piece of shit daily paper for people with no brains (hey! just like Hugi and Adok!) courtesy of Axel Springer media. Every time i see a person with this, i die a little inside (and another part tells me that maybe, just maybe Adok is right *shrugs*)
"Because of speeding trucks, the house of Mr. Andrew (54 y-old) is shaking"
"I don't sleep because i'm holding the sideboard"
"2:00 AM, when everyone is sound asleep, Andrew Bednarek is holding his sideboard"
Piece of shit daily paper for people with no brains (hey! just like Hugi and Adok!) courtesy of Axel Springer media. Every time i see a person with this, i die a little inside (and another part tells me that maybe, just maybe Adok is right *shrugs*)
ah, in clarification of my rant : i didn't mean that Hugi was made for brainless people. Seems i got carried away :/
<- WTF ->
(You all owe me a fuckton of beer for the first link)
(and the last)
Code:
<html>
<head>
<title>Plasma!</title>
<style>
body { padding : 0px; margin : 0px; }
table { width : 100%; height : 100%; margin : 0px; padding : 0px; border-collapse : collapse; }
#d23 { position : absolute; top : 95%; right : 5%; color : #000000; font-size: 8pt;}
</style>
<script>
/* Globals */
var sinTable = {}; var colorTable = {}; var size = 30;
var p1; var p2; var p3; var p4; var o1; var o2; var o3; var o4; var o5; var o6;
/* getElementById shortcut */
$ = function(el) { return document.getElementById(el); }
/* random shortcut */
rnd = function(mx) { return Math.round(Math.random() * mx); }
/* Convert to hex string for css */
toHex = function(v) { var res = Number(v).toString(16); return res.length == 1 ? '0'+res : res.length > 2 ? 'ff' : res; }
/* Clipped sinus lookup */
fsin = function(v) { return sinTable[v & 255]; }
/* Clipped color lookup */
fcol = function(v) { return colorTable[v & 255]; }
/* Generate table matrix */
createMatrix = function() {
var tbody = $('table').appendChild(document.createElement('tbody'));
for(x=0; x < size; x++) {
var row = tbody.appendChild(document.createElement('tr'));
for(y=0; y < size ; y++) {
row.appendChild(document.createElement('td')).id= "x"+x+"y"+y;
}
}
}
/* Generate sine table */
createSin = function() {
var c = 2 * Math.PI / 256;
for(var i = 0; i < 256; i++) {
sinTable[i] = Math.round(Math.sin(c * i)* 127 + 128);
}
}
/* Generate color table */
createColor = function() {
for(var i = 0; i < 256; i++) {
colorTable[i] = '#'+toHex(fsin(i))+toHex(fsin(i+64))+toHex(fsin(i+100));
}
}
/* Initialize the application */
init = function() { createSin(); createColor(); createMatrix(); seed(); run(); setInterval(seed, 5000); }
/* Seed the plasma with some 'sensible' values */
seed = function() { p1 = rnd(255); p2 = rnd(255); p3 = rnd(255); p4 = rnd(255); o1 = rnd(12); o2 = rnd(12); o3 = rnd(12) ; o4 = rnd(12); o5 = rnd(12); o6 = rnd(12); }
/* Runner */
run = function() { doPlasma(); setTimeout(run, 50); }
/* Plasma function */
doPlasma = function() {
var tp3 = p3; var tp4 = p4;
for(x=0; x < size; x++) {
var tp1 = p1; var tp2 = p2;
for(y = 0; y < size; y++) {
$('x'+x+'y'+y).style.background = fcol(fsin(tp1) + fsin(tp2) + fsin(tp3) + fsin(tp4));
tp1 += o1;tp2 += o2;
}
tp3 += o3;tp4 += o4;
}
p1 += o5;p3 += o6;
}
</script>
</head>
<body id='body' onload="init()">
<table id='table'></table>
<div id='d23'>d23 (c)2008</div>
</body>
</html>
how often will this be reposted?