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?

レプタイル、Polyformのプログラム

Posted at

【訳】
自己複製タイル、または「レプタイル」とは、自身の小さなコピーによってタイルを敷き詰めることができるタイルのことです。ポリオミノ、ポリヘキサ、ポリアモンドは、それぞれ正方形、六角形、正三角形を端から端まで繋げて構成された図形です。これらのポリフォームは、無限回の反復という限界の中で、フラクタルなレプタイルになるように配置することができます。このプロセスは、ロバート・ファトハウアーによる2025年の論文で詳細に説明されています。この手法については、こちらでより簡潔に説明しています。

ドミノ(2つの正方形から始まるPolyform)

FractalDiversions2Domino.pde
float w = 80;
float s = 1.0/sqrt(2);

void setup() {
  size(1900, 200);
  background(255);
  stroke(220, 0, 0);
  noFill();
  rectMode(CENTER);
  noLoop();
  
  for(int i=1; i<16; i++){
    strokeWeight(i);
    pushMatrix();
      translate( i*110, 140);
      func(i);
    popMatrix();
  }
}

void func(int n) {
  if(n==1){
    rect(0, 0, w, w);
  }
  rotate(-PI/4.0);
  scale(s);
  if(n>1){
    pushMatrix();
      func(n-1);
    popMatrix();
    pushMatrix();
      translate(w, 0);
      func(n-1);
    popMatrix();
  }
}

image.png

svg保存して、レーザーカッターで切り出しましょう。

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?