Mazdak Farrokhzad edited pseudocode.tex  about 10 years ago

Commit id: 5e5566f7c70bf4df9241c6634e26a3e80735540d

deletions | additions      

       

\Statex  \Function{minRaysIntersecting}{$origin, circles$}  \Let{$R$}{find a ray which doesn't intersect any of the circles}  \Let{$Q$}{\parbox[t]{\dimexpr\linewidth-\algorithmicindent}{a priority queue of angles angle  intervals ordered by\\ the angle at which they end\strut}} \State \textbf{convert} \parbox[t]{\dimexpr\linewidth-\algorithmicindent}{circles into a set of intervals beginning at $\Call{angle}{R}$\\ and add them to $Q$\strut}  \While{$Q \neq \emptyset$}  \Let{$I$}{$\Call{deleteMin}{Q}$} 

\Statex  \Function{minRaysIntersecting}{$origin, circles$}  \Let{$R$}{find a ray which doesn't intersect any of the circles}  \Let{$Q$}{\parbox[t]{\dimexpr\linewidth-\algorithmicindent}{a priority queue of angles angle  intervals ordered by\\ the angle at which they end\strut}} \ForAll{$C \in circles$}  \Let{$A$}{\Call{angle}{R}}  \Let{$A_{min}$}{$(\Call{minIntersectionAngle}{origin, C}) - A) \mod 2\pi$}