# 3D to view plane projection

I am trying to draw points of a 3D sphere onto my monitor as if I was looking out into space. Me, the viewer, is at (0, 0, 0). The plane of my monitor is at (x, y, 1) and I have a sphere out in space beyond the screen, off to the side not centered on the Z axis. For each point of the sphere I compute where the point of intersection is between the plane of the monitor and the line between me and the point. What I get is an ellipse. Not surprising since a plane intersecting a cone at an angle would form an ellipse. But if I look at a real sphere off to the side it looks like a sphere and not an ellipsoid. If you draw an ellipse on a roadway and you view it from the correct spot it looks like a circle. I presume you've seen stretched lettering on roads which are readable.

So why when I draw the points of a 3D object exactly at the point of intersection with the line between the point and my eyes doesn't it look right? Or more simply: Given P1 = (0, 0, 0), a plane 0X + 0Y + Z = 1, and P2 at (X2, Y2, Z2) assume Z2 > 1 so that P2 is on the far side of the plane; where do I draw the point on my monitor such that a collection of points forming a sphere actually look like a sphere instead of an ellipsoid? I've been using (X2/Z2, Y2/Z2) assuming the distance between me and the monitor is '1'. But this gives me an ellipse.

• You're probably seeing perspective distortion from the screen being comparitively close. Try assuming the monitor is at something like x,y,10. Jun 23, 2022 at 0:03
• In reality I was assuming x, y, 100 in the actual code. I was just simplifying here. At first I couldn't figure out what was happening. Now it is obvious the monitor plane intersecting with the cone from my eye to the sphere is an ellipse. It makes sense conic section wise but that doesn't help me first out how to achieve what I want, which is to see the properly scaled and translated sphere on the screen. Obviously projecting the rays from points on the sphere 'through' the monitor isn't going to work. Jun 23, 2022 at 1:00