lab of rendering algorithm