Incrementing by Phi

From SnOwy - Ed's Wiki Notebook

Jump to: navigation, search

Here's a way to sample an ordered collection of objects --

Increment by the digits of an irrational number in base ten.

This is easiest to describe with an example -- let's sample the characters of this sentence using the digits of φ.

To low precision, φ is 1.618033 -- The first few digits of φ are [1, 6, 1, 8, 0, 3, 3].

T -- selected -- increment by 1
h -- selected -- increment by 6
i
s
(space)
i
s
(space) -- selected -- increment by 1
e -- selected -- increment by 8
a
s
i
e
s
t
(space)
t -- selected -- increment by 0 (omit), increment by 3
o
(space)
d -- selected -- increment by 3
e
s
c -- selected -- end of example
r
i
b
e

The characters sampled are {'T', 'h', ' ', 'e, 't', 'd', 'c'}.

To reduce the spread of indices, you can either place a modulus on the increments or change to a smaller base representation.

Reference

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox