Skip to content

Instantly share code, notes, and snippets.

<html>
<head><title>Canvas Halftoning</title></head>
<body>
<canvas id="c"></canvas>
<img id="s" src="./pomeranian.jpg" />
</body>
<script type="text/javascript">
var interval = 8;
var angles = { y: 108, m: 162, c: 90, k: 45 };

グリッチに関するノート

ヒュー S. マローン/ダニエル・テムキン

データベンディング、データモッシング、イメージハッキング、そしてグリッチアート、様々な名称で呼ばれる一連の手法を定義し、また理論化しようと、一年以上にわたり作家たちと断続的な議論を繰り返し以下の文章は生まれた。これらの「ノート」は完全でもないし結論的なものでもなく、復習し議論し批評し解釈を拡大させていくための、ゆるやかに描かれた一群の図を提供するものである。


// ==UserScript==
// @name Googlitch Maps
// @namespace http://userscripts.org/users/ucnv
// @description crushes the Google Maps
// @include http://maps.google.tld/*
// ==/UserScript==
// This script is based on GlitchMonkey <http://github.com/youpy/glitchmonkey>
document.addEventListener('DOMAttrModified', glitch, false);
# This file is a kind of Ruby port of JPGEncoder.as
# <https://github.com/mikechambers/as3corelib/blob/master/src/com/adobe/images/JPGEncoder.as>
# Copyright (c) 2008, Adobe Systems Incorporated
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
@ucnv
ucnv / sabotage.md
Last active December 5, 2019 07:55

サボタージュ!グリッチ政治学の手引き

カート・クロニンガー/ニック・ブリッツ

1 コンピュータは間違いを犯さない、人々が犯すのだ。同じ変数で、同じ入力なら、コンピュータは常に同じ出力を表示する。しかしながら、しばしばプログラマーが手を滑らせ、ループを閉じるのをわすれたり、不意にメモリリークを残したりする。しばしばユーザーは想定されていないやり方でファイルを開くし、ファイル転送が終わらないうちにUSBを引き抜いたりする。それがまったくありきたりな、しかし想定外の出力結果を導く。私達はそれをコンピュータのせいにし、その瞬間のことをグリッチと呼ぶ。

2 おそらく、グリッチとはシステム障害のことだと思われているだろう。我々の目的にかなった実際的な見方によれば、その障害がシステムの輪郭をはっきりと暴く、そのやり方にこそ価値がある。無数の違った失敗の仕方があり、それぞれが新しい方法でシステムの振る舞いのユニークな(ユニークに利用可能な)輪郭を描く。ハイデガーの壊れた鉄槌により世界全体を停止点検する(我々のすべてのキンタマ道具、キンタマ計測、靴、ワークショップ、丘の中腹、牛の隠れ家、雨、ふくろう、大槌、ファミコン)。我々が暗黙のうちに使っている世界、気付かぬうちに巻き込まれている世界を。しかし、だからなんだ?壊れた鉄槌を見つめるのをやめて、もっと鉄槌を壊してみよう。無数の壊れた鉄槌。

<html>
<head><title>Canvas Delaunay Triangulation</title></head>
<body></body>
<script type="text/javascript">
var img = new Image();
img.onload = init;
img.src = './bg_10.jpg';
var display, source;
var points = [], drew = [];
def rifftree io, depth = 0, len = 0
offset = io.pos
while id = io.read(4) do
if len > 0 && io.pos >= offset + len
io.pos -= 4
break
end
size = io.read(4).unpack('V').first
out = depth > 0 ? ' ' * depth + id : id
require 'ubygems'
require 'finalcut' # http://gist.github.com/397955
files = ARGV
tick = 0.2
margin = 0.2
out = 'out.mp4'
FinalCut.open(*files) do |fc|
durations = files.map {|f| fc.get_duration f }
#!/usr/bin/env ruby
require 'docopt'
doc = <<DOCOPT
Usage:
#{File.basename __FILE__} <dpi> <px> [--verbose]
Options:
-v --verbose Show numbers after the decimal point.
-h --help Show this screen.
require 'image_size'
require 'cocaine'
infile = ARGV.shift # must be png
size = ImageSize.path infile
png_yuv = 'tmp/' + File.basename(infile) + '.yuv'
cmd = Cocaine:: CommandLine.new 'convert', 'png::in -sampling-factor 4:2:0 -depth 8 :out'
cmd.run in: infile, out: png_yuv
yuv_hevc = png_yuv + '.hevc'