Haiku Gallery
: show t 9 mod floor < * ; : p1 x y + 1 > x y - 0 < * 0 show ; \ p1 \ 未塗綠 : p2 x y + 1 < x y - 0 < * 1 show ; \ p2 \ 未塗黃 : p3 x y - 0 > x y + 1.5 > * 2 show ; \ p3 \ 未塗藍 : p4 x y - 0 > x y + 1.5 < x y - .5 < x y + 1 > * * * 3 show ; \ p4 \ 未塗紅 : p5 y .25 > x y - 0 > x y + 1 < * * 4 show ; \ p5 \ 未塗青 : p6 y .25 < x y - 0 > x y - .5 < * * 5 show ; \ p6 \ 未塗紫 : p7 x y - .5 > 6 show ; \ p7 \ 未塗橘 \ R G B \ 0 p1 0 \ p1 塗綠 \ p2 p2 0 \ p2 塗黃 \ 0 0 p3 \ p3 塗藍 \ p4 0 0 \ p4 塗紅 \ 0 p5 p5 \ p5 塗青 \ p6 0 p6 \ p6 塗紫 \ p7 p7 2 / 0 \ p7 塗橘 : 七巧板 \ 綠 黃 藍 紅 青 紫 橘 p2 p4 p6 p7 + + + \ R p1 p2 p5 p7 2 / + + + \ G p3 p5 p6 + + \ B ; 七巧板
七巧板 Redux
陳爽
'22 Jun 15
: x x 2 * ; : x x .5 - ; \ tangram_20 七巧板 20220612 陳爽 \ 改最後一列 可執行 例1 例2 例3 例4 例5 例6 例7 例8 或 例9 \ 例1 彩板拼成 方形 \ 例2 彩板散開 各自轉動 \ 例3 彩板拼成 貓形 \ 例4 彩板翻轉 拼成 方形 與 貓型 \ 例5 彩板拼成 鵝形 \ 例6 彩板翻轉 拼成 貓型 與 鵝形 \ 例7 彩板拼成 船形 \ 例8 彩板翻轉 拼成 鵝形 與 船型 \ 例9 船行反覆前進後退 \ 指定點 X,Y 至任意點 x,y 之距離 r : r ( X Y -- r ) y swap - 2 ** x rot - 2 ** + sqrt ; \ 兩倍圓周率 : 2pi pi pi + ; \ 以 X,Y 為原點,座標轉軸 A 角度 ( 0 右 .25 上 .5 左 .75 下 ) 然後產生任意點 p" 的位置 x",y" : 座標轉換 ( X Y A -- x" y" ) >r 2dup r .01 > -rot ( 洞 X Y ) x rot - y rot - ( 洞 x' y' ) over 2 ** over 2 ** + sqrt ( 洞 x' y' r ) 1.04 * -rot ( 洞 r' x' y' ) swap atan2 2pi / r> - 1 mod ( 洞 r' a ) 2pi * 2dup cos * -rot ( 洞 x" r' a' ) sin * ( 洞 x" y" ) ; \ 從某值到另值隨時間週期取對應中間值 : 中間值 ( x0 x1 -- x ) over - t 3 / sin 2 / .5 + * + ; \ 從某位置方向到另位置方向隨時間週期取對應中間位置方向 : 中間位置方向 ( X0 Y0 A0 X1 Y1 A1 -- X Y A ) >r rot r> ( X0 Y0 X1 Y1 A0 A1 ) 中間值 >r ( X0 Y0 X1 Y1 ) >r swap r> ( X0 X1 Y0 Y1 ) 中間值 >r ( X0 X1 ) 中間值 r> r> ( X Y A ) ; : 網格 x .1 mod .005 > y .1 mod .005 > * ; \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ : 綠 ( R G B X Y A -- R G' B ) 座標轉換 ( R G B 洞 x" y" ) 2dup + -.125 > -rot ( R G B 洞 x"+y">-.25 x" y" ) dup >r - .125 < ( R G B 洞 x"+y">-.25 x"-y"<.25 ) r> .125 < ( R G B 洞 x"+y"<-.25 x"-y"<.25 y"<.25 ) * * * rot + swap ( R G' B ) ; : 黃 ( R G B X Y A -- R' G' B ) 座標轉換 ( R G B 洞 x" y" ) 2dup - .125 < -rot ( R G B 洞 x"-y"<.25 x" y" ) over >r + .125 < r> ( R G B 洞 x"-y"<.25 x"+y"<.25 x" ) -.125 > ( R G B 洞 x"-y"<.25 x"+y"<.25 x">-.25 ) * * * >r rot r@ + rot r> + rot ( R' G' B ) ; : 藍 ( R G B X Y A -- R G B' ) 座標轉換 ( R G B 洞 x" y" ) 2dup - -.062 > -rot ( R G B 洞 x"-y">-.125 x" y" ) over >r + -.062 > r> ( R G B 洞 x"-y">0 y"<.25 x" ) .062 < ( R G B 洞 x"-y">0 y"<.25 x">-.25 ) * * * + ( R G B' ) ; : 紅 ( R G B X Y A -- R' G B ) 座標轉換 ( R G B 洞 x" y" ) 2dup - -rot + ( R G B 洞 x"-y" x"+y" ) dup -.125 > swap ( R G B 洞 x"-y" x"+y">-.25 x"+y" ) .125 < rot ( R G B 洞 x"+y">-.25 x"+y"<.25 x"-y" ) dup .125 < swap ( R G B 洞 x"+y">-.25 x"+y"<.25 x"-y"<.25 x"-y" ) -.125 > ( R G B 洞 x"+y">-.25 x"+y"<.25 x"-y"<.25 x"-y">-.25 ) * * * * >r rot r> + -rot ( R' G B ) ; : 青 ( R G B X Y A -- R G' B' ) 座標轉換 ( R G B 洞 x" y" ) 2dup + .0625 < -rot ( R G B 洞 x"+y"<.125 x" y" ) dup >r - -.0625 > ( R G B 洞 x"+y">-.25 x"-y">-.125 ) r> -.0625 > ( R G B 洞 x"+y"<-.25 x"-y"<-.125 y">-.125 ) * * * >r swap r@ + swap r> + ( R G' B' ) ; : 紫 ( R G B X Y A -- R' G B' ) 座標轉換 ( R G B 洞 x" y" ) swap over - ( R G B 洞 y" x"-y" ) dup -.125 > swap ( R G B 洞 x"-y">-.25 x"-y" ) .125 < rot ( R G B 洞 x"-y">-.25 x"-y"<.25 y" ) dup .0625 < swap ( R G B 洞 x"-y">-.25 x"-y"<.25 y" y"<.125 y" ) -.0625 > ( R G B 洞 x"-y">-.25 x"-y"<.25 y" y"<.125 y">-.125 ) * * * * >r rot r@ + -rot r> + ( R' G B' ) ; : 桔 ( R G B X Y A -- R' G' B ) 座標轉換 ( R G B 洞 x" y" ) 2dup - 0 > rot ( R G B 洞 x"-y">0 x" y" ) .125 < rot ( R G B 洞 x"-y">0 y"<.25 x" ) -.125 > ( R G B 洞 x"-y">0 y"<.25 x">-.25 ) * * * >r rot r@ + rot r> 2 / + rot ( R' G' B ) ; \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 七彩板組圖範例 : 例1 \ 彩板拼成 方形 0 0 0 \ 開始要先 全黑 .500 .625 .000 綠 .375 .500 .000 黃 .687 .625 .000 藍 .625 .500 .000 紅 .500 .437 .000 青 .437 .312 .000 紫 .625 .375 .000 桔 網格 ; : 例2 \ 彩板散開 各自每 10 秒轉 1 圈 0 0 0 \ 開始要先 全黑 .375 .750 0 1 中間值 綠 .250 .500 0 1 中間值 黃 .812 .750 0 1 中間值 藍 .656 .593 0 1 中間值 紅 .500 .485 0 1 中間值 青 .437 .184 0 1 中間值 紫 .750 .375 0 1 中間值 桔 網格 ; : 例3 \ 彩板拼成 貓形 0 0 0 \ 開始要先 全黑 .561 .145 .125 綠 \ 腿 .521 .400 .000 黃 \ 身 .400 .456 .625 桔 \ 胸 .290 .640 .000 紅 \ 頭 .355 .765 .000 藍 \ 右耳 .230 .765 .750 青 \ 左耳 .822 .118 .000 紫 \ 尾 網格 ; : 例4 \ 彩板 隨時間週期 翻轉移動 拼成 方形 與 貓型 0 0 0 \ 開始要先 全黑 \ 前 3 值 彩板 起始 位置方向 後 3 值 終止 位置方向 .500 .437 .000 .230 .765 .750 中間位置方向 青 \ 左耳 .687 .625 .000 .355 .765 .000 中間位置方向 藍 \ 右耳 .625 .500 .000 .290 .640 .000 中間位置方向 紅 \ 頭 .625 .375 .000 .400 .456 .625 中間位置方向 桔 \ 胸 .375 .500 .000 .521 .400 .000 中間位置方向 黃 \ 身 .500 .625 .000 .561 .145 .125 中間位置方向 綠 \ 腿 .437 .312 .000 .822 .118 .000 中間位置方向 紫 \ 尾 網格 ; : 例5 \ 彩板拼成 鵝形 0 0 0 \ 開始要先 全黑 .511 .185 .875 綠 \ 翅 .660 .330 .750 黃 \ 尾 .423 .275 .625 桔 \ 身 .371 .520 .000 紅 \ 脖 .324 .755 .375 藍 \ 嘴 .310 .399 .750 青 \ 胸 .432 .706 .250 紫 \ 頭 網格 ; : 例6 \ 彩板 隨時間週期 翻轉移動 拼成 貓型 與 鵝形 0 0 0 \ 開始要先 全黑 \ 前 3 值 彩板 起始 位置方向 後 3 值 終止 位置方向 .230 .765 .750 .310 .399 .750 中間位置方向 青 \ 胸 .355 .765 .000 .324 .755 .375 中間位置方向 藍 \ 嘴 .290 .640 .000 .371 .520 .000 中間位置方向 紅 \ 脖 .400 .456 .625 .423 .275 .625 中間位置方向 桔 \ 身 .521 .400 .000 .660 .330 .750 中間位置方向 黃 \ 尾 .561 .145 .125 .511 .185 .875 中間位置方向 綠 \ 翅 .822 .118 .000 .432 .706 .250 中間位置方向 紫 \ 頭 網格 ; : 例7 \ 彩板拼成 船形 0 0 0 \ 開始要先 全黑 .426 .621 .000 黃 \ 上帆 .550 .500 .500 綠 \ 下帆 .801 .373 .875 桔 \ 船頭 .535 .288 .125 紅 \ 中艙 .668 .250 .125 藍 \ 前艙 .404 .329 .875 青 \ 後艙 .266 .289 .375 紫 \ 船尾 網格 ; : 例8 \ 彩板 隨時間週期 翻轉移動 拼成 鵝型 與 船形 0 0 0 \ 開始要先 全黑 \ 前 3 值 彩板 起始 位置方向 後 3 值 終止 位置方向 .310 .399 .750 .404 .329 .875 中間位置方向 青 \ 胸 .324 .755 .375 .668 .250 .125 中間位置方向 藍 \ 嘴 .371 .520 .000 .535 .288 .125 中間位置方向 紅 \ 脖 .423 .275 .625 .801 .373 .875 中間位置方向 桔 \ 身 .660 .330 .750 .426 .621 .000 中間位置方向 黃 \ 尾 .511 .185 .875 .550 .500 .500 中間位置方向 綠 \ 翅 .432 .706 .250 .266 .289 .375 中間位置方向 紫 \ 頭 網格 ; : 例9 \ 船行反覆前進後退 0 0 0 \ 開始要先 全黑 .426 .5 - .426 .5 + 中間值 .621 .000 黃 \ 上帆 .550 .5 - .550 .5 + 中間值 .500 .500 綠 \ 下帆 .801 .5 - .801 .5 + 中間值 .373 .875 桔 \ 船頭 .535 .5 - .535 .5 + 中間值 .288 .125 紅 \ 中艙 .668 .5 - .668 .5 + 中間值 .250 .125 藍 \ 前艙 .404 .5 - .404 .5 + 中間值 .329 .875 青 \ 後艙 .266 .5 - .266 .5 + 中間值 .289 .375 紫 \ 船尾 網格 ; \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 例1 彩板拼成 方形 \ 例2 彩板散開 各自轉動 \ 例3 彩板拼成 貓形 \ 例4 彩板翻轉 拼成 方形 與 貓型 \ 例5 彩板拼成 鵝形 \ 例6 彩板翻轉 拼成 貓型 與 鵝形 \ 例7 彩板拼成 船形 \ 例8 彩板翻轉 拼成 鵝形 與 船型 \ 例9 船行反覆前進後退 \ 改下列 可選擇執行 例1 例2 例3 例4 例5 例6 例7 或 例8 例9
七巧板 Redux20
陳爽
'22 Jun 11
: time t y 10 * floor 4 / + ; : l dup y > swap y 0.09 + < * x 0.5 - 2.6 * time sin - 5 * 2 pow 1.2 swap - dup 0 > * * time pi 2 / + sin 1.2 + 2.5 / * ; 0.1 l 0.2 l + 0.3 l + 0.4 l + 0.5 l + 0.6 l + 0.7 l + 0.8 l + 0.9 l + 1.0 l + dup dup
Twisted Tower
Manwe
'22 May 16
: y0 y 1.6 * .45 - ; : d dup ; : c rot d >r ; : l c c c >r swap >r over * over d r> * swap r> * 4 + d * swap d * + over d * + 7 - swap 1 + min + r> r> r> ; 0 x 1.7 * .85 - d d * y0 d * + 4 + sqrt d d >r >r / y0 r> / -2 t 6.2 + 9 / sin 2 / + r> / l l l l l l l l l l l l l l l l drop drop drop 3.7 / d d * over sqrt -rot
Untitled
Anonymous
'22 Mar 01
: sq dup * ; : norm * sin 1 + 2 / ; : tt t 10 mod ; : xc tt 10 / ; : в 0 drop ; : вечерним x xc 0.25 + 0.75 > 1 * xc - abs 0.25 + ; : вьюнком - sq ; : я y 0.5 - sq ; : плен + ; : захвачен… sqrt t 60 mod sin * ; : недвижно dup tt 10 * norm ; : стою over 70 t 50 mod + norm ; : забытьи. rot 80 norm ;
Untitled
Anonymous
'22 Feb 19
x 50 * ceil tan y max x over / tan y x * rot rot / tan 2dup / tan swap 0.4 * swap .4 * + swap over + 2dup + .3 * rot rot
Stadium View
Greg Schmidt
'22 Feb 12
1 2 3 4 z+
Untitled
Anonymous
'21 Dec 19
x 0.0000000001 t * / y mod \ x 0.0000000001 t * / 1 mod \ x 0.0000000001 t * / 1 mod \ (x / .0001t ) mod 1
rune combinator, broken Redux
Anonymous
'21 Dec 19
x 23 * sin y max x over / sin y rot / sin 2dup / sin swap 0.6 * swap .2 * swap + swap over + 2dup + .4 * rot
4spire sunset
BradN
'21 Dec 11
x 0.0000000001 t * / y mod \ x 0.0000000001 t * / 0.5 mod \ x 0.0000000001 t * / 0.6 mod \ (x / .0001t ) mod 0.5
rune combinator, broken
public domain
'21 Nov 22
x 0.0000000001 t * / 0.5 mod 1.25 * dup dup 0.85 * 1 1 * *
pageflip toy
public domain
'21 Nov 22
x y + 2 / y x 3.14 * t + sin dup *
five seven five
jared
'21 Nov 20
x y + 2 / y x 3.14 * sin dup * t +
Untitled
Anonymous
'21 Nov 19
: x x 7 * sin ; : y y 7 * sin ; x x * y - 3 * sin y y * x - 7 * sin 2dup z* x x * y - 5 * cos
Cyclopizoid
Anonymous
'21 Oct 20
: range 1.5 ; : radius 5.2 ; : sharpness 5 t 5.1 / sin + ; : disk y - dup * swap x - dup * + sqrt .1 ** -1 * 1 + radius * 0 max 1 min sharpness pow ; : move t * + range mod range 2 / - abs range 4 / - .5 + ; .1 .11 move .4 -.21 move disk 1.2 .13 move -.5 .17 move disk -.3 .16 move .6 -.27 move disk -.7 .19 move -.8 .23 move disk + + + 1 t 3 / sin .5 - 0 max 3 * + \ glass min dup -1 * 1 + 18 ** 3 / swap .963 - abs -1 * 1 + 20 ** + dup 3 ** over .1 ** -rot \ colours
Metaballs
Manwe
'21 Sep 24
\ try with sound! : web push push x 0.5 + y 0.3 + * pop * sin 0 max x 0.3 + y 0.5 + * pop * sin 0 max + ; \ variables : a! 0 ! ; : a 0 @ ; : b! 0 ! ; : b 0 @ ; \ t seems to work better than dt t 31 mod a! t 23 mod b! a b web 17 17 web * x + b a web 19 19 web * y x * + a a web 07 07 web * y +
rainbow ripples (streak Redux)
~JRF
'21 Sep 11
: iii x y z* Sin ; x 5 * x y - iii exp y iii
Untitled
Brad Nelson himself
'21 Aug 10
( Use mouse to draw ) : f 15 * floor ; : fx x f ; : fy y f ; : fmx mx f ; : fmy my f ; : in mx 0 > mx 1 < my 0 > my 1 < * * * ; : mmf fmy 15 * fmx + 16 / floor ; : mmb fmy 15 * fmx + 16 mod ; 15 @ 16 mod fmx <> 15 @ 16 / floor 16 mod fmy <> or 0 button * in * if mmf @ 2 mmb ** / 1 over floor 2 mod 2 * - + 2 mmb ** * mmf ! then 0 button in * dup fmy 16 * fmx + * swap not 65535 * + 15 ! fy 15 * fx + 16 / floor @ 2 fy 15 * fx + 16 mod ** / floor 2 mod dup dup
Pixel Editor Redux
Anonymous
'21 Jul 25
x 1000 / 5 + t .2 * * sin y sin - y .3 * - x 1000 / 91 + t .2 * * sin y sin - y - x 1000 / 7 + t .2 * * sin y sin - y .7 * -
Spree
Anonymous
'21 May 25
.1 .5 y x cos x sin * + t + x 1.5 + mod -
Matrix? Redux
Nauz_Rem
'21 Apr 03
: xor + abs 2 mod ; x t sin y t cos xor
colors
Nauz_Rem
'21 Mar 31
t 1 mod x - abs 0.01 < t 1 mod 1 x - - abs 0.01 < + t 1 mod y - abs 0.01 < t 1 mod 1 y - - abs 0.01 < + t 1 mod
bars
Pig
'21 Mar 06
( Welcome to www.thesands.ru/forth-demotool/ ) : f 2dup * 2 * .17 + -rot .4 ** sin swap .7 ** - .13 + ; y x .5 - f f .15 rot / .11 rot / log y * + abs dup 7 / over log rot rot .2 * rot .3 * rot .3 +
Tweaked Ice
Anonymous
'21 Mar 04
: x x .3 + ; x sin y / 0.1 * dup .6 * x sqrt
solar orb
Anonymous
'21 Mar 02
x 23 * sin y max x over / sin y rot / sin 2dup / sin swap 0.6 * swap
4spire darker
BradN
'21 Feb 27
x y + 1.23 + x * y * y sin 2dup * over < x -
Untitled
Anonymous
'21 Jan 14
10 lines (10 sloc) 1.29 KB \ Фигура Лиссажу : xx 2 ( частота x ) * sin 0.45 * 0.5 + x - dup * ; \ квадрат смещения по x между текущей точкой и той, которую надо отрисовать : yy 3.5 ( частота y ) * cos 0.45 * 0.5 + y - dup * ; \ квадрат смещения по y между текущей точкой и той, которую надо отрисовать : zz dup xx swap yy + ; \ квадрат расстояния между текущей точкой и той, которую надо отрисовать : aa zz 0.0002 ( квадрат радиуса ) < ; \ 1, если текущая точка попадает в окрестность заданной : bb swap 1 + dup 0.03 ( сдвиг t между кружочками ) * negate t + aa over 0.95 swap pow * rot max ; \ сдвигаем время и добавляем еще одну заданную точку -1 0 \ начальный сдвиг и цвет bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb \ Рисуем много кружочков со сдвигом по времени swap drop \ выкидываем оставшееся время из стека dup dup \ дублируем значение для белого цвета
Untitled
Anonymous
'21 Jan 14
Skip to content Why GitHub? Team Enterprise Explore Marketplace Pricing Sign in Sign up igormulyaev / forth-haiku 1 0 0 Code Issues Pull requests Actions Projects Security Insights forth-haiku/Happy New Year/Happy New Year.fh 166 lines (140 sloc) 5.24 KB \ Для работы нужно отключение проверки на длину программы в haiku.js \ "С новым годом" : w 1 13 / ; \ char width : w2 w 2 / ; \ char width / 2 : w_inner w 3 / ; \ inner width : w_outer w2 w_inner - ; \ line width : h w 1.5 * ; \ char height : h2 h 2 / ; \ char height / 2 : factor_y w h / ; \ ellipse factor = width / height : xor 2dup not and -rot swap not and or ; : sq dup * ; \ square : norm_xy negate y + swap negate x + swap ; \ (x1 y1 -> x-x1 y-y1) : push_xy push push ; : pop_xy pop pop ; : copy_xy pop_xy 2dup push_xy ; \ copy two values from return stack : copy_xy_norm pop_xy norm_xy 2dup push_xy ; \ norm and copy two values from return stack : center z+ 0.5 0 z* ; \ (x1 y1 x2 y2 -> x_center y_center) : radius negate swap negate swap z+ sq swap sq + 4 / sqrt ; \ (x1 y1 x2 y2 -> radius) : phase negate swap negate swap z+ atan2 ; \ (x1 y1 x2 y2 -> phase) : ellipse rot * sq swap sq + >= ; \ (r^2 factor_y x_center_norm y_center_norm) -> 0 | 1 : rect abs h2 < swap abs w2 < and ; \ (x_center_norm y_center_norm) -> 0 | 1 \ center of char -> return stack: x1 y1 push_xy : char_c w2 sq factor_y copy_xy_norm ellipse \ outer ellipse w_inner sq factor_y copy_xy ellipse not and \ inner ellipse pop_xy abs w_inner > swap 0 < or and \ right hole ; : char_h copy_xy_norm rect \ whole char rect pop_xy abs w_outer < swap abs w_inner >= or and \ top and bottom cutouts ; : char_o w2 sq factor_y copy_xy_norm ellipse \ outer ellipse w_inner sq factor_y pop_xy ellipse not and \ inner ellipse ; : char_b w w_outer - sq w h / 3 * copy_xy_norm w2 h2 2 / negate z+ ellipse \ top ellipse w w_outer 2 * - sq w h / 4 * copy_xy w2 h2 2 / negate z+ ellipse not and \ top ellipse hole w sq w h / 3.5 * copy_xy w2 h2 2 / z+ ellipse or \ bottom ellipse w w_outer - sq w h / 5 * copy_xy w2 h2 2 / z+ ellipse not and \ bottom ellipse hole copy_xy drop w_inner negate < or \ left line pop_xy rect and \ whole rect ; : char_y w 0.67 * sq w h / 2.5 * copy_xy_norm w2 h2 2 / z+ ellipse \ bottom ellipse w 0.67 * w_outer - sq w h / 3 * copy_xy w2 h2 2 / z+ ellipse not and \ bottom ellipse hole copy_xy drop abs w_inner > or \ left and right lines pop_xy rect and \ whole rect ; : char_m copy_xy_norm factor_y * + 0 > \ \line copy_xy factor_y * - 0 < and \ /line copy_xy factor_y * + w_outer > \ \cutout copy_xy factor_y * - w_outer negate < and not and \ /cutout copy_xy drop abs w_inner > or \ left and right lines pop_xy rect and \ whole rect ; : char_g copy_xy_norm rect \ whole rect pop_xy h2 w_outer - < swap w_inner negate > and not and ; : char_d copy_xy_norm swap 2 * swap factor_y * + w2 < \ \line copy_xy swap 2 * swap factor_y * - w2 negate > and \ /line w_outer sq factor_y copy_xy w_outer + ellipse not and \ central hole copy_xy swap drop h2 negate w_inner + < or \ bottom block copy_xy h2 negate w_outer + < swap abs w_inner < and not and \ bottom cutoff pop_xy rect and \ whole rect ; : pos_c_a w 2.5 * w 7.5 * h2 + ; : pos_h_a w 4.5 * w 7.5 * h2 + ; : pos_o1_a w 6 * w 7.5 * h2 + ; : pos_b_a w 7.5 * w 7.5 * h2 + ; : pos_y_a w 9 * w 7.5 * h2 + ; : pos_m1_a w 10.5 * w 7.5 * h2 + ; : pos_g_a w 3.5 * w 4 * h2 + ; : pos_o2_a w 5 * w 4 * h2 + ; : pos_d_a w 6.5 * w 4 * h2 + ; : pos_o3_a w 8 * w 4 * h2 + ; : pos_m2_a w 9.5 * w 4 * h2 + ; : pos_c_b w 10.5 * w 7.5 * h2 + ; : pos_h_b w 7 * w 7.5 * h2 + ; : pos_o1_b w 8.5 * w 7.5 * h2 + ; : pos_b_b w 5.5 * w 7.5 * h2 + ; : pos_y_b w 5 * w 4 * h2 + ; : pos_m1_b w 6.5 * w 4 * h2 + ; : pos_g_b w 2.5 * w 7.5 * h2 + ; : pos_o2_b w 4 * w 7.5 * h2 + ; : pos_d_b w 3.5 * w 4 * h2 + ; : c_c pos_c_a pos_c_b center ; : r_c pos_c_a pos_c_b radius ; : p_c pos_c_a pos_c_b phase ; : c_h pos_h_a pos_h_b center ; : r_h pos_h_a pos_h_b radius ; : p_h pos_h_a pos_h_b phase ; : c_o1 pos_o1_a pos_o1_b center ; : r_o1 pos_o1_a pos_o1_b radius ; : p_o1 pos_o1_a pos_o1_b phase ; : c_b pos_b_a pos_b_b center ; : r_b pos_b_a pos_b_b radius ; : p_b pos_b_a pos_b_b phase ; : c_y pos_y_a pos_y_b center ; : r_y pos_y_a pos_y_b radius ; : p_y pos_y_a pos_y_b phase ; : c_m1 pos_m1_a pos_m1_b center ; : r_m1 pos_m1_a pos_m1_b radius ; : p_m1 pos_m1_a pos_m1_b phase ; : c_g pos_g_a pos_g_b center ; : r_g pos_g_a pos_g_b radius ; : p_g pos_g_a pos_g_b phase ; : c_o2 pos_o2_a pos_o2_b center ; : r_o2 pos_o2_a pos_o2_b radius ; : p_o2 pos_o2_a pos_o2_b phase ; : c_d pos_d_a pos_d_b center ; : r_d pos_d_a pos_d_b radius ; : p_d pos_d_a pos_d_b phase ; : tt t 3 * t 3 * sin - 0.5 * ; : pos_c c_c tt p_c + dup sin swap cos r_c 0 z* z+ push_xy ; : pos_h c_h tt p_h + dup sin swap cos r_h 0 z* z+ push_xy ; : pos_o1 c_o1 tt p_o1 + dup sin swap cos r_o1 0 z* z+ push_xy ; : pos_b c_b tt p_b + dup sin swap cos r_b 0 z* z+ push_xy ; : pos_y c_y tt p_y + dup sin swap cos r_y 0 z* z+ push_xy ; : pos_m1 c_m1 tt p_m1 + dup sin swap cos r_m1 0 z* z+ push_xy ; : pos_g c_g tt p_g + dup sin swap cos r_g 0 z* z+ push_xy ; : pos_o2 c_o2 tt p_o2 + dup sin swap cos r_o2 0 z* z+ push_xy ; : pos_d c_d tt p_d + dup sin swap cos r_d 0 z* z+ push_xy ; : pos_o3 pos_o3_a push_xy ; : pos_m2 pos_m2_a push_xy ; pos_c char_c pos_h char_h xor pos_o1 char_o xor pos_b char_b xor pos_y char_y xor pos_m1 char_m xor pos_g char_g xor pos_o2 char_o xor pos_d char_d xor pos_o3 char_o xor pos_m2 char_m xor dup dup © 2021 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About
Untitled
Anonymous
'21 Jan 14
\ бегающий по кардиоиде фрактал Мандельброта : xx x .8 - ; : yy y .5 - ; : tt t .4 * ; : a .25 * ; : mx xx 2 a tt cos * 2 tt * cos a - + ; : my yy 2 a tt sin * 2 tt * sin a - + ; : mm 2dup Z* mx my z+ ; mx my mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm dup * swap dup * + 0 > negate 1 + dup dup
Untitled
Anonymous
'21 Jan 14
: ox x ; : x 1 x - ; : x x 2 pow x .05 * - 2 pow ; y 7 pi * * pi - sin 0 max x pi * 2 * sin 0 max + dup 0.8 * over 0.3 * dup 8 * ox .5 - 3 pow y .5 - 3 pow + .12 / 1 swap - 16 * 0 max 1 min *
EForth Yellower
BradN
'21 Jan 04
: ox x ; : x 1 x - ; : x x 2 pow x .05 * - 2 pow ; y 7 pi * * pi - sin 0 max x pi * 2 * sin 0 max + dup 0.7 * over 0.3 * dup 8 * ox .5 - 3 pow y .5 - 3 pow + .12 / 1 swap - 16 * 0 max 1 min *
EForth
BradN
'21 Jan 04
: x x 0.5 - 7 * t + cos ; : y y 0.5 - 55 * t .1 * + sin ; y x 31 * sin x y 9 * cos z* - dup 1.9 * dup .18 *
Enmeshed in Light Redux
Anonymous
'20 Dec 30
: d dup ; : m 1 min ; : c c floor -5 ; : c cos abs ; : j t 41 + 21 * x 8 * floor 8 / + 14 * c 2 / t 4 + 2 / c 4 ** * - ; : a 1 c x 8 * floor 0.5 + 8 / - d * y ; : b - d * + sqrt 50 * 18 ** ; : p c tg 4 + pi / f 1.6 * - 0.2 + ; : v t 4 + pi 2 * / f ; a j 0.5111 b - v d 0.5 < * 4 * m * 1 p c * y 0.5 - d * + 326 * 130 ** m - y 0.5 - p atan2 abs t 10 * c 0.8 * - 16 * m * 0 max a 0.5 c - 0 max d p 16 * < * + p d * y 0.58 b m * v 0.5 >= * + d 0.2
PACMAN Redux Redux Redux Redux
Anonymous
'20 Dec 30
: d dup ; : m 1 min ; : c c floor - ; : c cos abs ; : j t 41 + 21 * x 8 * floor 8 / + 14 * c 2 / t 4 + 2 / c 4 ** * - ; : a 1 c x 8 * floor 0.5 + 8 / - d * y ; : b - d * + sqrt 50 * 18 ** ; : p c t 4 + pi / f 1.6 * - 0.2 + ; : v t 4 + pi 2 * / f ; a j 0.5111 b - v d 0.5 < * 4 * m * 1 p c * y 0.5 - d * + 326 * 130 ** m - y 0.5 - p atan2 abs t 10 * c 0.8 * - 16 * m * 0 max a 0.5 c - 0 max d p 16 * < * + p d * y 0.58 b m * v 0.5 >= * + d 0.2
PACMAN Redux Redux Redux
Anonymous
'20 Dec 30
: d dup ; : m 1 min ; : f d floor - ; : c cos abs ; : j t 41 + 21 * x 8 * floor 8 / + 14 * c 2 / t 4 + 2 / c 4 ** * - ; : a 1 x x 8 * floor 0.5 + 8 / - d * y ; : b - d * + sqrt 50 * 18 ** ; : p x t 4 + pi / f 1.6 * - 0.2 + ; : v t 4 + pi 2 * / f ; a j 0.5111 b - v d 0.5 < * 4 * m * 1 p d * y 0.5 - d * + 326 * 130 ** m - y 0.5 - p atan2 abs t 10 * c 0.8 * - 16 * m * 0 max a 0.5 b - 0 max d p 16 * < * + p d * y 0.58 b m * v 0.5 >= * + d 0.2
PACMAN Redux Redux
Anonymous
'20 Dec 30
: d dup ; : m 1 min ; : f d floor - ; : c cos abs ; : j t 4 + 2 * x 8 * floor 8 / + 4 * c 2 / t 4 + 2 / c 4 ** * - ; : a 1 x x 8 * floor 0.5 + 8 / - d * y ; : b - d * + sqrt 50 * 8 ** ; : p x t 4 + pi / f 1.6 * - 0.2 + ; : v t 4 + pi 2 * / f ; a j 0.5 b - v d 0.5 < * 4 * m * 1 p d * y 0.5 - d * + 326 * 30 ** m - y 0.5 - p atan2 abs t 10 * c 0.8 * - 16 * m * 0 max a 0.5 b - 0 max d p 16 * < * + p d * y 0.58 b m * v 0.5 >= * + d 0.2
PACMAN Redux
Anonymous
'20 Dec 30
: sq dup * ; ( translate origin to the center ) : x x 0.5 - 4 * ; : y y 0.4 - 5 * ; ( animate r ) : r 2 t * sin 1.3 + ; ( x^2 + (y-sqrt(|x|)^2 = r heart equation ) x sq y x abs sqrt - sq + r <= 0.3 0.5
Heart
G0_G4
'20 Nov 30
( color scheme: QuickBasic and MSX2 memories ) 0 5 x .5 - 20 ** y .5 - 20 ** + .05 ** dup -rot / t dup floor - pi * 2 * + sin over 9 * 4 ** ** swap .1 max .1 - * 5 * 1 min .9
Untitled
Anonymous
'20 Nov 13
: x x 0.5 - ; : y y 0.5 - ; y x atan2 x x * y y * + sqrt 10 * + t 10 mod - abs 1 - 1 mod y x atan2 2 * x x * y y * + sqrt 7 * + t 10 mod - abs 1 - 1 mod y x atan2 3 * x x * y y * + sqrt 5 * + t 10 mod - abs 1 - 1 mod over z* x * swap y * x t * sin * t y * cos 2dup z* -rot 2 * -rot 3 * -rot
Star Rose
Anonymous
'20 Oct 24
: x x 0.5 - 7 * t + cos ; : y y 0.5 - 5 * t .1 * + sin ; y x 31 * sin x y 19 * cos z* - dup .9 * dup .8 *
Enmeshed in Light
Anonymous
'20 Oct 24
Next