Tag Archive for '4dfrac'

Hypercube zero

Early version of this.


Hypercube (oldpost)

Repost from old blog

Been digging through my old projects, found an interesting thing:

http://users.d2k5.com/Black%20Phoenix/files/screen.rar – download (126KB)

This was an old project for screensaver contest (between some of citys best schools/colleges/liceums), and well, it got 2nd place, after some 3d screensaver (from our school too).

That’s a 4D fractal-like structure, with it’s 4th coordinate projected on color, rendered as voxels (I think it’s 128 voxels in width, not sure). It was pretty tricky to code back then, it uses zbuffer, and some optimizations (faulty too, you can see cube sides dissapear behind the cube sometimes).

Think of it as a color function from 3 parameters, X, Y and Z, i.e. a set of [X,Y,Z] define some color value. Theta is just a variable parameter, it changes with time.

The function is:

Color = X | Y | Z

where | means logical, per-bit OR. This works for both integers, and floating point numbers, except second ones need extra stuff to handle correctly (fraction part is treatened separately, bit representation of floating point numbers has nothing to do with it).

For example, if you have number 2.5 it would become 10.101 in binary, and if we OR it with 1.1 we get 11.101 (10.101 | 1.1).

I even have an article about it on wikipedia here (Binary Pattern), except that one tells only about integers.

This produces some damn nice colors, check this out:

There are also nice patterns generated in 2D/3D:

I wrote an entire program dedicated to generating these patterns:
http://users.d2k5.com/Black%20Phoenix/files/RandomBG.rar

Try it out, but notice: it resides in tray, so close it from there. It’s a nice little program to generate random backgrounds, I made it once XD. Honestly, the backgrounds are not best ever, but some are pretty cool. It’s not optimized or anything, just proof of concept.

Chips & fractals (oldpost)

Repost from old blog

Digging through old projects again, found this awesome (at least I find it awesome) thing:

It’s a fractal thing, binary pattern as I call it. I wrote about them some time ago (remember hypercube? It’s same thing, only in 4d…). Technically this is 3d fractal, and it kind of resembles microchips. I find it pretty neat! Except these are “rotated” 45 degrees…

Small gallery:


Also, hehe, I did rotate it. Here is the rotated, cropped, and also a bit adjusted image:

That’s pretty neat!

In case you want to try it out for yourself, here is the program:
http://users.d2k5.com/Black%20Phoenix/files/chippattern4.rar
Press any key or mouse button, and it will generate new pattern. Last generated pattern is saved into a BMP file… Resize window to get different pattern sizes. It’s random each time you generate it.

Coming soon: program that generates already rotated images. Will be neat, I promise ;)

Have fun!