*

: nip swap drop ;
: offset >r swap >r - r> r> - ;
: norm dup * swap dup * + sqrt ;
: theta swap atan2 ;
: polar 2dup theta >r norm r> ;
: rect 2dup sin * >r cos * r> ;
: shine 80 * 2 ** 1 + 1 swap / ;
: swing t 0.8 * 2 * pi * dup >r 2 * cos 2 / r> pi 4 / + sin 2 / ;
: length swing norm ;
: saber
x y .5 .5 offset polar swing theta - rect
>r dup 0 < if drop r> drop 1000
else dup length <= if drop r>
else length - r> norm then then ;

saber shine

Based on: Lisa Juice - FSD


comments powered by Disqus