7 ms·
Minimal 16x16 Dots Coding Environment
- idontevengohere 6y agolove it :) https://tixy.land/?code=Math.tan%28t*%28100-y*x%29%2F9%29 https://tixy.land/?code=Math.tan%28t*%28100-y*x%29%2F9%29
- ChrisGranger 6y agoThis is great fun. https://tixy.land/?code=Math.cos(x*t-i)/Math.cos(y*i-t) https://tixy.land/?code=Math.cos(x*t-i)/Math.cos(y*i-t) https://tixy.land/?code=Math.cos(x/t)-Math.cos(y/t) https://tixy.land/?code=Math.cos(x/t)-Math.cos(y/t) https://tixy.land/?code=Math.cos((x/t)/y-t https://tixy.land/?code=Math.cos((x/t)/y-t)
- jfim 6y agoYeah the trig functions are pretty fun for generating smooth patterns. https://tixy.land/?code=Math.sin%28y%2Bt*2%29-Math.cos%28x-t*2%29 https://tixy.land/?code=Math.sin%28y%2Bt*2%29-Math.cos%28x-t... https://tixy.land/?code=Math.sin%28Math.atan%28%28y%29%2F%28x%29%29%2Bt%29 https://tixy.land/?code=Math.sin%28Math.atan%28%28y%29%2F%28... https://tixy.land/?code=Math.log%28Math.sin%28t%29*5%2Bx%2Fy%29 https://tixy.land/?code=Math.log%28Math.sin%28t%29*5%2Bx%2Fy... Edit: I don't even know what's happening in this one https://tixy.land/?code=Math.sin%28i%26t%29*%28Math.clz32%28y**t%29%29 https://tixy.land/?code=Math.sin%28i%26t%29*%28Math.clz32%28...
- zimpenfish 6y agoThat clz32 is fun - https://tixy.land/?code=sin%28clz32%28y*x%3C%3C%285*t%29%29%29 https://tixy.land/?code=sin%28clz32%28y*x%3C%3C%285*t%29%29%... (looks like it auto-adds `Math.` for you now)
- tolbish 6y agoReminds me of the minimalist 24a2 game engine [0] that was shared here a while back [1]. [0] https://24a2.routley.io/ https://24a2.routley.io/ [1] https://news.ycombinator.com/item?id=23664814 https://news.ycombinator.com/item?id=23664814
- deleted 6y ago[deleted]
- chrisdirkis 6y agoReminds me of writing full-screen fragment shaders, where you'd just get a screen position and time and construct some cool things. This one's much smaller and easier to reason about though, very cool :)
- linschn 6y agoThis is awesome. The page does a wonderful job at explaining what this is and how it works. Trying to guess what a function will look like without looking at the dots is fun.
- julosflb 6y agoThat's brillant!
- 0-_-0 6y agoI like the minimalism! https://tixy.land/?code=Math.sin%283*t-%28x%2F6%29**2-%28y%2F6%29**2%29 https://tixy.land/?code=Math.sin%283*t-%28x%2F6%29**2-%28y%2... https://tixy.land/?code=Math.sin%280.2*i%257%2Bt%29 https://tixy.land/?code=Math.sin%280.2*i%257%2Bt%29
- ponker 6y agoHow is the syntax here working? Is that an assignment operator?
- lucideer 6y agoIt's javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Syntax https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- henrikschroder 6y agoYou write the body of the function that takes t, i, x, and y as inputs for each dot. A return value of 1 or "1" or true and it shows a large white dot. A return value of 0 or false, and it shows nothing. A return value of -1 or "-1" and it shows a large red dot. Positive fractions is a smaller white dot, negative fractions is a smaller red dot. https://tixy.land/?code=i%2F256 https://tixy.land/?code=i%2F256 https://tixy.land/?code=x%21%3D5+%26%26+y+%21%3D+7 https://tixy.land/?code=x%21%3D5+%26%26+y+%21%3D+7 https://tixy.land/?code=x%2F32%2By%2F32 https://tixy.land/?code=x%2F32%2By%2F32 https://tixy.land/?code=Math.sin%28t%29 https://tixy.land/?code=Math.sin%28t%29 https://tixy.land/?code=Math.sin%28t%2Bx%29 https://tixy.land/?code=Math.sin%28t%2Bx%29 https://tixy.land/?code=Math.sin%28t%2By%29 https://tixy.land/?code=Math.sin%28t%2By%29 https://tixy.land/?code=Math.sin%28t%2Bi%29 https://tixy.land/?code=Math.sin%28t%2Bi%29
- nickcw 6y agoHere is my best effort, a sort of breathing Sierpinski triangle https://tixy.land/?code=i%26x%26%28y*Math.sin%28t%29%29 https://tixy.land/?code=i%26x%26%28y*Math.sin%28t%29%29 You can have lots of fun mixing the bitwise ops with trig functions!
- dimassimo 6y agoMath is fun! The Matrix: https://tixy.land/?code=i%2F%28x*y%29*%28t*i%29*Math.sin%28t*y%2Fi*x%29 https://tixy.land/?code=i%2F%28x*y%29*%28t*i%29*Math.sin%28t... Matrix Reloaded: https://tixy.land/?code=i%2F%28x%2Fy%29*%28t%2Fi%29*Math.sin%28t*y%2Fi*x%29 https://tixy.land/?code=i%2F%28x%2Fy%29*%28t%2Fi%29*Math.sin...
- nathancahill 6y agoInput limited to 32 chars. Wanted to make a Game of Life.
- benibela 6y agoI have one without animation but with more colors: http://www.benibela.de/web-apps_en.html?&cmgenerate=true&cmfunctionNr=4&cmcountX=16&cmcountY=16#colorMap.js http://www.benibela.de/web-apps_en.html?&cmgenerate=true&cmf...
- Sebastian_09 6y agoThis is so great! Would you know of any resources to build a little led circuit like that on a breadborad, with standard components, that could be powered by a Pi? In smaller dimensions of course, but even 4*4 would be interesting for educational purposes. The things I found online all used pre-built led boards which is less interesting I think.
- jstanley 6y agoA MAX7219 is an LED driver that can power an 8x8 grid of LEDs, so you could do the full 16x16 with 4 of these, or shrink down to 8x8 with just one. Then it's just a case of wiring up the LED matrix and connecting the MAX7219 to the Pi.
- mattatkeyboard 6y agoOne of these... https://shop.pimoroni.com/products/unicorn-hat-hd https://shop.pimoroni.com/products/unicorn-hat-hd
- gabrielsroka 6y agoIt's like a mini Dwitter (which is 140 characters) https://www.dwitter.net https://www.dwitter.net
- scoopr 6y agoOh wow, that char limit is brutal. https://tixy.land/?code=x-%3Dt%2524%2Cy-%3Dt%2524%2C%28x*x%2By*y%29%2F5-2 https://tixy.land/?code=x-%3Dt%2524%2Cy-%3Dt%2524%2C%28x*x%2... Reminds me of bytebeats, dwitter, etc. http://canonical.org/%7Ekragen/bytebeat/ http://canonical.org/%7Ekragen/bytebeat/ https://www.dwitter.net/ https://www.dwitter.net/
- jvanegmond 6y agohttps://tixy.land/?code=Math.sin%28t*y*%28i%2F256%29%29 https://tixy.land/?code=Math.sin%28t*y*%28i%2F256%29%29 https://tixy.land/?code=Math.sin%28t*x*%28i%2F256%29%29 https://tixy.land/?code=Math.sin%28t*x*%28i%2F256%29%29
- beardyw 6y agoThese are great!
- necrotic_comp 6y agohttps://tixy.land/?code=Math.tan%28t%29**x%2FMath.cos%28t%29**y https://tixy.land/?code=Math.tan%28t%29**x%2FMath.cos%28t%29... https://tixy.land/?code=Math.sin%28i%2Bt%29*Math.cos%28t%2F2%29 https://tixy.land/?code=Math.sin%28i%2Bt%29*Math.cos%28t%2F2... https://tixy.land/?code=Math.sin%28i%2Bt%29*Math.cos%28t%2F2%29 https://tixy.land/?code=Math.sin%28i%2Bt%29*Math.cos%28t%2F2...
- azhenley 6y agoThis is awesome and could be a nice educational tool. Although I just want to extend it to allow simple games :)
- oliwary 6y agoThis is so much fun! Not as good as some here, but here is an animated sinus function: https://tixy.land/?code=y%3D%3D%7E%7E%288-7*Math.sin%28t*5%2Bx%2F3%29%29 https://tixy.land/?code=y%3D%3D%7E%7E%288-7*Math.sin%28t*5%2... Tip: Writing ~~ is much more space efficient than Math.floor
- deleted 6y ago[deleted]
- amenghra 6y ago|0 is also a nice alternative to floor.
- ermir 6y agoThis is really sweet, I love stuff like this. I do have a suggestion though, which is to create some aliases for the most commonly used Standard Library functions, such as Math.sin into s, or Math.cos into c, etc. This would save some space and allow slightly more code to be entered and more complex effects to be achieved.
- flobosg 6y agoSome interesting patterns without trigonometric functions[1]: https://tixy.land/?code=1-t%252%2B%28x-8%29*%28y-8%29%25%7E%28t%252%2F.2%29*.2 https://tixy.land/?code=1-t%252%2B%28x-8%29*%28y-8%29%25%7E%... https://tixy.land/?code=1-t%252-%28%28x-9%29%5E%28y-9%29%29%25%7E%28t%254%2F.1%29*.1 https://tixy.land/?code=1-t%252-%28%28x-9%29%5E%28y-9%29%29%... [1]: https://twitter.com/mattdesl/status/1323622421933576192 https://twitter.com/mattdesl/status/1323622421933576192
- _Microft 6y agoI can haz teh haxx0rz? Working around the character limit. I stored an expression in the URL fragment/hash, loaded it from there and eval-ed it. The hash symbol would break the expression, so it needs to be removed or commented out. Removing it by string manipulation would have exceeded the 32 character limit, so I went with commenting it out. That means you need to start any expression with "* /" (remove the space) to close the comment around the hash symbol. The hover text of the example link gives you a good idea of what is happening. Have fun! Random animation, 47 characters payload: https://tixy.land/?code=eval(%27%2F*%27%2Bparent.location.hash)#*/(i+y)%16/16+Math.sin(x*t)-Math.cos(y*t)+(2*t)%3 https://tixy.land/?code=eval(%27%2F*%27%2Bparent.location.ha...
- deleted 6y ago[deleted]
- luminati 6y agoWow this was amazing! If anyone could enlighten me - is there some general theory behind generate these patterns? I am flummoxed by all these code examples - they produce so much with so little. Any theory behind these cryptic sin and cos 1 liners?
- ktm5j 6y agoIf you click on the animation then it will walk you through how it works. Keep clicking, each click gives you another hint.
- _Microft 6y agoI discovered only now that the snippet is evaluated with(Math){ }. Therefore you can omit Math. on calls to methods of it and have five more extra characters at your disposal. Strange that they did not mention this in the tutorial. It seems rather important as the budget is super-limited.
- _Microft 6y agoSigh, it is actually there. My mistake. // skip `Math.` to use methods // and props like `sin` or `PI`
- kevinwang 6y agostill trying to get the whole thing, but I have this so far: https://tixy.land/?code=y-%3D6%2Bsin%28t%29*x**2%2F99%2C%28y%2F2%29**2-1 https://tixy.land/?code=y-%3D6%2Bsin%28t%29*x**2%2F99%2C%28y...
- kevinwang 6y agoanotha one: https://tixy.land/?code=b%3D1.1**i%2Ct%2B%3Db%2Cb%252%2B2*sin%28t%2F9%29**99 https://tixy.land/?code=b%3D1.1**i%2Ct%2B%3Db%2Cb%252%2B2*si...
- deleted 6y ago[deleted]
- stanix 6y agoWinamp MilkDrop light :))