Show HN: Mojulo – Pixelated Math Rendering Sandbox Toy
maxbittker.github.io
maxbittker.github.io
http://maxbittker.github.io/Mojulo/#MTAgICsgMTY1ICogc2luKDIu...
((cos(time/2)+1)*x)+((cos((time-(3.141*2))/2)+1)*(100-x))
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/#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.
There used to be a JS implementation hosted at 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.asie...
(r *(2*sin((-A*time)/10))^100) * ((r * r ) % 2)
http://maxbittker.github.io/Mojulo/#KHIgKigyKnNpbigoLUEqdGlt...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/#MTAwKnNpbih0aW1lLzEwKSp...
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)))https://maxbittker.github.io/Mojulo/#ICAgIHNpbih0aW1lICogMC4...
http://maxbittker.github.io/Mojulo/#NDAqKHNpbigoeC01MCkvKDQr...
10*((((100-x)^2+y^2)^0.5 + time) % 10) + 10*((((x)^2+y^2)^0.5 + time) % 10)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
Changing the link color should fix it.
http://maxbittker.github.io/Mojulo/#LTIwMDAwMDAwKigoc2luKCgo...
http://maxbittker.github.io/Mojulo/#MTI3MDAwMCooY29zKHIvNi10...
rand()/rand() * cos(time)^2 * 127
and
rand()/rand() * cos(time/rand())^2 * sin(time/rand())^2 * 127
This stuff is a ton of fun!
http://maxbittker.github.io/Mojulo/#MjUwICogKCgoKCh4LTUwKV4y...
x * y * (sin((x+time)/5) * cos((y+time)/5)) * 15 + 3000
http://maxbittker.github.io/Mojulo/#IHggKiB5ICogKHNpbigoeCt0...