wonderfl - build flash online

forked from: forked from: フラクタルで画像を描画する

2009/12/17
* Rectangle と BitmapData.histogram を使って、ENTER_FRAME を排除

フラクタルで画像を描画

パクリ元ネタ:
fladdict » コンピューターに絵画を描かせる
http://fladdict.net/blog/2009/05/computer-painting.html

標準偏差:
http://www.cap.or.jp/~toukei/kandokoro/html/14/14_2migi.htm

画像の読み込み処理:
http://wonderfl.kayac.com/code/3fb2258386320fe6d2b0fe17d6861e7da700706a

RGB->HSB変換:
http://d.hatena.ne.jp/flashrod/20060930#1159622027

Aquioux Aquioux

add to favorites

Embed

Code Fullscreen

Talk

BitmapData.histogram(rect)で実際に切り取られる範囲が何だかややこしいことになってるようなので、
平均を出すときに用いる値 _numOfPixel を

_numOfPixel = _rect.width * _rect.height;

の代わりに

_numOfPixel = 0;
for (i = 0; i < 256; i++) {
_numOfPixel += _histVector[0][i];
}

とすると良いのかも。

Favorite by

hacker_rs10vazy hacker_rs10v.. :

painting

ep91ckok ep91ckok :

tipsBitmapData.histogram を使うことで指定範囲の平均と標準偏差をかなり高速に計算する

Tags

sectKeywords

ページの先頭へ戻る