Line clipping in Julia

December 29, 2021 ยท View on GitHub

lineClipping.jl Cohen-Sutherland line clipping algorithm for Julia. Input scalars, output intersection length, or nothing if no intersection.

cohensutherland(xmin, ymax, xmax, ymin, x1, y1, x2, y2)

Python / Fortran

For Python or Fortran line clipping, see https://github.com/scivision/lineclipping-python-fortran