0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

黄金比の説明に使われる黄金螺旋とフィボナッチ螺旋の誤差について

Posted at

image.png

黄金比の話題をするときに、このような図をよく見かけます。1:(1+√5)/2の縦横比で長方形を作った際に登場します。このときに、4分の1の円を次々につなげていくと、黄金螺旋になるという話なのですが、厳密には、近似です。
上の図でいうと、ピンクの図が四分円。黒線が黄金螺旋。
近似にしては「誤差が大きい」というのが、私の感覚。

wikiには、下図が示され、赤破線が円弧、青線が黄金螺旋と記載されています。
https://en.wikipedia.org/wiki/Golden_rectangle#/media/File:Golden_vs_Fibonacci_Spiral.svg
image.png

2つの螺旋の呼び方

円弧の組み合わせで表現した曲線:
(Fibonacci spiral)「フィボナッチ螺旋」

もう一方の曲線:
(Golden spiral)「黄金螺旋」

黄金螺旋の定義

極座標表記で示す

r=\phi^{2\theta/\pi}

(うまく表示されないが、ファイは黄金比)

以下で、SVGフォーマットで保存できます。

Processing
import processing.svg.*;

float phi = (1 + sqrt(5)) / 2;
float th, r, x, y, _x=1, _y=0;

size(800, 800);

beginRecord(SVG, "golden_spiral.svg");
stroke(0);

translate(width / 2, height / 2);
scale(-1, 1);

for (th = 0; th < 6.08*PI; th+=0.01) {
  r = pow(phi, 2*th / PI);
  x = r * cos(th);
  y = r * sin(th);

  line(_x, _y, x, y);

  _x = x;
  _y = y;
}

endRecord();

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?