画像処理についてあれこれ
ImageMagickをメインに、画像処理についてのTipsを書いていきます。
Wednesday, July 15, 2009
Structure Synthで重み付けをしたランダムな図形描画をおこなう
Structure Synthで重み付けをしたランダムな図形描画をおこなうには、以下のスクリプトのようにruleでw <係数>を指定します。
// ランダムにtileルールを描画
50 * { z 1 } 50 * { x 1 color #e0e0e0 } tile
rule tile {
{ y 0.5 s 0.95 1 0.95 } box
}
// 1/10の重みつけ
rule tile w 0.1 {
{ y 2 s 0.95 4 0.95 } box
}
// 白色の地面
{ y 0 s 200 0.1 200 color white } box
Structure Synthでの出力画像
Sunflowでの出力画像
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment