Haiku Gallery
y \ 紅光亮度橫向線性變化 從 0 到 1
紅隨y變化
科科
'25 Mar 07
x \ 紅光亮度橫向線性變化 從 0 到 1
紅隨x變化
科科
'25 Mar 07
.6 \ 紅 .6 \ 綠 .6 \ 藍
灰
科科
'25 Mar 07
1 \ 紅 .5 \ 綠 0 \ 藍
橘
科科
'25 Mar 07
.5 \ 紅 .5 \ 綠 0 \ 藍
橘
科科
'25 Mar 07
.5 \ 紅 0 \ 綠 0 \ 藍
褐
科科
'25 Mar 07
0 \ 紅 0 \ 綠 0 \ 藍
黑
科科
'25 Mar 07
1 \ 紅 1 \ 綠 1 \ 藍
白
科科
'25 Mar 07
0 \ 紅 1 \ 綠 1 \ 藍
青
科科
'25 Mar 07
1 \ 紅 0 \ 綠 1 \ 藍
紫
科科
'25 Mar 07
1 \ 紅 1 \ 綠 0 \ 藍
黃
科科
'25 Mar 07
1 \ 紅 0 \ 綠 0 \ 藍
紅
科科
'25 Mar 07
0 \ 紅 0 \ 綠 1 \ 藍
藍
科科
'25 Mar 07
0 \ 紅 1 \ 綠
綠
科科
'25 Mar 07
\ wind tunnel 風洞 : x x 2 * ; \ x 從 0 到 1 變成 從 0 到 2 : y y 2 * ; \ y 從 0 到 1 變成 從 0 到 2 : x x 1 - ; \ x 從 0 到 2 變成 從 -1 到 1 : y y 1 - ; \ y 從 0 到 2 變成 從 -1 到 1 : r x x * y y * + sqrt ; \ x,y 到原點的距離 : 度 pi 180 / * ; \ 角度轉徑度 : 反 1 min 1 swap - ; \ 亮度反轉 : a y x atan2 ; \ x,y 角度 從 -180 到 180 r 1 < \ 半徑 1 紅圓 r .25 > and \ 半徑 .25 圓洞, 變紅圈 .75 寬 r 1 8 / mod .1 > and \ 8 紅圈 .025 寬 r .25 > r .375 < and or \ 另 紅圈 .125 寬 : a a t 360 mod 度 + ; \ 角度每秒偏轉 1 a 360 度 9 / mod 6 度 < \ 9 放射線, 6 度寬 r .25 > and \ 綠方圓洞 r .25 > r .375 < and or \ 另 綠圈 .125 寬 r .375 < \ 半徑 .375 藍圓 r 1 < \ 半徑 1 圓洞內 透視度 1 r t 4 * cos 2 / 2 + pow * \ 透視中心 0 外圍 1
wind tunnel
陳爽
'25 Mar 07
: br 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 pi 6 / + dup push \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop pop swap push > or pop ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1732 mod - swap x .10 mod - br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .0866 - .1732 mod .0866 + - swap x .05 - .10 mod .05 + - br ; : same 0.06 pi 3 / 6 ; : segments 2dup pi -0.166 * < and push 2dup pi 0.5 * > and push dup pi -0.166 * > swap pi 0.5 * < and and pop pop ; : cubes same 0.05 0.0666 b1 segments same 0.1 0.15 b2 segments push push push rot pop or rot pop or rot pop or ; cubes
Cubes from US flag
Ting
'25 Mar 07
x t 5 mod * 2 * pi * sin 2 / x t 10 mod * 2 * pi * sin 4 / dup y 0.35 - > swap y 0.345 - < and x t 3 mod * 8 * pi * sin 8 / dup y 0.55 - > swap y 0.545 - < and
sine wave
呂明貴
'25 Mar 07
\ {{ Add a wave by DarkstarAG : x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + ; \ }} Add a wave ( Visualization of f[x,y] ) ( Multiple viewport ) ( Animation ) : n 1 + 2 / ; : ^2 dup * ; : ^3 dup dup * * ; : c+ ( a b c d e f - a+d b+e c+f ) rot >r z+ rot r> + -rot ; : c*k ( a b c k - ka kb kc ) 0 over >r z* rot r> * -rot ; : clip 0 max 1 min ; : xy x y -.5 -.5 z+ ; : item ( x - d x' ) dup 256 mod 256 / swap 256 / floor ; : color ( x - r g b ) 16777216 * floor item item item drop ; : pack-color ( r g b - .f ) 256 * + 256 * + 256 * 16777618 / ; : fix8 ( x - x' ) 256 * floor 256 / ; : banana ( x y - ) over ^2 - ^2 100 * 1 swap - ^2 + ; : rainbow ( .f - r g b ) dup 3 * 1 + sin swap dup 3 * 0 + sin swap dup 3 * 5 + sin swap drop ; : cells ( x y - f ) sin swap sin * 1 + 2 / ; : astroida ( x y R - f ) 0.6667 ** swap .6667 ** - swap .6667 ** - negate ; : heart ( x y - f ) 2dup ^2 swap ^3 + 1 - ^3 -rot ^3 swap ^2 * - ; ( astroida ) xy .25 -.25 z+ 25 0 z* 1 astroida t 2 * sin .4 * + clip rainbow x .5 < y .5 > * c*k ( cells ) xy 25 0 z* cells rainbow x .5 < y .5 < * c*k c+ ( banana ) xy -.25 -.1 z+ 4 0 z* banana t sin + clip rainbow x .5 > y .5 > * c*k c+ ( cardioida heart ? ) xy -.22 .25 z+ 10 0 z* heart 3 ** abs t sin + rainbow x .5 > y .5 < * c*k c+
Surfaces MultiViews waves
DarkstarAG
'25 Mar 07
\ {{ Add a wave by DarkstarAG : x x t sin 3 / + ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + ; \ }} Add a wave : ^2 dup * ; : ^3 dup ^2 * ; : rainbow ( .f - r g b ) dup 3 * 1 + sin swap dup 3 * 0 + sin swap dup 3 * 5 + sin swap drop ; : ' .5 - ^2 100 * ; x ' y ' x ' 1 y - sqrt t 4 / 6.6 + cos 13 * sin * ^3 ' negate z* + t cos 1 + 3 / * -1.1 pow rainbow
Alien Biomorph 2 waves
DarkstarAG
'25 Mar 07
\ {{ Add a wave by DarkstarAG : x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + ; \ }} Add a wave : dist y - dup * swap x - dup * + sqrt ; : white dup dup ; 0.5 0.5 dist t sin 2 + 35 * * t 10 * t sin 10 * + 2 pi * mod + x 0.5 - y 0.5 - atan2 + sin white
Breathing Spiral waves
DarkstarAG
'25 Mar 07
\ {{ Add a wave by DarkstarAG : x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + ; \ }} Add a wave : n 5 ; \ number of spikes : alpha pi 10 / ; \ half of spike angle : x0 0.5 ; : y0 0.5 ; : r0 0.24 ; : theta x x0 - y y0 - atan2 pi + ; : r x x0 - dup * y y0 - dup * + sqrt ; : beta theta pi n / 2 * mod pi n / - abs ; : b r0 alpha sin * alpha cos beta sin * beta cos alpha sin * + / ; : ^2 dup * ; : circle ( x y r - ) >r y - ^2 >r x - ^2 r> + sqrt r> < ; 0.5 0.5 0.375 circle 0.5 0.5 0.37 circle - 0.5 0.5 0.362 circle 0.5 0.5 0.331 circle - or 0.5 0.5 0.324 circle 0.5 0.5 0.32 circle - or 0.5 0.5 0.315 circle + b r > 0
Vietnam Gold Star waves
DarkstarAG
'25 Mar 07
\ {{ Add a wave by DarkstarAG : x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + ; \ }} Add a wave \ 中秋月朦朧 : x x .5 - ; : y y .5 - ; \ 座標原點移到中心 : r x x * y y * + sqrt ; \ x,y 點對應的 r 1 r - \ 中心亮 (值為 1) 外圍暗 (值為 0 及 負) 1.4 * \ 設定大小 (2 為全圓) 15 t 3 * sin 3 * - \ 動態值 (變化從 10 到 20) pow dup .8 * \ 紅+綠=黃 月 .3 \ 藍天
moon festival waves
DarkstarAG
'25 Mar 07
\ {{ Add a wave by DarkstarAG : x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + .1 + ; \ }} Add a wave : n 6 ; \ number of spikes : alpha pi 3 / ; \ half of spike angle : x0 0.5 ; : y0 0.5 ; : r0 0.3 ; : theta x x0 - y y0 - atan2 pi 6 / + ; : r x x0 - dup * y y0 - dup * + sqrt ; : beta theta pi n / 2 * mod pi n / - abs ; : b r0 alpha sin * alpha cos beta sin * beta cos alpha sin * + / ; b r > push r@ theta pi -0.166 * < and r@ theta pi 0.5 * > and pop theta pi 0.5 * < and theta pi -0.166 * > and
Cube waves
DarkstarAG
'25 Mar 07
: x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + .1 + ; : br - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop > or ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1 mod - swap x .08 mod br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .05 - .1 mod .05 + - swap x .05 - .08 mod .05 + br ; : same 0.025 pi 10 / 5 ; : stars same 0.05 0.03 b1 .5 x > and .5 y < and same 0.09 0.08 b2 .45 x > and .55 y < and .05 x < and .95 y > and or ; stars y >r x 0.5 > r@ 6 13 / < or over or x 0.5 > r@ 6 13 / < or r@ 13 * 2 mod 1 > and rot or x 0.5 < r@ 6 13 / > and r@ 13 * 2 mod 1 > or r> drop
Flag of USA (Redux)
DarkstarAG
'25 Mar 07
: x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod - 30 * 1 cos * cos 40 / y + .1 + ; : br - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop > or ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1 mod - swap x .08 mod br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .05 - .1 mod .05 + - swap x .05 - .08 mod .05 + br ; : same 0.025 pi 10 / 5 ; : stars same 0.05 0.03 b1 .5 x > and .5 y < and same 0.09 0.08 b2 .45 x > and .55 y < and .05 x < and .95 y > and or ; stars y >r x 0.5 > r@ 6 13 / < or over or x 0.5 > r@ 6 13 / < or r@ 13 * 2 mod 1 > and rot or x 0.5 < r@ 6 13 / > and r@ 13 * 2 mod 1 > or r> drop
Flag of USA (aMIRedux) Redux
Anonymous
'25 Mar 07
: x x ; ( : y x .5 - t cos y .5 * cos 2 / 1 + - * ; ) : y x t 3 / 1.57 4 / mod + 30 * 1 cos * cos 40 / y + .1 + ; : br - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop > or ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1 mod - swap x .08 mod br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .05 - .1 mod .05 + - swap x .05 - .08 mod .05 + br ; : same 0.025 pi 10 / 5 ; : stars same 0.05 0.03 b1 .5 x > and .5 y < and same 0.09 0.08 b2 .45 x > and .55 y < and .05 x < and .95 y > and or ; stars y >r x 0.5 > r@ 6 13 / < or over or x 0.5 > r@ 6 13 / < or r@ 13 * 2 mod 1 > and rot or x 0.5 < r@ 6 13 / > and r@ 13 * 2 mod 1 > or r> drop
Flag of USA (aMIRedux)
DarkstarAG
'25 Mar 07
: n 6 ; \ number of spikes : alpha pi 3 / ; \ half of spike angle : x0 0.5 ; : y0 0.5 ; : r0 0.3 ; : theta x x0 - y y0 - atan2 pi 6 / + ; : r x x0 - dup * y y0 - dup * + sqrt ; : beta theta pi n / 2 * mod pi n / - abs ; : b r0 alpha sin * alpha cos beta sin * beta cos alpha sin * + / ; b r > push r@ theta pi -0.166 * < and r@ theta pi 0.5 * > and pop theta pi 0.5 * < and theta pi -0.166 * > and
Cube from a star
Ting
'25 Mar 07
: br - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 t + \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop > or ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1 mod - swap x .08 mod br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .05 - .1 mod .05 + - swap x .05 - .08 mod .05 + br ; : same 0.025 pi 10 / 5 ; : stars same 0.05 0.03 b1 .5 x > and .5 y < and same 0.09 0.08 b2 .45 x > and .55 y < and .05 x < and .95 y > and or ; stars x 0.5 > y 6 13 / < or over or x 0.5 > y 6 13 / < or y 13 * t + 2 mod 1 > and rot or x 0.5 < y 6 13 / > and y 13 * t + 2 mod 1 > or
Flag of USA - 50 stars Redux
Anonymous
'25 Mar 07
X 8 PI * * SIN Y 8 PI * * SIN / Y / DUP DUP
Chess
Camiel Vanderhoeven
'25 Mar 07
x pi + dup y x x * * / x sqrt y
Untitled
Anonymous
'25 Mar 07
\ 中秋月朦朧 : x x .5 - ; : y y .5 - ; \ 座標原點移到中心 : r x x * y y * + sqrt ; \ x,y 點對應的 r 1 r - \ 中心亮 (值為 1) 外圍暗 (值為 0 及 負) 1.4 * \ 設定大小 (2 為全圓) 15 t 3 * sin 3 * - \ 動態值 (變化從 10 到 20) pow dup .8 * \ 紅+綠=黃 月 .3 \ 藍天
moon festival
陳爽
'25 Mar 07
: n 8 ; \ n 為 立方柱 的 數目 : q 1 n / 2 * mod 1 n / > ; : y' y 1.75 * ; : x' x 2 * ; : 反 x y' + q ; : 斜 x y' - q ; : 菱 反 斜 and ; : 豎 x' q ; 菱 斜 not 豎 and 反 not 豎 not and
Cubes Redux
陳爽
'25 Mar 07
: n 6 ; ( n Columns ) : a 1 n / ; : q a 2 * mod a > ; x y 1.75 * + q x y 1.75 * - q 2dup and -rot x 2 * q push not r@ and swap not pop not and
Cubes Redux
陳爽
'25 Mar 07
: br - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop > or ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1 mod - swap x .08 mod br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .05 - .1 mod .05 + - swap x .05 - .08 mod .05 + br ; : same 0.025 pi 10 / 5 ; : stars same 0.05 0.03 b1 .5 x > and .5 y < and same 0.09 0.08 b2 .45 x > and .55 y < and .05 x < and .95 y > and or ; stars x 0.5 > y 6 13 / < or over or x 0.5 > y 6 13 / < or y 13 * 2 mod 1 > and rot or x 0.5 < y 6 13 / > and y 13 * 2 mod 1 > or
Flag of USA - 50 stars
Ting
'25 Mar 07
: br - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos r@ sin * over sin pop cos * + push sin * pop / pop > or ; : b1 \ flag r0 alpha n x0 y0 -- flag' y .1 mod - swap x .1 mod br ; : b2 \ flag r0 alpha n x0 y0 -- flag' y .05 - .1 mod .05 + - swap x .05 - .1 mod .05 + br ; : same 0.03 pi 10 / 5 ; : stars same 0.05 0.03 b1 .5 x > and .5 y < and same 0.1 0.08 b2 .45 x > and .55 y < and .05 x < and .95 y > and or ; stars x 0.5 > y 6 13 / < or over or x 0.5 > y 6 13 / < or y 13 * 2 mod 1 > and rot or x 0.5 < y 6 13 / > and y 13 * 2 mod 1 > or
Flag of USA
BradN w/ much help from Ting
'25 Mar 07
x y 1.73 * + 16 * 8 mod 4 > x y 1.73 * - 16 * 8 mod 4 > 2dup and -rot \ red x 32 * 8 mod 4 > push not r@ and swap not pop not and x 16 *
Cubes
Ting
'25 Mar 07
: coloring t + dup 2 mod 1 < swap dup 4 mod 2 < swap 8 mod 4 < ; : z^2 2dup z* ; : len dup * swap dup * + ; : layer push push push z^2 pop pop 2dup push push z+ 2dup len 4 < pop pop rot pop + ; 0 0 y 0.8 - 2.5 * x 0.5 - 2.5 * 0 layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer layer push drop drop drop drop pop coloring
Mandelbrot Plot Redux Redux
Ting
'25 Mar 07
: c ( -- x y ) 0.3 y - x 0.5 - ; : r ( -- r ) c 1.5 ** swap 2.3 ** + sqrt 1 swap - ; : a c sqrt swap atan2 pi / ; r t 3 / sin a * r * a 7 * * * sin 2 ** r t 5 / sin a * r * r 9 * * * sin 2 ** r t 7 / sin a * r 11 * * * sin 2 **
mother of color
fnord
'25 Mar 07
: b \ r0 alpha n x0 y0 -- flag y - swap x - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 pi 32 / + \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos pop dup push sin * over sin pop cos * + push sin * pop / pop > ; : star1 0.12 pi 32 / 24 0.5 0.5 b ; : circle x 0.5 - dup * y 0.5 - dup * + sqrt dup push 0.12 < pop 0.15 > or ; circle star1 not and y 0.33 > over and swap y 0.33 > y 0.66 < and
Flag of India Redux
Ting
'25 Mar 07
: b \ r0 alpha n x0 y0 -- flag y - swap x - 2dup dup * swap dup * + sqrt push \ sqrt((x0-x)**2+(y0-y)**2) swap atan2 pi 32 / + \ theta over pi swap / 2 * mod pi rot / - abs push \ beta dup cos pop dup push sin * over sin pop cos * + push sin * pop / pop > ; : star1 0.12 pi 32 / 24 0.5 0.5 b ; : circle x 0.5 - dup * y 0.5 - dup * + sqrt dup push 0.12 < pop 0.15 > or ; circle star1 not and y 0.33 > over and y 0.66 < rot and y 0.33 > y 0.66 < and
Flag of India
Ting
'25 Mar 07
Next