I don't understand something about the near clipping plane. It's there to avoid the division by $0$ but when we compute the pixel coordinates, we just need to multiply by the clipping plane to clip the object?
For example in this code, from https://www.scratchapixel.com/lessons/3d-basic-rendering/3d-viewing-pinhole-camera/implementing-virtual-pinhole-camera
pScreen.x = pCamera.x / -pCamera.z * near;
pScreen.y = pCamera.y / -pCamera.z * near;
Vec2f pNDC;
pNDC.x = (pScreen.x + r) / (2 * r);
pNDC.y = (pScreen.y + t) / (2 * t);
pRaster.x = (int)(pNDC.x * imageWidth);
pRaster.y = (int)((1 - pNDC.y) * imageHeight);
bool visible = true;
if (pScreen.x < l || pScreen.x > r || pScreen.y < b || pScreen.y > t)
visible = false;
return visible;
When do they actually discard points that have a z component smaller than the near clipping plane? They just discard those which have a x and y coordinate not visible to the screen.