 
 USING: combinators.short-circuit kernel namespaces
        math
+       math.trig
        math.functions
        math.vectors
        math.parser

! draw-boid
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

: point-a ( boid -- a ) pos>> ;

: point-b ( boid -- b ) [ pos>> ] [ vel>> normalize* 20 v*n ] bi v+ ;

: boid-points ( boid -- point-a point-b ) [ point-a ] [ point-b ] bi ;

: draw-boid ( boid -- ) boid-points gl-line ;

: draw-boids ( -- ) boids> [ draw-boid ] each ;

: display ( -- ) black gl-color draw-boids ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


       ui.gestures
       assocs.lib vars rewrite-closures boids accessors
       math.geometry.rect
       newfx
       processing.shapes ;

IN: boids.ui

