Home > Liang-Barsky

Liang-Barsky

Liang-Barsky is a project mainly written in Ruby, it's free.

Implementation of the Liang-Barsky line clipping algorithm (in Ruby)

Liang-Barsky

This is an implementation of the Liang-Barsky line clipping algorithm I hacked together when developing a game. Thought it might be useful to others.

(Note: Differs from traditional implementations in that the origin is in the top left corner, not bottom left. This makes this implementation more appropriate for game development -- for example using Gosu).

Previous:PathProvider