<p>Egads.  I was trying to place points for my sphere on my 3440x1440 monitors 860 pixels from right of center.  At 75% from left to right on the monitor.  I just arbitrarily choose the &quot;number&quot; 100 for my eye distance from my monitor and then worked backward to find the right size sphere and distance for it to appear where I wanted on the screen.  I got an exaggerated ellipse and had the hardest time figuring out why.  Yes, if you look at an ellipse at an angle it will look like a circle but it was way way to elliptical.</p>
<p>I finally realize that my eyes are not at 100 pixels or about 3/4th of an inch from the screen.  At that angle to the ellipse it'd probably look right.  When I set the monitor as being 2200 pixels from my eyes and redid everything it looks fine.  Now I have a beautiful globular cluster in a galaxy of stars.  Looks quite realistic.  Coming soon to a github near you(I hope).</p>

CC BY-SA 4.0
2022-06-25T03:43:50.933Z
2022-06-25T03:43:50.933Z
Dan Wood
<p>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.</p>
<p>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 &gt; 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.</p>

CC BY-SA 4.0
2022-06-23T00:03:13.970Z
You're probably seeing perspective distortion from the screen being comparitively close.  Try assuming the monitor is at something like x,y,10.
Greg Miller
CC BY-SA 4.0
2022-06-23T01:00:42.850Z
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.
Dan Wood
<rendering><mathematics><computational-geometry><image-processing>
3D to view plane projection
Dan Wood
# 3D to view plane projection

(Asked by: username_0 on 2022-06-22)

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.

**Tags:** rendering, mathematics, computational-geometry, image-processing

> **Comments:**
> **username_1**: You're probably seeing perspective distortion from the screen being comparitively close.  Try assuming the monitor is at something like x,y,10.  
> **username_0**: 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.  

---

## 1 answers

### Answer by username_0 on 2022-06-25. Score: 1

Egads. I was trying to place points for my sphere on my 3440x1440 monitors 860 pixels from right of center. At 75% from left to right on the monitor. I just arbitrarily choose the "number" 100 for my eye distance from my monitor and then worked backward to find the right size sphere and distance for it to appear where I wanted on the screen. I got an exaggerated ellipse and had the hardest time figuring out why. Yes, if you look at an ellipse at an angle it will look like a circle but it was way way to elliptical.

I finally realize that my eyes are not at 100 pixels or about 3/4th of an inch from the screen. At that angle to the ellipse it'd probably look right. When I set the monitor as being 2200 pixels from my eyes and redid everything it looks fine. Now I have a beautiful globular cluster in a galaxy of stars. Looks quite realistic. Coming soon to a github near you(I hope).


---

