*

: offset >r swap >r - r> r> - ;
: norm dup * swap dup * + sqrt ;
: theta swap atan2 ;
: polar 2dup norm -rot theta ;
: rect 2dup cos * -rot sin * ;
: shine 80 * 2 ** 1 + 1 swap / ;
: swing t 1.6 * pi * dup >r 2 * cos .25 * r> pi .25 * + sin .25 * ;
: 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: Darth Vader - FSD


comments powered by Disqus