dwitter.net

+ New dweet
function u(t) {
} //
122/140


Please log in (or register) to post a dweet (copy-paste the code somewhere safe to save it meanwhile)


u(t) is called 60 times per second. t: Elapsed time in seconds. S: Shorthand for Math.sin. C: Shorthand for Math.cos. T: Shorthand for Math.tan. R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5) c: A 1920x1080 canvas. x: A 2D context for that canvas.
show FPS hide FPS share 1 remix fullscreen
remix of d/10534 by u/tomxor

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • u/KilledByAPixel
    👍
  • u/KilledByAPixel
    can you link us to more info on these equations?
  • u/tomxor
    i'm not sure i can, much of it is just from messing around here on dwitter, and all of the chaotic stuff i've been doing has evolved from some distant bifructation thing here ages ago. Which part are you interested in specifically? I can try to explain as far as I understand it.
  • u/tomxor
    Assuming you are refering to the pattern rather than the mapping, it's essentially just a+=(R-a+b*S(a*P))/2,b+=(-a*b+C(a*P))/2 where i've generated R{0,1} deterministically with a basic LCG type PRNG that feeds off the variables themselves: t*i/b&1, everything else is mapping. For the pattern i've just been messing with the coefficients and number of itterations between fresh generation of R for my various other dweets, but ultimately it all started here d/15329 which I adapted from u/taupelink so maybe he can tell us what it's formal name is because I can't figure it out.
  • u/KilledByAPixel
    thanks, i will look into it!
  • u/denzen
    wow, amazing!
  • u/magna
    wow!
  • u/denzen
    a bit buggy in safari
  • u/tomxor
    I can't see safari, but if it's anything like blink's renderer then the compositor seems to change it's bias torards ceiling into 256 for high alpha, at least when derived from antialiasing subpixel shapes as in this case. Firefox seems to be less biased and faster to boot, so the ring will dissappear around the back as it's supposed to as the pixel area approaches epsilon. These differences are inevitable when exploiting something as sensitive as antialiasing or downsampling.
  • u/rodrigo.siqueira
    I'm trying to understand how the "R" part works in the equation. Do you know? I see it's a number that varies between a few values. Is it a sort of "radius"? Is it randomness important or can it be non-random? Why a constant doesn't work?
  • u/metamero
    one of my favorites ever
  • u/tomxor
    @rodrigo The R part (t*i/b&1) is just a smaller replacement for Math.random(), formally it's an LCG PRNG, informally it's a bunch of stuff I multiplied together modulo 2 that I found to be sufficiently unifom (it would be a terrible PRNG more generally if analysed in detail it's probably full of regularities).
  • u/tomxor
    A replacement for 0|Math.random()*2 (floored) I meant to say.
  • u/rodrigo.siqueira
    I was trying to understand what is the intuitive meaning of this value "0|Math.random()*2" in the equation. I am still not sure (and I am probably wrong) but It seems that adding this "R" value to variable "a" (X position), it will displace the image to the right or left and create a similar image. It seems that it also works as a radius (zoom factor).
  • u/tomxor
    Well my intuition from my limited understand here is that it's kind of like a fork at each point in the path that [a,b] is taking, as long as R is uniform enough the bias in the function sort of emerges and makes [a,b] follow certain paths more than others... I imagine it like a stochastic marble rolling into certain grooves in a landscape, just goto roll enough marbles to start to see the grooves.
  • u/tomxor
    Sounds a bit like 2d gradient descent O_o

Please log in (or register) to comment.

u(t) is called 60 times per second. t: elapsed time in seconds. c: A 1920x1080 canvas. x: A 2D context for that canvas. S: Math.sin C: Math.cos T: Math.tan R: Generates rgba-strings, ex.: R(255, 255, 255, 0.5)