Haiku Gallery
.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
: y y 5 * ; : x x 1.5 * ; x y - x x * y - y y * x - 2dup 10 * sin max max y * rot x + -rot
Orbitalist
Anonymous
'20 Oct 24
x 11 * sin y 3 * cos + y 13 * sin x 5 * cos + * x 7 * sin y 17 * cos + y 2 * sin x 3 * cos + * x 11 * sin y 11 * cos + y 2 * sin x 7 * cos + * : x x y 7 * sin 0.1 * + ; : y y x 11 * sin 0.15 * + ; : x x 0.5 - 3.1 * ; : y y 0.5 - 3.1 * ; x 2 * x y + y 2 * x x * y y * + 50 pow negate 1 + swap drop swap drop swap drop
Untitled
Anonymous
'20 Sep 30
x 1 1
Untitled Redux
Anonymous
'20 Sep 06
x 0.5 - 1 y - 0.5 - mod dup dup push push x y sin + * pop x t tan - * pop y t tan - *
Alien Shockwave
Anonymous
'20 Sep 03
: julia 2dup z* .194 .6557 z+ ; x y julia julia julia julia julia julia julia
julia-haiku
kliemann
'20 Sep 01
: mandel 2dup z* x y z+ ; 0 0 mandel mandel mandel mandel mandel mandel mandel
mandelbrot haiku
kliemann
'20 Sep 01
: mandel 2dup z* x y z+ ; 0 0 mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel mandel
mandelbrot-set
kliemann
'20 Sep 01
: scale 3 * 1.5 - ; : c -.11 .6557 ; : julia 2dup z* c z+ ; x scale y scale julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia
julia-set Redux
kliemann
'20 Sep 01
: scale 3 * 1.5 - ; : c 0 1 ; : julia 2dup z* c z+ ; x scale y scale julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia julia
julia-set
kliemann
'20 Sep 01
: tr * 2 + floor 3 mod ; : it dup x swap tr swap y swap tr + ; 3 it 9 it * 27 it * 81 it * 243 it *
carpet
kliemann
'20 Aug 31
: sq - dup * ; x .5 sq y .5 sq + 0 .5 sq < x .4 sq 2 * y .7 sq + 0 .1 sq > and x .6 sq 2 * y .7 sq + 0 .1 sq > and y .5 > x .5 sq y .5 sq + 0 .3 sq > or x .5 sq y .5 sq + 0 .25 sq < or and dup
smile
kliemann
'20 Aug 31
3 4 +
Untitled
Anonymous
'20 Aug 22
: x x y 7 * sin 3.1 * + ; : y y x 11 * sin 3.15 * + ; : x x 0.7 - 3.1 * ; : y y 0.5 - 3.1 * ; x 2 * x y + y 2 * x x * y y * + 29 pow negate 1 +
Untitled
Anonymous
'20 Aug 20
: z .7224 * 4 mod 1 - abs 2 - ; : x x 4 * 2 - t z + ; : y y 4 * 1 - t 2 * sin abs - ; : r x dup * y dup * + sqrt ; : m r 1 < * ; : n r 1 >= * ; : m m rot m rot m rot ; : n n rot n rot n rot ; : h rot r> + ; : v >r >r >r h h h ; 1 1 r - sqrt - r / dup x * 2.32740248 * 23 mod swap y * 1.5 * 2342 swap t z 2 * + swap 2 * floor swap 2 * floor + 2 mod 1 swap dup m 0.5 0.1 0.7 n v
Untitled
Anonymous
'20 Aug 20
: x x .9 - ; : y y .203944 - ; : w x 0.3 + y 0.5 + * * sin 1 max swap x 0.5 + y 0.3 + * * sin 0 max + ; 554 23 w 15 17 w * x + 23 31 w 19 19 w * y x * + 10231 54 w 7 7 w * y +
Untitled
Anonymous
'20 Aug 20
: x x .9 - ; : y y .203944 - ; : w x 0.3 + y 0.5 + * * sin 1 max swap x 0.5 + y 0.3 + * * sin 0 max + ; 554 23 w 15 17 w * x + 23 31 w 19 19 w * y x * + 10231 54 w 7 7 w * y +
Untitled
Anonymous
'20 Aug 20
: x x y 7 * sin 0.1 * + ; : y y x 11 * sin 0.15 * + ; : x x 0.5 - 3.1 * ; : y y 0.5 - 3.1 * ; x 2 * x y + y 2 * x x * y y * + 50 pow negate 1 +
stenoforth
BradN
'20 Jul 01
pi 6 / t + dup sin 0 ! cos 1 ! : y y .5 + ; : x x .5 - ; : x' x 1 @ * y 0 @ * + ; : y' y 1 @ * x 0 @ * - ; : x x' ; : y y' ; x .15 - y .75 - < x 0 > * y 1 < *
mytest
陳摩
'20 May 13
pi 6 / t + dup sin 0 ! cos 1 ! : y y .5 + ; : x x .5 - ; : x' x 1 @ * y 0 @ * + ; : y' y 1 @ * x 0 @ * - ; : x x' ; : y y' ; x .15 - y .75 - < x 0 > * y 1 < *
mytest
陳摩
'20 May 13
Next