res←l solve (t r);a;b;c;d;m
⍝ let l be a point on the line
⍝ t be the direction of the line
⍝ r be the radius from 0,0
⍝ solve the intersection
⍝ normalize t so 0=|t
a b←9 11○¯11○×t
c←+/(a b×9 11∘○)⍤1 0⊢l
m←r>|c
res←cׯ11○×t
d←(r-⍥(×⍨)c)*÷2
res+←m×d××t