nice scope idea
about the skip... use a threshold that is a bit above 0.
it depends on the scale of your coordinates.
also, use this piece of code for skipping, so a line is skipped when either of its end points is behind the camera.
btw, if your code becomes more complex and you need loops, ifs with code in them, do a lot of megabuf assignments or simply want to shorten your code, you might be interested in this APE