Filiform 3D engine - Dealing with the stage

Here you will find a method of mines to render the stage. The characters
are inside of a huge stadium so sometimes when it is rendered, as the camera is
close to a character, most of the stage is behind the camera and should not be
drawn. Sometimes a line should be traced betwin a point in front of the camera and
a point behind the camera. All of my calculations in the code seem to handle all
of these cases so there is no trouble in the filiform rendering.

More samples and useful functions here