工具 指南
math 免费 无需注册

斐波那契数列与黄金比例可视化工具

可视化斐波那契数列、动态黄金螺旋以及比值向φ的收敛过程。

正在加载工具…

关于此工具

探索斐波那契数列及其与黄金比例φ ≈ 1.618的深层联系。观看在画布上绘制的动态黄金螺旋,检查连续比值如何收敛到φ,并在帕斯卡三角形中发现隐藏的斐波那契数。每个可视化旁都显示了包括比内公式在内的公式。

使用方法

  1. 1 第一步:工具自动显示前20个斐波那契数和关键公式。
  2. 2 第二步:点击「动画螺旋」观看黄金螺旋在画布上绘制自身。
  3. 3 第三步:查看比值表,观察F(n+1)/F(n)如何向φ收敛。
  4. 4 第四步:向下滚动探索帕斯卡三角形中高亮显示的斐波那契数。

Seeing the Fibonacci sequence, not just listing it

The Fibonacci sequence — 0, 1, 1, 2, 3, 5, 8, 13… — is easy to write down but hard to feel. This visualizer connects the bare numbers to the geometry and ratios they secretly encode: the golden spiral, the golden rectangle, the convergence toward the golden ratio φ, and the hidden appearance of Fibonacci numbers inside Pascal's triangle. Each panel is generated live in your browser, so the relationships are shown rather than merely asserted.

The sequence and its two formulas

The tool lists the first 20 terms, each labelled F(n), and states both ways to define them:

  • The recurrence: F(0)=0, F(1)=1, F(n) = F(n−1) + F(n−2) — every term is the sum of the two before it.
  • Binet's formula: F(n) = (φⁿ − ψⁿ) / √5, where φ = (1+√5)/2 ≈ 1.618034 and ψ = (1−√5)/2. This closed form computes any term directly, without iterating.

The two are equivalent: the recurrence builds the sequence step by step, while Binet's formula reaches term n in one shot — a neat illustration that a recursively defined sequence can have an exact algebraic expression.

The golden ratio, and why the ratios converge

The most striking panel is the ratio convergence table. For each n it divides consecutive terms, F(n+1) / F(n), and shows how close the result is to φ:

nF(n+1)/F(n)Error from φ
11.000000000.61803399
51.600000000.01803399
81.618181820.00014783
121.618034450.00000046

The ratio oscillates above and below φ but the error shrinks fast — by the twelfth term it agrees to six decimal places. This is the rigorous version of the famous claim that "Fibonacci numbers approach the golden ratio": the table lets you watch the error column collapse toward zero.

The spiral and the rectangle

The golden spiral is drawn by laying out squares whose sides are successive Fibonacci numbers — 1, 1, 2, 3, 5, 8, 13, 21 — each butted against the last, then sweeping a quarter-circle arc through each square. Press Animate Spiral and the squares and arcs build up over two seconds so you can see the construction order. Alongside it, the golden rectangle shows a φ:1 box: remove the largest square that fits and the leftover is itself a smaller golden rectangle — the self-similarity that makes the spiral possible. Note that a true logarithmic golden spiral and the Fibonacci-square arc spiral are close cousins but not identical; the square-based version is the classic teaching diagram.

Fibonacci hiding in Pascal's triangle

The final panel draws rows 0–7 of Pascal's triangle (each entry the sum of the two above it) and highlights the Fibonacci numbers within. The deeper fact it points to: the sums along the triangle's shallow diagonals are exactly the Fibonacci numbers. It is a satisfying surprise that a sequence about adding the previous two terms turns up inside a triangle about binomial coefficients.

Where Fibonacci shows up in the world

Part of why this sequence fascinates people is how often it surfaces in nature and art. The number of spirals in a sunflower head, a pinecone, or a pineapple's surface very commonly lands on a Fibonacci number, because packing seeds at the golden angle (about 137.5°, derived from φ) fills space most efficiently with no two seeds competing for the same direction. The branching of some plants and the arrangement of leaves around a stem follow related patterns. It is worth a word of caution, though: not every claim of "Fibonacci in nature" holds up, and the idea that classical architecture or the human body is built precisely on φ is often overstated. The visualizer sticks to what is mathematically true — the recurrence, Binet's formula, the proven convergence of the ratio, and the diagonal sums in Pascal's triangle — so you can separate the solid mathematics from the folklore.

Use cases and tips

  • Teaching and learning. Use the convergence table to make "approaches φ" concrete, and the animation to show how the spiral is built square by square.
  • Design intuition. The golden rectangle panel is a quick reference for designers curious about φ-based proportions.
  • Checking your understanding. Compare a term you computed by Binet's formula against the listed F(n) to confirm the two definitions agree.
  • Watch for floating-point limits. Binet's formula and large ratios rely on irrational numbers; past a certain term, tiny rounding differences appear, which is exactly why the error column never reaches a perfect zero.

Everything is generated and animated locally in your browser — no input is required and nothing is sent anywhere — so the visualizer works fully offline.

常见问题

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}