Created
April 9, 2019 04:21
-
-
Save YuukiToriyama/6f3a2eb72cf704f8c4908fbb557fefde to your computer and use it in GitHub Desktop.
ImageMagickを使ってサイケ・アートをつくる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convertコマンドのグラデーション機能の一つであるオペレーター「plasma」を使うとサイケデリックな画面を生成することができます。 | |
# また、オプション「-swirl "角度"」を使うと画面をひん曲げることができます。 | |
convert -size 500x500 -swirl 360 plasma:fractal clockwise.png | |
convert -size 500x500 -swirl -360 plasma:fractal anti-clockwise.png | |
# 時計回りに360度、半時計回りに360度変形させた2つの画像をcompositeコマンドを使って合成しています。それぞれの画像の差分を取って重ね合わせるため、-composeオプションにはdifferenceを指定しています。 | |
composite -compose difference clockwise.png anti-clockwise.png output.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment