Further refactoring, integer-based iterative line generation in three dimensions.