# Does a sphere projected into 2D space always result in an ellipse?

My intuition has always been that when any sphere is projected into 2D space that the result will always mathematically be an ellipse (or a circle in degenerate cases).

In the past when I was actively doing my own graphics programming and brought this up with other people they were adamant that I was wrong. If I recall correctly they believed the result could be something vaguely "egg shaped".

Who was correct?

Since there is already one answer submitted, I don't wish to totally change my question but I realize I left out important details due to losing familiarity with the field over the years.

I intended to ask specifically about perspective projection where the projection is a linear application.

The other projections are of course interesting for many uses so I wouldn't want them removed at this point. But it would be great if answers could have perspective projection as their most prominent section.

• Assuming a perspective projection, AFAICS the 'boundary' formed by the view-points horizon will be a (truncated) cone and thus most of the projection will be a conic section: en.wikipedia.org/wiki/Conic_section. An ellipse is thus a possibility, but not the only one. Sep 15 '15 at 12:27
• In that case I will promote my comments to an answer... Sep 15 '15 at 15:06
• you need to add a constraint. fisheye is also a perspective projection, and you won't get ellipses. the constraint you need is linearity. Sep 16 '15 at 1:16
• I would rather say something like "where the projection is a linear application". There might be some shortcut term for this, like "linear epimorphism" or something, but I long forgot that. Sep 16 '15 at 6:14
• This should go somewhere in this thread, so adding it here :) Inigo Quilez's analytic sphere projection: shadertoy.com/view/XdBGzd Feb 2 '16 at 12:11

Assuming a perspective projection and a view point external to the sphere, then the 'boundary' formed by the view point and the circle on the sphere which forms the horizon WRT the view point, will be a cone.

Doing a perspective projection (onto a plane) is then equivalent to intersecting this cone with the plane which thus produces a conic section. FYI the four, non-degenerate, cases are shown in this image from Wikipedia An ellipse/circle is thus a possibility, but not the only one - unbounded parabolas or hyperbolas (and I guess if the plane passes through the eye, even degenerate cases ) are possible.

• I'm unable to imagine how the result could be a parabola or hyperbola despite the absolute logic of your argument. Some words clarifying what kind of layout would lead to these would be great. The best I can get my brain around is "something to do with infinities somehow" ... Sep 15 '15 at 15:27
• Maybe something equivalent might help. Imagine you are holding a torch (flashlight for those in North America), which makes a conic beam, and you are in in a dark empty (infinite) warehouse. Shining the torch at the floor you see an ellipse. Now gradually tilt the axis of the torch back towards the horizontal. The ellipse will get longer and longer until the point when the topmost 'edge' of the beam itself is horizontal, i.e. parallel to the floor. Now the projection is a parabola and it stretches on forever. Tilting it further will form a hyperbola. Sep 15 '15 at 15:42
• @hippietrail: It's perhaps worth noting that, with a view plane in front of the camera, the only way you can end up with a parabola or a hyperbola is if at least part of the sphere is between the focal point and the view plane. Sep 15 '15 at 22:43
• @IlmariKaronen: What would "focal point" mean in this context? The point the eye is focussing on? The vanishing point? (I taught myself 3D perspective rotation and projection as a 12 or 13 year old and never gained fluency in the math and terminology.) Sep 19 '15 at 4:47
• @hippietrail Focal point, in this context, would be the apex of the cone. Effectively the "pinhole" of the perspective, pinhole camera model. (PS Does the name imply meeting "a strange lady. She made me nervous.."?) Sep 21 '15 at 7:49

This is more like a long comment to @SimonF's answer that I'm trying to make somewhat self contained.

All cuts of cone are possible, hyperbola, parabola and ovals. This is easy to test by drawing images in a 3D engine by a extremely wide angle camera. Rotate the camera to say in 30 degree angle so the object is not in the middle of your focus. Then gradually move the camera closer to the sphere. Image 1: Flying very close to a sphere looking slightly sideways. Notice how we suddenly puncture the surface form inside.

So to recap when the sphere is very close so it exits the picture in wide image it can be a parabola or hyperbola. But the shape will just exit the frame to do so.

• What might be really nice is if your animation could change the shading for the various outcomes: Say white for ellipse, green (for the 'one frame' of parabola), and red for hyperbola. :-) Sep 16 '15 at 8:42
• @SimonF i thought about this, i was planning something like nathan reed. But i was in a bit of hurry, i was lucky to get this render done. Initially i was a bit sceptical whether hyperbola could exist at all, but yes now it seems obvious. Sep 16 '15 at 9:08

Projection systems are used to convert a 3D shape to a planar (2D) shape.

According to the type of projection system, different results and shapes like rectangles, pies, ellipses, circles, ... can be produced out of a sphere.

Projection systems can be classified by the characteristics of the result they generate.

To continue, I would like to use a very touchable and common example that we have all seen before, Earth sphere and global wide maps, they are everywhere.

# Suppose your sphere is the earth!

Imagine the earth as your sphere and a planar world map that is created from the spherical shape of the earth. In most of the world maps you see the countries near to the poles are getting much bigger than they are in reality, like Iceland which is 1/14 of Africa continent in reality but the map shows them both as equal. This is because when we are omitting one dimension we loose one characteristic of our shapes.

# Different projection systems and their results

This is a planar projection which doesn't conserve distance, angles or area. The red circles show the amount of exaggeration that is the product of this projection. Equal-Area, look at Iceland and Africa in this one and compare with above. Projection systems can be classified by what they preserve.

1. Equal area.
2. Equal angle which preserve the shape without distortion (conformal).
3. Equal distance.
4. ......

Conformal projections preserve the shapes but area will not be preserved (the first above picture) this one is the most famous projection system that is used in many applications. Your sphere is a rectangle here!

### So you cannot say a sphere will be projected to an ellipse always. As mentioned above a sphere can be projected to a rectangle (first shape) or can be an ellipse but with different characteristics (equal angle, distance, shape, area - see the following picture), or you may also project a sphere into a conic and then open the conic so you will have a pie.

Each of the above projection systems can be applied with iterative or direct algorithms that can be found on the internet. I didn't talk about the formula and transformations because you didn't ask. Although I wish you to find this answer useful. ### In perspective projections I say yes only ellipses will be produced out of spheres

Cutting a conic with a horizontal plane creates a circle.

Cutting with an oblique plane creates a bevel which would be an ellipse or a hyperbola depending on the cutting angle, and when this angle inclines to be vertical in will create a parabola (following picture). Maybe this is obvious but take a look at their equations.

For simplicity I assumed all geometries are origin centered.

### Equations:

Circle: $x^2+y^2=r^2$

Ellipse: $x^2/a^2+y^2/b^2=1$

Hyperbola: $x^2/a^2-y^2/b^2=1$

Parabola: $y^2=4ax$

### Morphology :

An ellipse has two foci obviously. A circle as a special kind of ellipsis has two foci too but they are coincident. A hyperbola however is a y axis mirror of its equal ellipsis and it has two foci too. A parabola has one focus but actually it has two because the second one is at infinity: when the cutting plane inclines to 90 degrees (bearing angle), second focus goes to infinity.

# Conclusion

As you see all are ellipses, however you may name them differently to describe special cases, but if you are going to implement it in a game, you need to assume an ellipse equation and it is enough. I can't tell which one of you guys are right, you or your friend, because both could be right.

• Yes I tried to cover that in my original question. Points and line segments are other degenerate ellipses too I believe. Sep 15 '15 at 17:27
• @hippietrail: The Earth is actually an excellent example also for perspective projections. If you take an ordinary photograph outdoors, pointing the camera towards the horizon, then (assuming that your lens has no distortion, and that the Earth is approximately a perfect sphere) the image of the Earth in the picture will be (a section of) a very broad hyperbola. Sep 15 '15 at 22:53
• @IlmariKaronen: Wow that makes it super clear and is worthy of an answer of its own! Would there be a version of this that would result in a parabola? Sep 16 '15 at 5:20
• @hippietrail I add some explanation at the end of my answer, hope it could answer new aspects of edited question. and thanks for your complement.
– Iman
Sep 16 '15 at 10:41

SimonF's reasoning basically convinced me, but I decided to do a sanity check. I loaded up a UE4 level that happens to have some spheres, like this one: I set the camera FOV up to 160 degrees to give lots of perspective distortion, and positioned it so the sphere was near the corner of the image: Then I took this into Inkscape and used the ellipse tool to draw on it: Surprise! It's a perfect fit!

• Very prettily illustrative! What do you think about tackling the parabola and hyperbola cases? Sep 15 '15 at 20:47
• @hippietrail Unfortunately, vector art programs don't have parabola and hyperbola tools the way they have ellipse tools, so it would be a bit harder... :) Sep 15 '15 at 22:00
• @NathanReed sure but they do have general graphing tools, (if not you can get one from me) graph a generic parabola and scale/rotate to fit. Sep 16 '15 at 9:11

There are no parabolas or hyperbolas formed when slicing a sphere once. There are no ellipses either except for the special case which is a circle.The result is always a circle. If you project the sphere onto a tilted plane you get an ellipse

• The other answers indicate that shapes other than an ellipse are possible. Can you demonstrate why they may be incorrect? Apr 11 '18 at 10:57