- Author:
- Alex Kloss
- Twitter:
- @
- GitHub:
- Facebook:
- Google+:
- +
- Reddit:
- /r/
- Pouet:
- Website:
- Compo:
- classic
- Demo link:
- https://js1k.com/2010-first/demo/609
- Shortlink:
- https://js1k.com/609
- Blog post:
- please update here!
- Bytes:
- 138
- Chars:
- 138
- Submission
(c=document.body.children[0]).onmousemove=function(e){(C=c.getContext('2d'))[r='fillRect'](x=e.pageX,y=e.pageY,2,2);C[r](c.width-x,y,2,2)}
- Description
- Rohrschach - a sort of reduced spirograph in 138 bytes
move the mouse slowly over the canvas to see the effect If you fold over the 45° diagonal, you can reduce the source to only 129 bytes:
document.body.children[0].onmousemove=function(e){(C=this.getContext('2d'))[r='fillRect'](x=e.pageX,y=e.pageY,2,2);C[r](y,x,2,2)}
- Base64 encoded
KGM9ZG9jdW1lbnQuYm9keS5jaGlsZHJlblswXSkub25tb3VzZW1vdmU9ZnVuY3Rpb24oZSl7KEM9Yy5nZXRDb250ZXh0KCcyZCcpKVtyPSdmaWxsUmVjdCddKHg9ZS5wYWdlWCx5PWUucGFnZVksMiwyKTtDW3JdKGMud2lkdGgteCx5LDIsMil9
- Original source
(c=document.body.children[0]);
c.onmousemove = function(e) {
C=c.getContext('2d');
r='fillRect';
x=e.pageX;
y=e.pageY;
C[r](x,y,2,2);
C[r](c.width-x,y,2,2)
}