파일:CA rule110s.png

문서 내용이 다른 언어로는 지원되지 않습니다.
위키백과, 우리 모두의 백과사전.

원본 파일(10,000 × 10,000 픽셀, 파일 크기: 167 KB, MIME 종류: image/png)

파일 설명

설명 아래를 참조하세요.
날짜
출처 원판 업로더 자신의 작품
저자 Grondilu (talk) (Uploads)
다른 버전

Made with the following Perl code:

use strict;
use warnings;
use GD;

package Automaton {
    sub new {
        my $class = shift;
        my $rule = [ reverse split //, sprintf "%08b", shift ];
        return bless { rule => $rule, cells => [ @_ ] }, $class;
    }
    sub next {
        my $this = shift;
        my @previous = @{$this->{cells}};
        $this->{cells} = [
            @{$this->{rule}}[
                map {
                    4 * $previous[($_ - 1) % @previous]
                    + 2 * $previous[$_]
                    + $previous[($_ + 1) % @previous]
                } 0 .. @previous - 1
            ]
        ];
        return $this;
    }
    use overload
        q{""} => sub {
            my $this = shift;
            join '', map { $_ ? '#' : ' ' } @{$this->{cells}}
        };

    sub to_image {
        my ($this, $width, $height) = @_;
        my $image = GD::Image->new($width, $height);
        my $black = $image->colorAllocate(0, 0, 0);
        my $white = $image->colorAllocate(255, 255, 255);

        my $x = 0;
        my $y = 0;
        foreach my $cell (@{$this->{cells}}) {
            if ($cell) {
                $image->setPixel($x, $y, $black);
            } else {
                $image->setPixel($x, $y, $white);
            }
            $x++;
            if ($x >= $width) {
                $x = 0;
                $y++;
                last if $y >= $height;
            }
        }
        return $image;
    }
}

my ($width, $height) = (10**4, 10**4);
my @a = map 0, 1 .. $width;
$a[$width - 1] = 1;
my $a = Automaton->new(110, @a);

# Save to file
open(my $out, '>', 'output.png') or die "Cannot open file: $!";
binmode $out;
print $out "P1\n$width $height\n";

for (1 .. $height) {
    print $out join(' ', @{$a->{cells}}) . "\n";
    $a->next;
}

close $out;


라이선스

영어 위키백과Grondilu은(는) 아래 작품의 저작권자로서, 해당 저작물을 다음과 같은 라이선스로 배포합니다:
Creative Commons CC-Zero 이 파일은 크리에이티브 커먼즈 CC0 1.0 보편적 퍼블릭 도메인 귀속에 따라 이용할 수 있습니다.
저작물에 본 권리증서를 첨부한 자는 법률에서 허용하는 범위 내에서 저작인접권 및 관련된 모든 권리들을 포함하여 저작권법에 따라 전 세계적으로 해당 저작물에 대해 자신이 갖는 일체의 권리를 포기함으로써 저작물을 퍼블릭 도메인으로 양도하였습니다. 저작권자의 허락을 구하지 않아도 이 저작물을 상업적인 목적을 포함하여 모든 목적으로 복제, 수정·변경, 배포, 공연·실연할 수 있습니다.

기존 올리기 기록

The original description page was here. All following user names refer to en.wikipedia.
  • 2014-02-28 08:32 Grondilu 1000×1000× (10463 bytes) Made it myself with the following Perl code: <code>use strict; use warnings; package Automaton { sub new { my $class = shift; my $rule = [ reverse split //, sprintf "%08b", shift ]; return bless { rule => $rule, cells => [ @_ ] }, $class;...

설명

이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다

이 파일에 묘사된 항목

다음을 묘사함

9b1b62f5bf9ee9a880d31358b7337a51c56c12d9

170,613 바이트

10,000 화소

10,000 화소

파일 역사

날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

날짜/시간섬네일크기사용자설명
현재2023년 8월 5일 (토) 02:142023년 8월 5일 (토) 02:14 판의 섬네일10,000 × 10,000 (167 KB)Obscure2020Optimized with OxiPNG and ZopfliPNG.
2023년 7월 11일 (화) 06:192023년 7월 11일 (화) 06:19 판의 섬네일10,000 × 10,000 (1.75 MB)CJKVRShowing more executions
2014년 2월 28일 (금) 05:412014년 2월 28일 (금) 05:41 판의 섬네일1,000 × 1,000 (10 KB)GrondiluBigger version, right aligned.
2006년 3월 19일 (일) 02:552006년 3월 19일 (일) 02:55 판의 섬네일500 × 250 (2 KB)MaksimLa bildo estas kopiita de wikipedia:en. La originala priskribo estas: Smaller version of CA_rule110.png {{GFDL}} {| border="1" ! date/time || username || edit summary |---- | 21:57, 1 February 2005 || en:User:Quadell || <nowiki>(tagged)</nowiki> |

다음 문서 1개가 이 파일을 사용하고 있습니다:

이 파일을 사용하고 있는 모든 위키의 문서 목록

다음 위키에서 이 파일을 사용하고 있습니다: