Context Free続きの続き 2007/02/20 10:19 pm なんせ、忙しい。 ので昨日お約束したとおり続きです。わずかなコードで地図の出来上がり。 CityMap variation KUQ CityMap variation KVE CityMap variation KVG おもしろいっしょ。 ちなみに「Context Free」は「文脈自由文法」と訳すのだそうで、意味を調べて見ましたが→文脈自由文法[Wikipedia]、さっぱりわかりません。 以下コードです。 /*citymap.cfdg*/ startshape line rule line{ bend_line{} } rule bend_line 100{ SQUARE{z 0} SQUARE{x 0.25 z 2 s 0.5 b 1} SQUARE{x -0.25 z 2 s 0.5 b 1} bld
Context Free Art というのを試してみた。 再帰的な図形を簡単に描く為のプログラムらしい。いっちょやってみるか。例えば丸を描くのはこうする。丸 (CIRCLE) の他にも四角 (SQUARE) と三角 (TRIANGLE) が描ける。描ける図形は http://contextfreeart.org/mediawiki/index.php/Primitive_shapes に表がある。最初の startshape で図形の名前を指定して、その後に使いたい図形を書く。 startshape MARU rule MARU { CIRCLE {} } 赤く塗って日の丸にするには {} の中に丸の性質を書く。例えば赤にするために hue (色相 0 〜 360) saturation (彩度 -1 〜 1) brightness (明るさ -1 〜 1) を指定した。数字は相対値になる
Context Free is a program that generates images from written instructions called a grammar. The program follows the instructions in a few seconds to create images that can contain millions of shapes. Look The gallery contains almost a thousand works of art created by artists from around the globe. Create Context Free is, well, free! You can download the software and start creating art on your comp
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く