There is ample scope for improvement in the algorithm mentioned above. It is almost a brute force implementation using the clipping routine to obtain hidden line removal and there exist more efficient ways (of possibly O(N logN) complexity) to obtain the same results (although implementation may be more complex). Also, dynamic memory allocation (DMA) can be used instead of the present fixed memory allocation to efficiently utilise the system resources.