Title: sprite and labyringth generator formula Post by: Mrz00m on January 06, 2017, 11:52:41 AM Here's a formula that multiplies a square wave with a random frequency on the X and Y planes and then moves the resulting surface through X and Y by the same random frequency square waves at a 10-20 times lower frequency create a totally unpredictable labyrinth type formula, and there are also C64 type game sprites on it. it's very very fast and it is perhaps a good addition to fractal hybrid programs. If you can figure a way to make it have many gradients of size that would be awesome.
http://www.thingiverse.com/thing:1985936 There's a lot of control of the random startpoint, the shapes, and the density/void ratio of the render: labyrinthIsoSurface(); ridgeDensity = 1222;//higher values compress the random oscillator at higher frequency brickDensity = 0.45;//regulates the difficulty of maze mixIntensity= 0.02; mazeSize = 100; module labyrinthIsoSurface (){ for( j = [ 1 : mazeSize ]) for( i = [ 1 : mazeSize ]) { li = lfo(i*ridgeDensity)*547.154;//random lfo values lj = lfo(j*ridgeDensity)*457; xc= (lfo(j*mixIntensity+li) + lfo(i*mixIntensity+lj))*.25+brickDensity;// //xc= (lfo(li) + lfo(lj))*.25+mixIntensity;//run this version to see simple version of maze rd = round(xc)*55; //echo(xc); if (xc > .5) // if isosurface is small, build wall cube { translate( [j ,i, 0]) cube(1); } } } function mod(a,m) = a - m*floor(a/m); function lfo(xx)= mod(abs((sin(floor(xx))*0.01246)*32718.927),1.0)*2.0 - 1.0 ; //erratic sin //low frequency oscillator function similar to synthesizer robot sound like R2D2 Title: Re: sprite and labyringth generator formula Post by: Spain2points on January 09, 2017, 09:40:33 AM That looks really cool, I hope thwy can implement it.
Title: Re: sprite and labyringth generator formula Post by: DarkBeam on January 09, 2017, 09:57:56 AM Can you code this using mb3d's jit or using my DIFS framework?
I don't understand fully your code Title: Re: sprite and labyringth generator formula Post by: Mrz00m on January 10, 2017, 06:47:57 PM Thanks, hi, yes i should learn jit and DIFS framework, sounds fun. I'm a fan of online copy paste graphing tools. i think i found a jit tutorial. will see. Here is a C style implementation, it's actually .JS : Code: function Start () { |