5 ms·
Show HN: Mojulo – Pixelated Math Rendering Sandbox Toy
- pokpokpok 12y agoI encourage people to check out and contribute to the gallery, I built this because I wanted to see the amazing things people come up with!
- deleted 12y ago[deleted]
- gecko39 12y agohere's one: 10*((((100-x)^2+y^2)^0.5 + time) % 10) + 10*((((x)^2+y^2)^0.5 + time) % 10)
- pokpokpok 12y agolinked for the lazy: https://maxbittker.github.io/Mojulo/#ICAxMCooKCgoMTAwLXgpXjIreV4yKV4wLjUgKyB0aW1lKSAlIDEwKSArIDEwKigoKCh4KV4yK3leMileMC41ICsgdGltZSkgJSAxMCk= https://maxbittker.github.io/Mojulo/#ICAxMCooKCgoMTAwLXgpXjI... fantastic effect! One of my favorites today, thank you. Quick question - do you think that I should refine the gallery formatting to include attribution? It's a bit of a "discovery vs invention" type quandary
- nacs 12y agoJust wanted to mention, that gallery link is barely noticeable because of the blue color. I didn't notice it on multiple visits till you mentioned there was a gallery. Changing the link color should fix it.
- pokpokpok 12y agohaha it's always been purple for me because it's a clicked link! no wonder nobody can find it. thank you
- gecko39 12y agoSpider thingy: http://maxbittker.github.io/Mojulo/#KCgoNTAgKyA1MCAqIHNpbiggKHktNTApIC8gKCggeC01MCApXjIgKyAoeS01MCleMileMC41ICkpICUgKDM1KzQqc2luKDYrdGltZS8yLjUpICkgKiAxMCkgJSAoKCh4LTUwKV4yICsgKHktNTApXjIpKjAuMjUpICogKCgoeC01MCleMiArICh5LTUwKV4yKSowLjAwMSkpIC0gKCAoKCh4LTUwKV4yICsgKHktNTApXjIpKjAuMSkqKDEuMyswLjUqc2luKDUrdGltZS8yKSkgJSAxMCk= http://maxbittker.github.io/Mojulo/#KCgoNTAgKyA1MCAqIHNpbigg...
- mbq 12y agoFan like+circling around with a long period http://maxbittker.github.io/Mojulo/#c2luKCh5KmNvcyh0aW1lLzIxKS01MCkvKHgqc2luKHRpbWUvMTkpLTUwKSt0aW1lLzUpKjIwMA== http://maxbittker.github.io/Mojulo/#c2luKCh5KmNvcyh0aW1lLzIx...
- pokpokpok 12y agoneat, can't quite grok the mechanics behind it though
- mbq 12y agoFan is (y-50)/(x-50)+time/5, sin is to add texture. Multiplying x by cos and y by sine of the same frequency would simply rotate the fan centre around top right corner, slightly off periods (19 and 21) degenerate that circle into a more interesting Lissajous curve.
- pokpokpok 12y agothanks for breaking it down! I'm adding it to the snazzy new gallery, and implementing Lissajous curves is going to be my new region of exploration
- prezjordan 12y agoVery cool! If you combined this with something like blockly[0] I bet it'd inspire quite a few kids. [0]: https://code.google.com/p/blockly/ https://code.google.com/p/blockly/
- pokpokpok 12y agogood idea! this project was partially inspired by math classes spent in high school plotting pretty polar functions on my graphing calculator instead of paying attention to trigonometry... I'm not sure that mojulo in it's current form will be a useful educational tool but I think that toys similar to this are a great way to impress upon kids a sense of different functions they usually only encounter on paper
- jpallen 12y agoNice! After playing with it for a bit too long, this was my favourite: sin(time * 0.2) * cos(time * 0.1) * (125+125*sin(0.01*(2 + sin(0.6*time)*cos(0.4*time))*((- 50 + x + 20 * cos(0.5*time))^2 + (- 50 + y + 20 * sin(0.3*time))^2)))
- pokpokpok 12y agoNeat! Haven't teased anything like this out of it yet so thanks for sharing, I'll add it to the gallery. Linking works by the way: https://maxbittker.github.io/Mojulo/#ICAgIHNpbih0aW1lICogMC4yKSAqIGNvcyh0aW1lICogMC4xKSAqICgxMjUrMTI1KnNpbigwLjAxKigyICsgc2luKDAuNip0aW1lKSpjb3MoMC40KnRpbWUpKSooKC0gNTAgKyB4ICsgMjAgKiBjb3MoMC41KnRpbWUpKV4yICsgKC0gNTAgKyB5ICsgMjAgKiBzaW4oMC4zKnRpbWUpKV4yKSkp https://maxbittker.github.io/Mojulo/#ICAgIHNpbih0aW1lICogMC4...
- Zolomon 12y agoThis looks kind of cool: rand()/rand() * cos(time)^2 * 127 and rand()/rand() * cos(time/rand())^2 * sin(time/rand())^2 * 127
- boulos 12y agoI like the time element! A friend from my old days got really into algorithmic art (http://dahart.com/paper/hart_evomusart_2007_paper.pdf http://dahart.com/paper/hart_evomusart_2007_paper.pdf) you should consider including exp/ln and others. He's got some nice examples on his webpage (http://dahart.com/blot1.html http://dahart.com/blot1.html).
- pokpokpok 12y agoThanks, these are inspiring. Makes me want to add genetic mechanics.
- lohankin 12y agoBehavior becomes more interesting if you replace (in any formula) time with (time+sin(time)) - and, more generally, with (time+ksin(wtime))
- Tideflat 12y agoHere is a basic thobber: ((cos(time/2)+1)*x)+((cos((time-(3.141*2))/2)+1)*(100-x)) https://maxbittker.github.io/Mojulo/#KChjb3ModGltZS8yKSsxKSp4KSsoKGNvcygodGltZS0oMy4xNDEqMikpLzIpKzEpKigxMDAteCkp https://maxbittker.github.io/Mojulo/#KChjb3ModGltZS8yKSsxKSp... Here is using the same trick to switch between two patterns: ((cos(time/50)+1)*(A*1000))+((cos((time-(3.141*50))/50)+1)*((x-50)^2+(y-50)^2)) https://maxbittker.github.io/Mojulo/#KChjb3ModGltZS81MCkrMSkqKEEqMTAwMCkpKygoY29zKCh0aW1lLSgzLjE0MSo1MCkpLzUwKSsxKSooKHgtNTApXjIrKHktNTApXjIpKQ== https://maxbittker.github.io/Mojulo/#KChjb3ModGltZS81MCkrMSk... Unfortunately, this trick doesn't work well with patterns with high values, and thus most animated patterns don't work. It works like this: ((cos(time/p)+1)*q)+((cos((time-(3.141*p))/p)+1)*Q) where: p is the speed of the switch (Higher is slower), q is pattern #1, and Q is pattern #2. The cos(...)+1 part in both sections is in charge of timing. In the second part we subtract pi * p, which is half the period, from time to make it start at the half point of the cycle.
- pokpokpok 12y agothanks, I appreciated this
- muyuu 12y agox * y * (sin(x+time) * cos(y+time) * time/2)
- pokpokpok 12y agocool, my slight modification: http://maxbittker.github.io/Mojulo/#eCAqIHkgKiAoc2luKCh4K3RpbWUpLzEwKSAqIGNvcygoeSt0aW1lKS8xMCkgKiB0aW1lLzIp http://maxbittker.github.io/Mojulo/#eCAqIHkgKiAoc2luKCh4K3Rp...
- deleted 12y ago[deleted]
- joshu 12y agoI've been CNCing algorithmic output a lot lately. I write something very similar (no time component, but basically evaluated over the unit square.) This stuff is a ton of fun!
- xellisx 12y ago(sin(-x * y) / cos(x * -y)) ^ (time % (r + A))
- daturkel 12y agoThought this came out pretty well: http://maxbittker.github.io/Mojulo/#cip0aW1lKih0aW1lKnNpbih4KS0xL3RpbWUqc2luKHkpKQ http://maxbittker.github.io/Mojulo/#cip0aW1lKih0aW1lKnNpbih4... Speeding it up (increase the first "time" to "time^9") you can see that it eventually "heats up" all the way to black, but it's a nice journey. Edit: also this one has a nice strobe. You can strobe any pattern you make by replacing a time with some variant of B*sin(time/C) where B and C are appropriately chosen coefficients. https://maxbittker.github.io/Mojulo/#MTAwKnNpbih0aW1lLzEwKSpyICUgMTAwMDA= https://maxbittker.github.io/Mojulo/#MTAwKnNpbih0aW1lLzEwKSp...
- gecko39 12y agokinda psychedelic -- stare at it for a while: http://maxbittker.github.io/Mojulo/#MjUwICogKCgoKCh4LTUwKV4yICsgKHktNTApXjIpKjAuMjUpICUgKDEuMSt0aW1lLzEwMDAwLjApICleMTApIC0gKCgoKCh4LTUwKV4yICsgKHktNTApXjIpKjAuMjUpICUgKDEuMDI1ICsgdGltZS8yMDAwLjApICleMjApXjEw http://maxbittker.github.io/Mojulo/#MjUwICogKCgoKCh4LTUwKV4y...
- neuralk 12y agoVery fun, and the gallery is a nice touch. Here's my contribution: (r *(2*sin((-A*time)/10))^100) * ((r * r ) % 2) http://maxbittker.github.io/Mojulo/#KHIgKigyKnNpbigoLUEqdGltZSkvMTApKV4xMDApICAqICgociAqIHIgKSAlIDIp http://maxbittker.github.io/Mojulo/#KHIgKigyKnNpbigoLUEqdGlt...
- smosher_ 12y agoThis is very similar in style to IBNIZ: http://pelulamu.net/ibniz/ http://pelulamu.net/ibniz/ which also does audio. There used to be a JS implementation hosted at http://ibniz.asiekierka.pl/ibniz.html http://ibniz.asiekierka.pl/ibniz.html but the domain seems to have expired. The Wayback Machine has a copy though: https://web.archive.org/web/20120121060156/http://ibniz.asiekierka.pl/ibniz.html https://web.archive.org/web/20120121060156/http://ibniz.asie...
- gecko39 12y agozoomy checkerboard by summing a few sinusoids http://maxbittker.github.io/Mojulo/#NDAqKHNpbigoeC01MCkvKDQrc2luKHRpbWUvMikpKSArICgxLzMpKnNpbigzKih4LTUwKS8oNCtzaW4odGltZS8yKSkpICsgKDEvNSkqc2luKDUqKHgtNTApLyg0K3Npbih0aW1lLzIpKSkpICogKHNpbigoeS01MCkvKDQrc2luKHRpbWUvMikpKSArICgxLzMpKnNpbigzKih5LTUwKS8oNCtzaW4odGltZS8yKSkpICsgKDEvNSkqc2luKDUqKHktNTApLyg0K3Npbih0aW1lLzIpKSkpIA== http://maxbittker.github.io/Mojulo/#NDAqKHNpbigoeC01MCkvKDQr...
- gecko39 12y agoattempt at some water droplets: http://maxbittker.github.io/Mojulo/#MTAgICsgMTY1ICogc2luKDIuNSsgKHktNTApIC8gMjYgKSArIDkwKnNpbiggdGltZSowLjcgLSAoKDAuMSooIHggLSA1MCApXjIgKyAoeS01MCleMiApXjAuNDUpICkgLSAyNTUgKiAoMSArICgoKHgtMSkgJSA1MCkgLSAoeCAlIDUwKSkpICogKDEgKyAoKCAoeSszMC0odGltZSUxOCktMSkgJSAxMCkgLSAoICh5KzMwLSh0aW1lJTE4KSkgJSAxMCkpKSAqICgoeSU1MCkgKyAoNTAteSklNTAp http://maxbittker.github.io/Mojulo/#MTAgICsgMTY1ICogc2luKDIu...
- leni536 12y agoThis is freaking awesome.
- leni536 12y agoI like interference: http://maxbittker.github.io/Mojulo/#MTI3MDAwMCooY29zKHIvNi10aW1lLzEwKS9yK2NvcygoeCp4Kyh5LTEwMCkqKHktMTAwKSleMC41LzYtdGltZS8xMCkvKHgqeCsoeS0xMDApKih5LTEwMCkpXjAuNSsxKQ== http://maxbittker.github.io/Mojulo/#MTI3MDAwMCooY29zKHIvNi10...
- leni536 12y agoOk, I'm getting addicted. http://maxbittker.github.io/Mojulo/#LTIwMDAwMDAwKigoc2luKCgoeC01MCkqKHgtNTApK3kqeSleMC41LzUtdGltZS84LjA5KStzaW4oKCh4LTUwKSooeC01MCkrKHktMTAwKSooeS0xMDApKV4wLjUvNS10aW1lLzUpKzIpLzQpXjIwMA== http://maxbittker.github.io/Mojulo/#LTIwMDAwMDAwKigoc2luKCgo...
- coldcode 12y agosin(r/x) * y * time^2+rand()^y is a nicely non-repeating result
- Tideflat 12y agoFlames: http://maxbittker.github.io/Mojulo/#KC0zMCt5KygoKHNpbigoeC0xMCkvNStzaW4odGltZSt5LzYpKSoxMDApKzEwMCkpKi0xKQ== http://maxbittker.github.io/Mojulo/#KC0zMCt5KygoKHNpbigoeC0x...