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?

More than 3 years have passed since last update.

ラングトンのアリを描いてみた

Last updated at Posted at 2021-10-30

ラングトンのアリ

ラングトンのアリ(Wiki)によれば、以下の単純なルールを繰り返して描いたものとのこと。

  • 白いマスにアリがいた場合、90°右に方向転換し、そのマスの色を反転させ、1マス前進する。
  • 黒いマスにアリがいた場合、90°左に方向転換し、そのマスの色を反転させ、1マス前進する。

この手の図形はフラクタル幾何学的な繰り返しパターンを想像しますが、以下のようにn=10000程度まではほとんどランダムで、それ以降になると突如規則性が出来てある方向に道のようにまっすぐ伸びて行きます。何故そうなるかは分かっていないようです。

ちなみにこの道が出来始めてからはn=104の周期で黒のマスが12個ずつ増えていくことが分かります。

image.png

このことはEuler Project P349を解くのに役に立ちます。

0
0
1

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?