🛠️ToolsShed

Golden Ratio Calculator

Calculate golden ratio dimensions — given one value, find the other for perfect φ proportions.

φ

= 1.6180339887

φ = (1 + √5) / 2 ≈ 1.6180339887

Width

100.0000

Height

61.8034

Ratio

1.618034

φ

Fibonacci approximations of φ:

RatioFractionValue
F(8)/F(7)21/131.615385
F(9)/F(8)34/211.619048
F(10)/F(9)55/341.617647
F(11)/F(10)89/551.618182
F(12)/F(11)144/891.617978

Preguntas Frecuentes

Implementación de Código

# Golden ratio calculations
PHI = (1 + 5 ** 0.5) / 2  # 1.6180339887...

def golden_ratio_split(total):
    """Split a length into golden ratio proportions"""
    major = total * PHI / (1 + PHI)
    minor = total / (1 + PHI)
    return major, minor

def golden_width_to_height(width):
    return width / PHI

def golden_height_to_width(height):
    return height * PHI

# Examples
print(f"phi = {PHI:.10f}")
width = 1920
height = golden_width_to_height(width)
print(f"Golden height for width {width} = {height:.0f}")  # 1186

total = 100
major, minor = golden_ratio_split(total)
print(f"Split {total}: major={major:.3f}, minor={minor:.3f}")  # 61.803, 38.197

# Fibonacci approximation
fibs = [1, 1]
for _ in range(10):
    fibs.append(fibs[-1] + fibs[-2])
for a, b in zip(fibs[-6:], fibs[-5:]):
    print(f"{b}/{a} = {b/a:.6f}")

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.