Skip to content

Instantly share code, notes, and snippets.

@x-or
x-or / xor-rgb-play.py
Last active December 13, 2015 19:59
XOR RGB Sliding
power = 9
size = 2**power
scenario = [
# scene 0
(size, lambda i, x, y: ((x+i)%size, x, (x-i)%size),
lambda i, x, y: (y, (y+i)%size, (y-i)%size)),
# scene 1
(size, lambda i, x, y: ((x-i)%size, (x-i)%size, x),
lambda i, x, y: (y, (y+i)%size, (y+i)%size)),
@x-or
x-or / xorgen.py
Created July 11, 2013 08:07
Multi-Layered XOR Pattern Motion Generator
# Multi-Layered XOR Pattern Motion Generator
# Copyright (c) 2013, Sergey Shishmintzev
# License: MPL/GPL
# Interpreter: Python 2.7.3 + numpy 1.6.2 + PIL 1.1.7
# P.S. Sorry for my English. It isn't my mother tongue.
import numpy as np
def bitreverse(n, l):
@x-or
x-or / xorgen2.py
Created July 20, 2013 11:30
Cellular Automata with Modular Arithmetic: Advanced Munching Squares
# Cellular Automata with Modular Arithmetic: Advanced Munching Squares
# Copyright (c) 2013, Sergey Shishmintzev
# License: MPL/GPL
# Interpreter: Python 2.7.3 + numpy 1.6.2 + PIL 1.1.7
#
# P.S. Sorry for my English. It isn't my mother tongue.
#
# Reference:
# [Khan1997] A.R. Khan, et.al., "VLSI architecture of a cellular automata machine", 1997,
# http://dx.doi.org/10.1016/S0898-1221(97)00021-7
@x-or
x-or / unkgen.cpp
Created September 19, 2013 07:27
Abstract Patched Plasma
///// Abstract Patched Plasma
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/lhX0IPpsg6E
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
/////
///// Reference:
///// [Khan1997] A.R. Khan, et.al., "VLSI architecture of a cellular automata machine", 1997,
@x-or
x-or / unkgen.cpp
Created September 19, 2013 07:36
Abstract Choppy Liquid Demo
///// Abstract Choppy Liquid
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/ow180xHS3bY
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
/////
///// Reference:
///// [Khan1997] A.R. Khan, et.al., "VLSI architecture of a cellular automata machine", 1997,
@x-or
x-or / unkgen.cpp
Created September 19, 2013 07:42
Abstract Plasma
///// Abstract Plasma
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/xImkiaobRJA
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
/////
///// Reference:
///// [Khan1997] A.R. Khan, et.al., "VLSI architecture of a cellular automata machine", 1997,
@x-or
x-or / unkgen.cpp
Created September 19, 2013 07:46
Cellular Cubism
///// Cellular Cubism
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/bGNsrzVarfo
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
/////
///// Reference:
///// [Khan1997] A.R. Khan, et.al., "VLSI architecture of a cellular automata machine", 1997,
@x-or
x-or / unkgen.cpp
Created September 20, 2013 12:51
Pulpy Linen
///// Pulpy Linen
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/NWwGkdmsAQ0
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
#include <assert.h>
@x-or
x-or / unkgen.cpp
Created September 21, 2013 10:51
Fantastic Plasmoids
///// Fantastic Plasmoids
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/5dI-HHD9RsI
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
#include <assert.h>
#include <stdio.h>
@x-or
x-or / unkgen.cpp
Created September 27, 2013 08:41
Fantastic Lava
///// Fantastic Lava
///// Copyright (c) 2013, Sergey Shishmintzev
///// License: Apache/GPLv3
///// Example: http://youtu.be/OZ0wLfmWhHo
///// Compiler: gcc-4.7.3 (cygwin)
///// Compile command: g++ -O3 unkgen.cpp -lpng
///// P.S. Sorry for my English. It isn't my mother tongue.
#include <assert.h>
#include <stdio.h>