With a lot more of math, you can do a probably interesting step fractalish thingy... (I actually dunno if it's indeed a fractal...)
I call it "circular rounding"
standard rounding works like this:
Code: Select all
floor(x+0,5) = rounded to 0 digits
by changing the weight-value (if I can call it like that) "0,5" you can affect the probability of rounding up or down....
further, you can enhance the precession, or reduce it as you want:
Code: Select all
floor(x/5+0,5)*5 = rounded to 0 or 5 at the end
floor(2*x+0,5)/2= rounded to halves (,5)
floor(x*10^a+0,5)/10^a = rounded to a digits (a usually can be an Integer)
Now, you actually can extend that precession-choice so that you get "fractional digits", by allowing any real number for a
next thing, you can do, is to change the base... The 10^a actually comes from the fact that any number we use is built like sigma(k*10^n) where 10 is the base, k is a natural number between 0 and 9 and n is any integer. If you'd use a binary number, you could also use a binary base
Or you can use a "wrong" base to get other results...
So, now we have
Let's go back to the 0,5:
floor(x) would reduce any value a,bcdefg...... to a
to get the rounding for up and down correct, you need to add 0,5:
Code: Select all
floor(1) =1
floor(1,3) =1
floor(1,7) =1
but
Code: Select all
floor(1+0,5) = floor(1,5) = 1
floor(1,3+0,5) = floor(1,8) = 1
floor(1,7+0,5) = floor(2,2) = 2
setting that value to 0 means, you always round down
setting it to 1 means, you always round up (with the exception of having an integer already, where it rounds to the next integer:
- to get that correct, you'd need "biggest possible x < 1")
Now, there's a problem:
- the result actually should be -1!
To solve this, we need to do this:
Code: Select all
floor(abs(-1)+0,5)*sgn(-1) = floor(1,5)*-1 = -floor(1,5) = 1
Next step of extension is, to do this in complex values... Here, the circularness of the formula starts:
Currently we have:
To get it to a higher dimension R², let's add a second variable (b, a and p usually will be constant but it you make them variable too, you might get really interesting results by letting each variable control a different thing... on cost of rendering speed, probably)
Let's add an y
Code: Select all
floor(abs(x+y)*b^a+p)*((x+y)/sqrt(x²+y²))/b^a
what you get is sort of a chairhouse... (or a very odd checker-board, if you put it out like that.... you just'd need to kinda check for a jump in the line... "if jump then change col"
I actually tried that (to a very small extend) with complex values:
Code: Select all
floor(abs(x+yi)*(b+di)^(a+ci)+(p+qi))*((x+yi)/sqrt(x²+y²))/(b+di)^(a+ci)=r+si
sqrt(p²+q²)<=1
10D! - if you( coul)'d look at the WHOLE object, you'd probably see the most confusing staircase, ever.