Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I am always interested to see ways that people apply different layout ideas to code.

The Golden Section is a number considered to produce the most aesthetically pleasing ratios of things. A playing card's dimensions are usually roughly the same ratio: 1:1.618

For the past few hundred years print designers have been aware of the Golden Section and have been working it into their page sizes and margins - so wether it's beautiful and that's why we use it, or we use it and that's why it's beautiful - there's no question that we are familiar with seeing this design tool be used in print.

This looks like a library to help integrate some of those layout ideals into your code in ways that would be tricky or cost a lot of time to implement otherwise.



view as:

The 'Golden Section' is mystical bullshit.

A 1:1.618 ratio has some geometric properties that are useful in rare situations, but the idea that it is "aesthetically pleasing" is completely unfounded.

Explanation here: http://www.lhup.edu/~dsimanek/pseudo/fibonacc.htm


That guy's wound a little too tightly.

The golden ratio is not particularly magic in aesthetic pleasure; playing cards are in fact made with a ratio of 7:5, being 3.5" high and 2.5" wide. You get closer with bridge cards (a 1.555...) and index cards (1.666..). If you don't believe me, go out and try to buy picture frames for 5" x 8" or 8" x 13" or 13" x 21". They're just not a common ratio. You might as well say that the square root of 2 is aesthetically magical. (It actually is practically magical, as the European paper sizes point out.)

What's cool about the golden ratio is that it's the most irrational number by a couple of interesting heuristics, having come from one of the simplest recursive processes you can think of and therefore having the simplest continued fraction.

Transforming the definition of a golden rectangle into a process to "goldenize" a rectangle by adding a square to one side and rotating by 90 degrees leads to `goldenize (w, h) = (h + w, w), which implements the Fibonacci recursion rule. In turn if you "lift" the subscripts in that rule into superscripts F^n = F^{n - 1} + F^{n - 2}, you get a quadratic for F and if you solve it, you get the golden means F = f and F = -1/f.

You can also see this recursion at work in pentagrams: if you work out the three angles at the vertex of the outer pentagon, it turns out they're all the same angle (36 degrees, 180/5). If you then look at the side lengths in the top part of the pentagram, this fact lets you infer that the sideways-pointing triangles are isosceles (36-72-72) and combined with the 36-36-108 isosceles triangle you can derive the golden ratio again.

Those things about it are aesthetically pleasing; but I don't find that people unconsciously choose ratios of Fibonaccis as their perfect rectangles moreso than, say, 4x3 rectangles.


Legal | privacy