User:Michael.Pohoreski

Buddhabrot
Single core and multi-core versions of the Buddhabrot renderer are now hosted on [GitHub Michaelangel007/buddhabrot]. This [2880x2160 bitmap @ 32,768 depth] took 42 minutes utilizing 8 cores on an i7 @ 2.6 GHz!

See my [ http://en.wikipedia.org/wiki/User_talk:Michael.Pohoreski ] discussion page if you want to leave feedback. Thx.

Ray Marching

 * "HOWTO: Get Started with Ray Marching"

Combinations & Permutations
Note: A full white paper _"Understanding Permutations and Combinations for Programmers"_ is forthcoming ...

I originally posted this beautiful symmetry between Permutations (Variable Bit Decoding) and Combinations (Constant Bit Decoding) to the Permutations page.

This is the last revision it appeared. http://en.wikipedia.org/w/index.php?title=Permutation&oldid=342103380#Encoding_and_decoding

Encoding and decoding
One can map every possible permutation state of a given set of size n to a unique factoradic integer k, where k ranges from 1 to n! . Iterating the previous or next permutation becomes a trivial add or subtract one. One can also compactly store this permutation state, compared to storing the permutation itself (as we only need to store Ceiling(Log(n!) / Log(2)) bits compared to n*Ceiling(Log(n) / Log(2)) bits.)

i.e. Given a size of 3, iterating all possible values for k gives the following permutations:
 * 1) ABC
 * 2) ACB
 * 3) BAC
 * 4) BCA
 * 5) CAB
 * 6) CBA

i.e. One could represent a deck of cards using to Log(52!)/Log(2) = 226 bits compared to the standard 6-bits per card * 52 cards = 312 bits.

The question becomes:
 * 1) how does one encode the permutation state into a unique value k, and
 * 2) how does one decode a specific value k into the permutation state.

Encoding and Decoding a given sequence to the unique integer is a variation on Variable Bit Decoding, where the base changes size every iteration. The following sample code demonstrates the beautiful symmetry between Permutations (Variable Bit Decoding) and Combinations (Constant Bit Decoding)

Minor edit: Fixed spelling.