Haiku Gallery
( rotate and use as primitive ) : line-test x .5 - abs 0.01 - 1 - negate 200 ** y .5 - abs .4 < * ; line-test
Line test
DarkstarAG
'25 Jun 08
: xy x 0.5 - y 0.5 - ; : ang xy atan2 pi / 1 + 2 / .5 + 1 mod ; : second t 60 mod floor 60 / ; : minute t 60 / 60 mod floor 60 / ; : hour t 60 / 60 / 12 mod 12 / ; : incircle xy dup * swap dup * + .14 < * ; : hand ang - abs 0.005 < incircle ; : rr xy 2 ** swap 2 ** + sqrt ; : ticks xy rr dup .39 > swap .43 < * >r atan2 6 * 1.4 + sin 200 ** 1.0 / r> * + ; : circle rr dup .47 - abs 64 * -2 ** ( .46 > swap .48 < ) * + ; : pimpka rr 1.02 - 300 ** 2 / max ; : decor hand ticks circle pimpka ; second decor minute decor hour decor
Clock Redux from BradN
DarkstarAG
'25 Jun 08
1 x .5 - y .5 - 2dup atan2 .8 * .5 + floor .8 / dup cos swap sin z* .4 - swap .6 / abs + abs - 2 **
Soviet Star
Digimind + Manwe
'25 Jun 08
1 x .5 - y .5 - 2dup atan2 .8 * .5 + floor .8 / dup cos swap sin z* .4 - swap .6 / abs + abs 80 * -
Star 99 bytes
Digimind
'25 Jun 08
: oneor 2dup over < * -rot swap over < * ; : other 1000 * dup floor - ; : force 10 / ; : tube + 12 * t + sin 1 + 2 / ; random force dup x tube swap other force y tube oneor 2dup + 1 swap -
Randomtubes
Renha
'25 Jun 08
( Shader text limit: max 3 clouds ;( ) : width 8 ; : g/ 16 / ; : deg ( deg - rad ) 180 / pi * ; : rad ( rad - deg ) 180 * pi / ; : xw x width * ; : yw y width * ; : rect ( c x1 y1 x2 y2 - c*f ) yw > swap xw > * swap yw < * swap xw < * * g/ ; : fillcircle ( c r x y - c*f ) yw - dup * swap xw - dup * + sqrt > * g/ ; : r@ r> dup >r ; : p' t * 6 / sin pi * 4 * cos ; : ~xy ( x y p - x' y' ) p' >r t r@ 4 * + sin r@ 3 * * + swap t r@ 5 * + cos r@ 4 * * + swap r> drop ; : cloud ( p - ) >r 0 16 r@ * .6 3.3 3.6 r@ ~xy fillcircle max 16 r@ * 1 4.3 4.2 r@ ~xy fillcircle max 16 r@ * .6 5.4 4.3 r@ ~xy fillcircle max 16 r@ * .7 6 3.7 r@ ~xy fillcircle max 16 r@ * 3.3 3 r@ ~xy 6 4 r@ ~xy rect max r> drop ; : clouds .8 cloud .4 cloud max .2 cloud max ; clouds >r 0 r@ max 0 r@ max 1 r> /
Vector Clouds
DarkstarAG
'25 Jun 08
: f atan2 556677 * 1 mod ; : k pop dup push ; : a k / 1 mod ; : b a negate 1 + ; : cx x x k mod - ; : cy y y k mod - ; : dx cx k + ; : dy cy k + ; : sx .11 ; : sy .6 ; : q1 sx cx + sy cy + f x b * ; : q2 sx dx + sy cy + f x a * ; : q3 sx cx + sy dy + f x b * ; : q4 sx dx + sy dy + f x a * ; : l q1 q2 + y b * q3 q4 + y a * + ; : i pop .5 * push .66 * dup -rot l * + swap ; 1 push 0 .6 i i i i i i i drop pop drop dup dup
Fractal noise
Vort
'25 Jun 08
( VectorDraw ) ( c - color component, f - scale koef, c*f - force of color ) : width 8 ; : greys 16 ; : g/ greys / ; : deg ( deg - rad ) 180 / pi * ; : rad ( rad - deg ) 180 * pi / ; : xw x width * ; : yw y width * ; : rect ( c x1 y1 x2 y2 - c*f ) yw > swap xw > * swap yw < * swap xw < * * g/ ; : fillcircle ( c r x y - c*f ) yw - dup * swap xw - dup * + sqrt > * g/ ; : cloud 0 16 .6 3.3 3.6 fillcircle max 16 1 4.3 4.2 fillcircle max 16 .6 5.4 4.3 fillcircle max 16 .7 6 3.7 fillcircle max 16 3.3 3 6 4 rect max ; 0 cloud max 0 cloud max 1 cloud /
Vector Cloud
DarkstarAG
'25 Jun 08
: r x .5 - 2 ** y .5 - 2 ** + ; : a x .5 - y .5 - atan2 ; : aa x .5 - 2 * 2 ** y .5 - 50 * 2 ** + .3 ** 1 - negate ; : bb a 6 * t 4 * pi * 2 * + sin 1 + 3 ** ; ( r ) aa bb 3 * * ( g ) bb 6 / aa + ( b ) bb 3 / aa 2 * +
Pulsar
DarkstarAG
'25 Jun 08
( x = rcosat, y = rsinbt ) : n 1 + 2 / ; : r x .5 - 2 ** y .5 - 2 ** + sqrt ; : x' x .5 - pi * 4 * sin n r * ; : y' y .5 - pi * 3 * cos n r * ; x' .5 - 2 ** y' .5 - 2 ** + 2 t pi * 2 * sin 12 / + ** 30 * 3 mod
PlayStaytionPanel01
DarkstarAG
'25 Jun 08
( greetings to DarkstarAG and BradN ) : line x - rot x swap - rot y - * -rot y rot - * - abs 999 * 1 min 1 swap - ; : cut y > swap y < * -rot x > swap x < * * * + ; : dot x - 2 ** swap y - 2 ** + .00005 < + ; 0 .78 .25 .69 .47 line .25 .475 .68 .78 cut .69 .47 .83 .64 line .47 .64 .69 .83 cut .83 .63 .64 .64 line .63 .65 .64 .83 cut .64 .64 .51 .76 line .64 .76 .51 .64 cut .51 .76 .47 .60 line .595 .76 .47 .51 cut .47 .60 .34 .50 line .50 .60 .34 .47 cut .34 .50 .46 .37 line .37 .50 .34 .46 cut .46 .37 .48 .20 line .20 .37 .455 .48 cut .48 .20 .59 .32 line .20 .32 .48 .59 cut .59 .32 .78 .25 line .25 .32 .59 .78 cut .40 .54 .36 .63 line .54 .631 .35 .40 cut .36 .63 .14 .55 line .55 .63 .14 .36 cut .14 .55 .13 .74 line .55 .74 .13 .14 cut .13 .74 .27 .60 line .60 .74 .13 .27 cut .39 .45 .315 .35 line .35 .45 .315 .39 cut .32 .35 .13 .50 line .35 .50 .13 .32 cut .13 .50 .14 .29 line .29 .50 .13 .14 cut .14 .29 .25 .41 line .29 .41 .14 .25 cut .50 .42 .46 .515 line .42 .515 .457 .50 cut .46 .51 .53 .58 line .51 .58 .46 .53 cut .58 .46 dot .59 .53 dot dup dup
Spike (Vectrex)
www.manwe.ru
'25 Jun 08
: better-line rot dup >r - -rot swap dup >r - / dup r> * r> - x + over y * - abs swap 2 ** 1 + sqrt / 112 * 1 swap - ; : x1 t 3.1 / sin abs ; : y1 t 1.7 / sin abs ; : x2 t 2.3 / cos abs ; : y2 t 1.9 / cos abs ; 1 1 1 y1 x1 y2 x2 better-line
walking line
Manwe
'25 Jun 08
: ' .5 - 2 ** ; 1.2 x ' y ' + sqrt 2 * 5 ** - .6 0
Full Sun
DarkstarAG
'25 Jun 08
: star >r 1024 / 1 swap - y - abs swap 1024 / x - abs + 20 * 0.3 ** r> ** 1 - negate 20 * t 10 * x y + 10 * + sin 1.5 + 3 / * ; : ! max ; : c 256 / * ; : orion ( red ) 0 320 160 .1 star 250 c ! 548 702 .1 star 220 c ! ( green ) 0 320 160 .1 star 140 c ! 548 702 .05 star 250 c ! ( blue ) 0 320 160 .1 star 120 c ! 535 48 .1 star ! 535 48 .1 star ! 643 196 .1 star ! 484 556 .08 star ! 530 524 .08 star ! 575 483 .08 star ! 506 584 .06 star ! 659 571 .07 star ! 541 678 .04 star ! 548 702 .02 star 100 c ! 544 742 .06 star ! 417 889 .1 star ! 767 816 .12 star ! 982 360 .05 star ! 1012 217 .05 star ! 1017 70 .05 star ! ; orion
Orion Blink
DarkstarAG
'25 Jun 08
: #rays 3 ; : n 1 + 2 / ; : ' .5 - 10 * ; : x' x ' t negate cos * y ' t negate sin * - n ; : y' x ' t negate sin * y ' t negate cos * + n ; : ds dup * .3 * swap #rays * + sin 3 * 1 + ; : fc 2dup ds - swap drop ; : x2 x' 0.5 - 2 * ; : y2 y' 0.5 - 2 * ; y2 x2 atan2 x2 x2 * y2 y2 * + sqrt fc abs 1 - negate ( dup sin over dup cos swap tan )
TriLobe Redux
DarkstarAG
'25 Jun 08
( Boo - oops! 18+ :O ) ( : to-moderator too-explicit if remove-it then ; ) : cir ( r x y ) y - dup * swap x - dup * + sqrt - 25 * exp 3 / + ; : p1 t 4 * sin 1 - 12 / + ; : p2 t 4 * -.75 + sin 1.2 - 17 / + ; : *censored* x .05 < x .95 > or y .05 < or y .95 > or ( .05 + ) * ; : rr 0 .35 .2 .0 p1 cir .05 .2 .28 p2 cir .35 .8 .0 p1 cir .05 .8 .28 p2 cir 1 min ; : gg 0 .35 .2 .0 p1 cir .05 .2 .28 p2 cir .35 .8 .0 p1 cir .05 .8 .28 p2 cir .05 min ; : bb 0 .35 .2 .0 p1 cir .05 .2 .28 p2 cir .35 .8 .0 p1 cir .05 .8 .28 p2 cir .2 min ; rr *censored* gg *censored* bb *censored*
Boo - oops! WARNING: 18+
DarkstarAG
'25 Jun 08
: star >r 1024 / 1 swap - y - abs swap 1024 / x - abs + 20 * 0.3 ** r> ** 1 - negate 20 * ; : ! max ; : c 256 / * ; : orion ( red ) 0 320 160 .1 star 250 c ! 548 702 .1 star 220 c ! ( green ) 0 320 160 .1 star 140 c ! 548 702 .05 star 250 c ! ( blue ) 0 320 160 .1 star 120 c ! 535 48 .1 star ! 535 48 .1 star ! 643 196 .1 star ! 484 556 .08 star ! 530 524 .08 star ! 575 483 .08 star ! 506 584 .06 star ! 659 571 .07 star ! 541 678 .04 star ! 548 702 .02 star 100 c ! 544 742 .06 star ! 417 889 .1 star ! 767 816 .12 star ! 982 360 .05 star ! 1012 217 .05 star ! 1017 70 .05 star ! ; orion
Orion
DarkstarAG
'25 Jun 08
( fixed width and antialiasing ) : line y - swap x - rot y swap - * rot x swap - rot * - abs 144 ; : width rot - 2 ** -rot - 2 ** + sqrt / * 1 min 1 swap - ; : x1 t 3.1 / sin abs ; : y1 t 1.7 / sin abs ; : x2 t 2.3 / cos abs ; : y2 t 1.9 / cos abs ; 1 1 1 x1 y1 x2 y2 line x1 y1 x2 y2 width
walking line
Manwe
'25 Jun 08
: line y - swap x - rot y swap - * rot x swap - rot * - abs 256 * 1 min 1 swap - ; 1 1 1 t 3.1 / sin abs t 1.7 / sin abs t 2.3 / cos abs t 1.9 / cos abs line
random line
Manwe
'25 Jun 08
( Pixel Draw 8 coor ) ( Note: shader text limits ) : width 32 ; : bg1 t 2 / sin 1 + 16 * floor ; : bg 0 ; : wf width * floor ; : ?? ( x y - f ) y wf = swap x wf = * ; : d ( x base - d x' ) 2dup mod -rot / floor ; : c 2 d 2 d 2 d drop ; : tween ( a b k - k[a-b]+b ) over push -rot - * pop + ; : ?: ( a b f - f?a:b ) 0 <> 1 over - -rot * -rot * + ; : ! ( c x y - ) ?? bg -rot ?: + ; : [ 0 ; : ] c ; : ss t floor 60 mod ; : mm t 60 / floor 60 mod ; : hh t 3600 / floor 24 mod ; : v+ ( x y x1 y1 - x+x1 y+y1 ) swap + -rot + swap ; : , ( k c x y x1 y1 - k c x y ) rot dup >r + >r over >r + r> r> swap >r rot dup >r -rot ! r> r> r> ; : d0 ( c x y - c' ) 1 0 , 0 1 , 2 1 , 0 2 , 2 2 , 0 3 , 2 3 , 1 4 , drop drop drop ; [ 1 0 0 d0 5 4 0 d0 7 9 0 ! 7 10 0 ! 7 11 0 ! ]
0 0 _ Shader text limit ...
DarkstarAG
'25 Jun 08
: to 2dup 2dup >r >r >r >r ; : vec rot - negate -rot - / ( k ) x r> - over * r> + y - 0 < swap .0039 over / x r> - + over * swap .0039 * abs + r> + y - 0 < - ; : cut rot 2dup min y < -rot max y > * -rot 2dup min x < -rot max x > * * * + ; 0 ( x1 y1 x2 y2 ) .5 .9 to .63 .66 vec .5 .91 .64 .66 cut .63 .66 to .9 .6 vec .63 .66 .91 .6 cut .9 .6 to .72 .37 vec .9 .6 .72 .37 cut .72 .37 to .75 .09 vec .72 .37 .76 .1 cut .75 .1 to .49 .2 vec .75 .1 .49 .2 cut .51 .2 to .25 .1 vec .51 .2 .25 .1 cut .28 .37 to .25 .09 vec .28 .37 .24 .1 cut .1 .6 to .28 .37 vec .1 .6 .28 .37 cut .37 .66 to .1 .6 vec .37 .66 .09 .6 cut .5 .9 to .37 .66 vec .5 .91 .36 .66 cut
Vector Star
Manwe
'25 Jun 08
( VectorDraw ) ( c - color component, f - scale koef, c*f - force of color ) : width 8 ; : greys 16 ; : g/ greys / ; : deg ( deg - rad ) 180 / pi * ; : rad ( rad - deg ) 180 * pi / ; : xw x width * ; : yw y width * ; : rect ( c x1 y1 x2 y2 - c*f ) yw > swap xw > * swap yw < * swap xw < * * g/ ; : fillcircle ( c r x y - c*f ) yw - dup * swap xw - dup * + sqrt > * g/ ; : circle ( penwidth c r x y - c*f ) yw - dup * swap xw - dup * + sqrt - abs rot width / < * g/ ; : tria ( c x1 y1 x2 y2 x3 y3 - c*f ) TODO ; : quad ( c x1 y1 x2 y3 x3 y3 x4 y4 - c*f ) TODO ; : ray ( c deg1 deg2 x y - c*f ) xw rot - yw rot - swap atan2 rad swap over >= -rot <= * * ; : line ( c w x1 y1 x2 y2 - ) TODO ; 8 3 4 4 fillcircle 16 .4 3 5 fillcircle 16 .4 5 5 fillcircle + + 16 .1 3 5 t 30 * sin 7 / + fillcircle - 16 .1 5 5 t 30 * sin 7 / + fillcircle - 16 2 4 4 t 30 * sin 4 / + fillcircle 16 2.4 4 5.3 t 30 * sin 4 / + fillcircle -
Hahaha!
DarkstarAG
'25 Jun 08
( VectorDraw ) ( c - color component, f - scale koef, c*f - force of color ) : width 8 ; : greys 16 ; : g/ greys / ; : deg ( deg - rad ) 180 / pi * ; : rad ( rad - deg ) 180 * pi / ; : xw x width * ; : yw y width * ; : rect ( c x1 y1 x2 y2 - c*f ) yw > swap xw > * swap yw < * swap xw < * * g/ ; : fillcircle ( c r x y - c*f ) yw - dup * swap xw - dup * + sqrt > * g/ ; : circle ( penwidth c r x y - c*f ) yw - dup * swap xw - dup * + sqrt - abs rot width / < * g/ ; : tria ( c x1 y1 x2 y2 x3 y3 - c*f ) TODO ; : quad ( c x1 y1 x2 y3 x3 y3 x4 y4 - c*f ) TODO ; : ray ( c deg1 deg2 x y - c*f ) xw rot - yw rot - swap atan2 rad swap over >= -rot <= * * ; : line ( c w x1 y1 x2 y2 - ) TODO ; 9 1 t sin + 4 2 t sin + 6 rect 4 12 2 3 5 circle 5 2 3 3 fillcircle - 8 2 3 7 fillcircle + 3 t sin 180 * dup 30 + 4 4 ray
Vector Draw
DarkstarAG
'25 Jun 08
: 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
sd
anon
'25 Jun 08
: r x .5 - dup * y .0 - dup * + sqrt ; : f r t 10 / pi * 2 * sin 10 / + dup >r 20 * + sin -1 * r> dup 0.4 > swap .7 < and * ; 5 f 0 f 1 f
Rainbow Redux
DarkstarAG
'25 Jun 08
: h ." hello world!" ;
Untitled
Anonymous
'25 Jun 08
1 y 2 * - x y 2 * 8 ** t 9 / sin * + .5 - abs 2dup > .5 y - * -rot 45 * > 3 1 y 1.8 * - / t 1 mod 6 * + floor 2 mod 1 y 1.8 * - * 4 / * + dup 0 = .5 y - * .75 ** y .5 < * over + over 1 x t 9 / cos + 12 * sin 30 / y .6 - < * + 1.5 y 1.3 * - y .5 > * -
Night Road
Manwe
'25 Jun 08
: f x 3 y t sin * * - + sin ; 1 f 0 f 5 f
Spectruium
Anonymous
'25 Jun 08
: r x .5 t cos * - dup * y .0 - dup * + sqrt ; : f r dup >r 20 t sin / * + sin -1 * r> dup 0.4 > swap .7 x t * sin * < and * ; 5 f 0 f 1 f
Rainbowigita
BradN
'25 Jun 08
: r x .5 - dup * y .0 - dup * + sqrt ; : f r dup >r 20 * + sin -1 * r> dup 0.4 > swap .7 < and * ; 5 f 0 f 1 f
Rainbow
DarkstarAG
'25 Jun 08
( Bar clock ) : n 1 + 2 / ; : s t floor 60 mod ; : m t 60 / floor 60 mod ; : h t 3600 / floor 12 mod ; x s 60 / - abs 0.01 < y 0.3 < * x m 60 / - abs 0.01 < y 0.2 < * x h 12 / - abs 0.01 < y 0.1 < *
Bar Clock
DarkstarAG
'25 Jun 08
( x1 = xcosa - ysina, y1 = xsina + ycosa ) : rotate ( x y a - x1 y1 ) dup sin swap cos ( x y sa ca ) 2dup >r >r ( x y sa ca R:ca sa ) rot dup >r * ( x sa yca R:ca sa y ) -rot over * swap r> r> r> ( yca xsa x y sa ca ) -rot * -rot * ( yca xsa ysa xca ) swap - -rot + ( x1=xca-ysa y1=xsa+yca ) ; : n 1 + 2 / ; x t cos n - y t sin n - t 1 mod pi * 2 * rotate - abs .1 ** 1 - negate x t sin n - y t cos n - t 1 mod pi * -2 * rotate - abs .1 ** 1 - negate x t cos n + y t cos n + t 1 mod pi * 2 * rotate - abs .1 ** 1 - negate
jedy swords
DarkstarAG
'25 Jun 08
( x1 = xcosa - ysina, y1 = xsina + ycosa ) : rotate ( x y a - x1 y1 ) dup sin swap cos ( x y sa ca ) 2dup >r >r ( x y sa ca R:ca sa ) rot dup >r * ( x sa yca R:ca sa y ) -rot over * swap r> r> r> ( yca xsa x y sa ca ) -rot * -rot * ( yca xsa ysa xca ) swap - -rot + ( x1=xca-ysa y1=xsa+yca ) ; : n 1 + 2 / ; x t cos n - y t sin n - t 1 mod pi * 2 * rotate - abs .1 ** 1 - negate x t sin n - y t cos n - t 1 mod pi * -2 * rotate - abs .1 ** 1 - negate x t cos n + y t cos n + t 1 mod pi * 2 * rotate - abs .1 ** 1 - negate
jedy swords
DarkstarAG
'25 Jun 08
: r 2dup atan2 >r 2 ** swap 2 ** + sqrt r> 6 * t pi * 3 * sin 2 * + sin 60 / + ; 0 x .5 - y .5 - negate atan2 4 / 1 x .5 - y .5 - r 60 * sin 2 / - abs
Alien Radar
DarkstarAG
'25 Jun 08
: x(t) pi * 2 * dup push cos x .5 - * pop sin y .5 - * - .5 + ; : y(t) pi * 2 * dup push sin x .5 - * pop cos y .5 - * + .5 + ; : sec t 60 mod floor 60 / x(t) ; : min t 60 / floor 60 mod 60 / x(t) ; : hour t 3600 / floor 12 mod 12 / x(t) ; : arrow dup .49 > swap .51 < and ; sec arrow min arrow hour arrow
Arrow Clock (fixed)
DarkstarAG
'25 Jun 08
: =? - abs 256 * 0.5 < ; : n 1 + 2 / ; : xt 2 / t 2 + + cos n ; : yt 3 / t + sin n ; : l random pi * 40 * dup xt x - abs swap yt y - abs + sqrt + ; 0 0 l .25 < 0
Lissajou 1
DarkstarAG
'25 Jun 08
: z t 1 + cos 4 + 3 / * ; : a 1.1 x .5 - y .5 - atan2 t ; : b * dup sin swap 2 / t 5 * + cos t 3 / sin 2 / 1 + * - 30 / x .5 - z 2 ** y .5 - z 2 ** + + - 4 ** ; a 1.7 / + 10 b t cos 1 + 5 / + a 1.9 / - 8 b a 2.1 / - 6 b t 2.7 * cos 1 + 5 / +
TBL Astral
Manwe
'25 Jun 08
: =? - abs .3 - abs 4 * sin 1 + 2 / dup * ; : xt x 50 * sin ; : yt y 50 * t + cos t sin .3 / + ; xt x 2 * - abs yt y 2 * - abs =? xt x 5 * - abs yt y 7 * - abs =? xt x 8 * - abs yt y 3 * - abs =?
Paranoia
DarkstarAG
'25 Jun 08
: x(t) pi * 2 * dup push cos x .5 - * pop sin y .5 - * - .5 + ; : y(t) pi * 2 * dup push sin x .5 - * pop cos y .5 - * + .5 + ; : sec t 60 mod floor 60 / x(t) ; : min t 60 / floor 60 mod 60 / x(t) ; : hour 6 86400 * 86400 / 12 mod floor 12 / x(t) ; : arrow dup .49 > swap .51 < and ; sec arrow min arrow hour arrow
Arrow Clock
DarkstarAG
'25 Jun 08
( Can you draw arrow lines ? ) : arrow ( angle - ) pi * 2 * sin 1 + 2 / x > ; t floor width mod 60 / arrow y .1 > * y .3 < * t 60 / floor 60 mod 60 / arrow y .4 > * y .6 < * t 3600 / floor 24 mod 24 / arrow y .7 > * y .9 < *
Line Clock
DarkstarAG
'25 Jun 08
Next