Haiku Gallery
( math 3-dim vectors ) : ^2 dup * ; : r@ r> dup >r ; : 3dup ( abc - abc abc ) dup >r >r 2dup r> -rot r> ; : 3r ( abc - r ) ^2 swap ^2 + swap ^2 + sqrt ; : nn ( abc - abc/d ) 3dup 3r >r r@ / -rot r@ / -rot r> / ; : dot ( v1:abc v2:def - cos[a] ) >r rot r> * >r ( ab de R:c*f ) rot * -rot * + r> + ; : asin ( x - y ) 1 over ^2 - sqrt / 1 atan2 ; : xy' x y -.5 -.5 z+ ; : r ( xy - r ) ^2 swap ^2 + sqrt ; : normal xy' 2dup r 1 - negate asin pi / ; : light t 3 * sin ^2 t 5 * cos ^2 t sin t cos * ; : asin-test xy' swap pi 0 z* asin < ; : in? xy' r .5 < ; ( asin-test ) normal nn light nn dot in? * dup dup
Moon Light
DarkstarAG
'25 Jun 08
: ^2 dup * ; : xy x y -.5 -.5 z+ ; : r xy ^2 swap ^2 + sqrt ; : xy' xy r 20 * tan 0 z* ; : c ( a b - k:=sin[angle*b+a*t] ) xy' atan2 * swap t * + sin ; 12 13 c 5 9 c 3 17 c
Roulette
DarkstarAG
'25 Jun 08
: x x .5 - 2 dup * * 2 * tan 1 + 2 / ; : y y .5 - 2 dup * * 2 * tan 1 + 2 / ; : q dup * ; : d2 q swap q + ; : acos dup q 1 - negate sqrt swap 1 + atan2 2 * ; : r 0.5 ; : r2 r q ; : tl 1.58 t sin 5 / + ; : ' 0.5 - ; : 's ' tl cos * ; : 'c ' tl sin * ; : x' x 'c y 's - ; : y' y 'c x 's + ; : l2 x ' y ' d2 ; : in? l2 r2 < ; : z r2 l2 - sqrt ; : th y' acos 2 * pi / ; : ph z x' atan2 pi / t 9 / + ; : zydup ( zyx - zyzyx ) >r 2dup r> ; : zydrop ( zyx - x ) >r drop drop r> ; : to-r ( x - x R: x ) dup >r ; : f ( N - k ) to-r to-r th pi * * tan ph pi * r> * tan 2dup z* t sin t sin exp z* atan2 cos 1 + 2 / r> / + ; : tile 0 4 f 8 f 16 f 32 f ( 64 f 128 f ) 2 * ; : txtr tile zydrop ; z in? * 1.5 * ph th txtr over * dup rot
Shperes Field
DarkstarAG
'25 Jun 08
: c x y -.5 -.5 z+ atan2 * swap t * + sin ; 11 7 c 9 5 c 5 11 c
Simple Rays
DarkstarAG
'25 Jun 08
0 x y t sin / * cos tan
Untitled
Anonymous
'25 Jun 08
: q dup * ; : dst q swap q + sqrt ; : acos dup q 1 - negate sqrt swap 1 + atan2 2 * ; : r 0.5 ; : ' 0.5 - ; : l x ' y ' dst ; : in? l r < ; : z r q l q - sqrt ; : th y ' acos 2 * pi / ; : ph z x ' atan2 pi / t 10 / + ; ( : txtr 25 25 z* cos >r cos r> < 0.3 max ; ) : r@ r> dup >r ; : j r> r> dup >r swap >r ; : v * floor 3 mod 1 = ; : l dup dup r@ v swap j v and swap 3 * ; : txtr >r >r 0 3 l l l l l drop + + + + + r> drop r> drop ; ph th txtr z * in? * : rainbow ( .f - r g b ) dup 3 * 1 + sin swap dup 3 * 0 + sin swap dup 3 * 5 + sin swap drop ; t 12 / sin 5 * + rainbow
Sierpinski Globe
DarkstarAG
'25 Jun 08
: q dup * ; : dst q swap q + sqrt ; : acos dup q 1 - negate sqrt swap 1 + atan2 2 * ; : r 0.5 ; : ' 0.5 - ; : l x ' y ' dst ; : in? l r < ; : z r q l q - sqrt ; : th y ' acos 2 * pi / ; : ph z x ' atan2 pi / t 10 / + ; ( : txtr 25 25 z* cos >r cos r> < 0.3 max ; ) : txtr 25 -25 z* cos swap cos max abs 16 pow ; : xy x .5 - y .5 - t 2 * 4 + sin 9 / t 6 * y + sin 5 / z+ ; : r xy t 3 * sin 3 / t 4 * sin 5 / z+ 2dup negate z* + sqrt ; : a atan2 24 / ; : r'' a abs log 2 / ; : txtr r'' r - .12 - abs 2 ** .01 - ; ph th txtr z * in? * : rainbow ( .f - r g b ) dup 3 * 1 + sin swap dup 3 * 0 + sin swap dup 3 * 5 + sin swap drop ; t 12 / sin 5 * + rainbow
Apple!
DarkstarAG
'25 Jun 08
: ' .5 - ; : ^2 dup * ; : x' x ' 1 y ' ^2 - pi * cos * ; : y' y ; : tex ( x y - t ) 25 -25 z* cos swap cos max abs 16 pow ; x' y' tex
Lattice 2
DarkstarAG
'25 Jun 08
x y 25 -25 z* cos swap cos max abs 16 pow
Lattice
DarkstarAG
'25 Jun 08
: q dup * ; : dst q swap q + sqrt ; : acos dup q 1 - negate sqrt swap 1 + atan2 2 * ; : r 0.5 ; : ' 0.5 - ; : l x ' y ' dst ; : in? l r < ; : z r q l q - sqrt ; : th y ' acos 2 * pi / ; : ph z x ' atan2 pi / t 10 / + ; ( : txtr 25 25 z* cos >r cos r> < 0.3 max ; ) : txtr 16 * tan swap 16 * tan atan2 cos 1 + 2 / negate ; ph th txtr z * in? * : rainbow ( .f - r g b ) dup 3 * 1 + sin swap dup 3 * 0 + sin swap dup 3 * 5 + sin swap drop ; t 12 / sin 5 * + rainbow
Rotating Sphere Color Bump
DarkstarAG
'25 Jun 08
: # 2 x 16 * floor ** / 2 mod swap y 16 * floor = * + ; : ? ( a b - ) t 3 * sin 0 < * swap t 3 * sin 0 >= * + ; 0 15 992 # 14 3096 # 13 4100 # 12 8194 # 11 9778 8192 2 + ? # 10 17969 16385 1584 + ? # 9 16385 # 8 16385 # ( --- ) 7 18441 16385 ? # 6 17425 16833 ? # 5 9186 8738 ? # ( --- ) 4 8194 # 3 4100 # 2 3096 # 1 992 # floor 0 0 rot
Smile Hi! Redux
DarkstarAG
'25 Jun 08
: z x .5 - y .5 - ( complex number in polar form ) 2dup dup * swap dup * + sqrt -rot swap atan2 ; : 2pi 2 pi * ; : fix ( angle ) abs 2pi mod pi - ; : norm pi / ; : *_ ( multiply two complex numbers ) -rot + -rot * swap fix ; : /_ ( divide two complex numbers ) -rot swap - -rot / swap ; : ^_ ( raise a complex number to a real power ) rot over ** -rot * ; z z 1 4 *_ /_ t - 5 ^_ ( number of rays ) fix 1 swap - norm swap drop ( color correction ) dup sqrt 2dup + abs .6 *
Complex Spiral
Manwe
'25 Jun 08
: w 48 ; : h 24 ; : # 2 y h * floor ** / 2 mod swap x w * floor = * + ; 0 0 32768 # 1 196608 # 2 196608 # 3 196608 # 4 245760 # 5 516096 # 6 516096 # 7 1044480 # 8 1046528 # 9 1047552 # 10 521728 # 11 3601088 # 12 2652640 # 13 3006963 # 14 1425918 # 15 3178748 # 16 3670136 # 17 8257600 # 18 8126464 # 19 7340032 # 20 2097152 # 21 1792 # 22 28544 # 23 94080 # 24 53184 # 25 452604 # 26 1038334 # 27 911356 # 28 1038816 # 29 253184 # 30 259072 # 31 260096 # 32 522240 # 33 1047552 # 34 2096640 # 35 2093056 # 36 2093056 # 37 4194048 # 38 4193934 # 39 8384671 # 40 8356926 # 41 4136991 # 42 4079679 # 43 1835022 # 44 1638400 # 45 1966080 # 46 1572864 # 47 524288 # floor 0 swap dup 0 =
World map
Postrediori
'25 Jun 08
: # 2 x 16 * floor ** / 2 mod swap y 16 * floor = * + ; 0 15 992 # 14 3096 # 13 4100 # 12 8194 # 11 9778 # 10 17969 # 9 16385 # 8 16385 # 7 18433 # 6 17409 # 5 9186 # 4 8194 # 3 4100 # 2 3096 # 1 992 # floor 0 0 rot
Smile
Postrediori
'25 Jun 08
: z ( complex number in polar form ) x 1.15 - 1.7 * y .3 - 1.7 * 2dup dup * swap dup * + sqrt -rot atan2 ; : fix pi + 2 pi * mod pi - ; : *_ -rot + -rot * swap fix ; : /_ -rot swap - -rot / swap fix ; z 2.3 1.4 *_ z -1.3 2.5 *_ /_ fix abs pi / swap abs over .5 swap /
TFKP 5
Manwe
'25 Jun 08
: z ( complex number in polar form x = module, y = arg ) x .4 - 9 * y .4 - 9 * 2dup dup * swap dup * + sqrt -rot atan2 ; : *_ ( multiply two complex numbers ) -rot + -rot * swap ; : /_ ( divide two complex numbers ) -rot swap - -rot / swap ; : ^_ ( raise a complex number to a real power ) rot over ** -rot * ; z x 6 * sin ^_ 2 / z 2 * swap 2 * *_ 3 / y 9 * cos 2 + ^_ 2 / z sin swap cos ^_ ( color correction ) rot 500 / .5 + -rot over 2 / + swap 1 swap /
TFKP 4 polar
Manwe
'25 Jun 08
: z ( complex number in polar form x = module, y = arg ) x .5 - 7 * y .2 - 7 * ; : *_ ( multiply two complex numbers ) -rot + -rot * swap ; : /_ ( divide two complex numbers ) -rot swap - -rot / swap ; : ^_ ( raise a complex number to a real power ) rot over ** -rot * ; z x 6 * sin ^_ 2 / z 2 * swap 2 * z* 3 / y 9 * cos 2 + ^_ 2 / z sin swap cos ^_ ( color correction ) rot 500 / .5 + -rot over 2 / + swap 1 swap /
Manwe
TFKP 4
'25 Jun 08
: q dup * ; : d2 q swap q + ; : acos dup q 1 - negate sqrt swap 1 + atan2 2 * ; : r 0.5 ; : r2 r q ; : tl 1.58 t sin 5 / + ; : ' 0.5 - ; : 's ' tl cos * ; : 'c ' tl sin * ; : x' x 'c y 's - ; : y' y 'c x 's + ; : l2 x ' y ' d2 ; : in? l2 r2 < ; : z r2 l2 - sqrt ; : th y' acos 2 * pi / ; : ph z x' atan2 pi / t 9 / + ; : txtr 25 25 z* cos >r cos r> < ; z in? * 1.5 * ph th txtr over * dup rot
Rotating sphere with tilt
Postrediori
'25 Jun 08
: sqr dup * ; : dst sqr swap sqr + sqrt ; : acos dup sqr 1 - negate sqrt swap 1 + atan2 2 * ; : rad 0.5 ; : x' x 0.5 - ; : y' y 0.5 - ; : len x' y' dst ; : inside? len rad < ; : z rad sqr len sqr - sqrt ; : theta y' acos 2 * pi / ; : phi z x' atan2 pi / t 10 / + ; : txtr ( fi th - k ) dup 3 * t + sin 25 * sin sqrt sqrt + swap 15 * cos 7 + * ; phi theta txtr z * inside? * : rainbow ( .f - r g b ) 1.57 + dup 3 * 1 + sin swap dup 3 * 0 + sin swap dup 3 * 5 + sin swap drop ; rainbow
Color Tapes Sphere
DarkstarAG
'25 Jun 08
( basic operations on a complex numbers ) : z x .5 - y .5 - ; ( a complex number stored as a pair of numbers ) : z- ( difference between two complex numbers ) swap -rot - push - pop ; : z1/ ( 1 divided by a complex number ) over dup * over dup * + rot over / -rot / ; : zmodule ( module of a complex number ) dup * swap dup * + sqrt ; : zarg ( arg of a complex number ) swap atan2 ; : e^ ( e raised to a complex power ) over exp over cos * -rot sin swap exp * ; : zln ( logarithm of a complex number ) 2dup zmodule log -rot zarg ; : z^ ( complex number raised to a complex power ) push push zln pop pop z* e^ ; : a 18 1.4 ; : b 3 -4 ; : c -2 2.9 ; : d 1 -1.7 ; a z z* b z+ c z z* d z+ c z^ z1/ e^ z* zln abs swap abs 3 / 2dup zmodule 3.5 / swap
TFKP 3
Manwe
'25 Jun 08
( basic operations on a complex numbers ) : z x .5 - y .5 - ; ( a complex number stored as a pair of numbers ) : z- swap -rot - push - pop ; ( difference between two complex numbers ) : z1/ over dup * over dup * + rot over / -rot / ; ( 1 divided by a complex number ) : zmodule ( module of a complex number ) dup * swap dup * + sqrt ; : zarg ( arg of a complex number ) swap atan2 ; : e^ ( e raised to a complex power ) over exp over cos * -rot sin swap exp * ; : zln ( logarithm of a complex number ) 2dup zmodule log -rot zarg ; : z^ ( complex number raised to a complex power ) push push zln pop pop z* e^ ; : a 2 1.4 ; : b 1 -4 ; : c -2 t 2 / sin 4 * 1 + ; : d 0 1 ; a z z* b z+ c z z* d z+ c z^ z1/ e^ z* zln 2dup zmodule 4 / swap
Complex Library
Manwe
'25 Jun 08
: q dup * ; : dst q swap q + sqrt ; : acos dup q 1 - negate sqrt swap 1 + atan2 2 * ; : r 0.5 ; : ' 0.5 - ; : l x ' y ' dst ; : in? l r < ; : z r q l q - sqrt ; : th y ' acos 2 * pi / ; : ph z x ' atan2 pi / t 10 / + ; : txtr 25 25 z* cos >r cos r> < 0.3 max ; ph th txtr z * in? * dup dup
Rotating sphere Redux v2
Postrediori
'25 Jun 08
: sqr dup * ; : dst sqr swap sqr + sqrt ; : acos dup sqr 1 - negate sqrt swap 1 + atan2 2 * ; : rad 0.5 ; : x' x 0.5 - ; : y' y 0.5 - ; : len x' y' dst ; : inside? len rad < ; : z rad sqr len sqr - sqrt ; : theta y' acos 2 * pi / ; : phi z x' atan2 pi / t 10 / + ; : txtr 25 25 z* cos >r cos r> < ; phi theta txtr z * inside? * dup dup
Rotating sphere Redux
Postrediori
'25 Jun 08
: odd 2 mod ; : sqr dup * ; : len sqr swap sqr + sqrt ; : acos dup sqr 1 - negate sqrt swap 1 + atan2 2 * ; : rad 0.5 ; : tiles 10 ; : tile tiles * floor odd ; : dx x 0.5 - ; : dy y 0.5 - ; : dlen dx dy len ; : inside? dlen rad < ; : z rad sqr dlen sqr - sqrt ; : theta dy acos 2 * pi / ; : phi z dx atan2 pi / ; : ofs t 10 / ; : txtr tile swap ofs + tile + odd 0.25 max ; phi theta txtr z * inside? * dup dup
Rotating sphere
Postrediori
'25 Jun 08
: size 8 ; : odd 2 mod ; : tile size * floor odd ; x tile y tile + odd dup dup
Chessboard
Postrediori
'25 Jun 08
: size 8 ; : odd 2 mod ; : tile size * floor odd ; x tile y tile + odd dup dup
Chessboard
Postrediori
'25 Jun 08
: size 8 ; : odd? 2 mod ; : tile size * floor odd ; x tile y tile + odd dup dup
Chessboard
Postrediori
'25 Jun 08
: square dup * ; : dist square swap square + sqrt ; : 2dup over over ; : spiral 0.5 - swap 0.5 - 2dup dist push atan2 t + 0.01 * pop + 100 * sin ; x y spiral dup t cos * swap t sin * t sin cos
Colored rotating spiral
Postrediori
'25 Jun 08
( greetings to AS's Software Inc. ) : z1/ over dup * over dup * + rot over / -rot / ; : z x .5 - y .5 - ; : zmodule dup * swap dup * + sqrt ; : a 2.3 1 ; : b t sin 4 * -3 ; : c -2 3 ; a z z z* z* b z+ c z z* z1/ z* 4 / abs swap 4 / abs 2dup zmodule ( color correction ) over + 2 / swap t 2 * sin 1.5 + * .9 min
TFKP 2
Manwe
'25 Jun 08
: z x .5 - y .5 - ; ( complex number ) : z1/ over dup * over dup * + rot over / -rot / ; : zmodule dup * swap dup * + sqrt ; : a 2.3 t 2 * sin + 1.4 ; : b 1 -4 t sin - ; : c -2 3 t sin + ; : d 0 t 3 / sin 2 / - 1 ; ( complex function az+b / cz+d ) a z z* b z+ c z z* d z+ z1/ z* 2 / ( i-color correction ) 2dup zmodule 4 / ( module color correction )
TFKP 1
Manwe
'25 Jun 08
0.5 y - 0.5 x - atan2 t * 101 / 13 t * + x cos y sin * + dup sin swap cos 2dup 2dup z+ z*
hypnotic - what am i doing?
kamikazejones
'25 Jun 08
x .5 - y .5 - atan2 t 100 mod * 4 * dup 1 - sin over sin rot 1 + sin
Psyhodelic 2
Ivanq
'25 Jun 08
x .5 - y .5 - atan2 t 100 / 10 mod 300 + * 200 * dup 1 - sin over sin rot 1 + sin
Psyhodelic 1
Ivanq
'25 Jun 08
: f ( r x y - k ) -.5 -.5 z+ 2dup z* + sqrt - t sin * sin ; 0 x x 10 - * y + 40 + t * sin x y f 2 * x y * t + sin x x * y y * f 1.5 * x y * t + 3 + sin x x * y y * f 1.5 * + max
Rain of Scales
DarkstarAG
'25 Jun 08
: f ( r x y - k ) -.5 -.5 z+ 2dup z* + sqrt - t sin * sin ; 0 x x 40 - * y + -40 + t * sin x y f 3 * 0 x y * t + sin x x * y y * f max
Rain
DarkstarAG
'25 Jun 08
: f ( k x - k' x' ) dup .1 + >r sin 10 * tan * 1 + 2 / r> ; t x y * y + x log 1 + / sqrt f f f f f f t sin x 2 * y sin 10 / + f f f f f f y x * 13 * cos * f f f f f f f f z* 2dup z* 2dup 2dup z* z*
Mad Piccasso
DarkstarAG
'25 Jun 08
0 x .5 - pi * tan y .5 - pi * tan t sin t cos negate z* atan2 cos 1 + 2 / 0
Piramid 3D
Dar
'25 Jun 08
: f ( N - k ) dup >r dup >r x pi * * tan y pi * r> * tan 2dup z* t sin t sin exp z* atan2 cos 1 + 2 / r> / + ; : tile 0 4 f 8 f 16 f 32 f 64 f 128 f 256 f 2 * ; 0 tile 1
Tile3
DarkstarAG
'25 Jun 08
: f ( N - k ) dup >r dup >r x pi * * tan y pi * r> * tan atan2 cos 1 + 2 / r> sqrt / + ; : tile 0 3 f 9 f 27 f ; 0 tile 1
Tile3 3D Redux
DarkstarAG
'25 Jun 08
: f ( N - k ) dup >r dup >r x pi * * tan y pi * r> * tan atan2 cos 1 + 2 / r> / + ; : tile 0 4 f 8 f 16 f 32 f 64 f 128 f 256 f 2 * ; 0 tile 1
Tile2 3D
DarkstarAG
'25 Jun 08
Next