3
$\begingroup$

We know that $(x, y, 1)$ are the homogenous coordinates of a 2D point $(x, y)$. $(x, y, 1)$ has 2 degrees of freedom. That's why we should call it 2D homogenous coordinates. But many websites say it's 3D homogenous coordinates.

My question is: What is right? $(x, y, 1)$ are 2D homogenous coordinates or 3D homogenous coordinates?

$\endgroup$
2
  • 4
    $\begingroup$ It's 2D homogeneous coordinates. 3D homogeneous coordinates would be $(x,y,z,w)$. $\endgroup$
    – lightxbulb
    Commented Nov 20, 2021 at 8:04
  • $\begingroup$ Can you give a better context? Interpreting the meaning of a "vector" is allllll about how the values are being interpreted, and interpretation is alllll about context: Consider this vec4(1,3,2,1); Its a vector, no its a point, no its a plane, no its a quaternion, no its a bivector.... It's all those things, but which one makes sense? Well that is all about context. So asking if it some random vec3 is 2D or 3D without giving a context is pretty much meaningless. $\endgroup$
    – pmw1234
    Commented Nov 20, 2021 at 12:22

2 Answers 2

4
$\begingroup$

If you have $(x,y,z) \in \mathbb{R}^3$ and you relate it to $(x/z, y/z) \in \mathbb{R}^2$ then you have interpreted $(x,y,z)$ as one possible representation of the 2D vector $(x/z, y/z)$ in homogeneous coordinates. The special case of $z=0$ corresponds to "points at infinity" or directions. If you have $(x,y,z,w) \in \mathbb{R}^4$ and you relate it to $(x/w,y/w,z/w) \in \mathbb{R}^3$ then you have interpreted $(x,y,z,w)$ as one possible representation of the 3D vector $(x/w, y/w, z/w)$ in homogeneous coordinates. From this it becomes clear that to represent an $N$-dimensional point in homogeneous coordinates you need $N+1$ components.

To clarify what I mean by one possible representation, consider the following example:

$$(3,7) \equiv (3,7,1) \equiv (6,14,2),$$

where the second and third vectors are different representations of the same 2D vector in homogeneous coordinates. In general, if you have a 2D vector $(X,Y)$, then for any $\lambda\ne 0$, the vector $(\lambda X, \lambda Y, \lambda)$ is a representation of $(X,Y)$ in homogeneous coordinates. So you really get an equivalence class of points in $N+1$ dimensions corresponding to a specific point in $N$ dimensions. Notably this equivalence class forms a line through $(0,0,0)$ and $(X,Y,1)$ in the $N+1$ dimensional space.

$\endgroup$
7
  • $\begingroup$ So (x, y) is 2D points and (x, y, 1) is It's 3D homogeneous coordinates? $\endgroup$
    – S. M.
    Commented Nov 20, 2021 at 18:10
  • $\begingroup$ @B-spline What is $A,B,C,D$ here, and what is the relation to the current question. If $(x,y)$ is a 2D point then $(x,y,1)$ is one possible version of it in homogeneous coordinates. But also $(2x,2y,2)$ is a version of it in homogeneous coordinates. For any $\lambda\ne 0$, $(\lambda x, \lambda y, \lambda)$ is a representation of $(x,y)$ in homogeneous coordinates. $\endgroup$
    – lightxbulb
    Commented Nov 20, 2021 at 18:11
  • $\begingroup$ So what we said the homogenous coordinates (x, y, 1) ? 2d or 3d? $\endgroup$
    – S. M.
    Commented Nov 20, 2021 at 18:13
  • $\begingroup$ @B-spline $(\lambda x, \lambda y,\lambda),\, \lambda \ne 0$ is in $\mathbb{R}^3$, while $(x, y)$ is in $\mathbb{R}^2$. However $(\lambda x, \lambda y, \lambda)$ are the homogeneous coordinates of $(x,y)$. $\endgroup$
    – lightxbulb
    Commented Nov 20, 2021 at 18:15
  • 2
    $\begingroup$ @B-spline $(x,y,1)$ is a 3D point and at the same time the representation of the 2D point $(x,y)$ in homogeneous coordinates. The two statements are not contradictory. It is however not the representation of a 3D point in homogeneous coordinates, since for that you would need a 4D point. $\endgroup$
    – lightxbulb
    Commented Nov 20, 2021 at 18:21
1
$\begingroup$

I suppose in some respects it's a matter of perspective (no pun intended). The ordered triple $(x,y,w)$ is a point in a 3-dimensional projective space that is mapped (projected) to a 2-dimensional point in the Euclidean plane: $(x/w, y/w).$ Given that, $(x,y,1)$ would be 2-dimensional plane in that 3-dimensional space (or a specific point if $x$ and $y$ are fixed) that maps to $(x,y)$ in the standard Euclidean 2-dimensional plane.

$\endgroup$
5
  • $\begingroup$ (x,y,1) is a projective plane points, so how it is points in 3d? $\endgroup$
    – S. M.
    Commented Nov 19, 2021 at 22:13
  • $\begingroup$ (x,y,1) has two degree of freedom,, so how it is 3d? $\endgroup$
    – S. M.
    Commented Nov 19, 2021 at 22:21
  • $\begingroup$ @B-spline: "(x,y,1) has two degree of freedom" It's not a function; it's a point in space. Points don't have "degrees of freedom"; they have coordinates. A point with 3 coordinates is said to be three dimensional. $\endgroup$ Commented Nov 19, 2021 at 23:05
  • $\begingroup$ @NicolBolas There's nothing wrong with calling $x,y$ degrees of freedom as long as they remain variables and are not constants. $\endgroup$
    – lightxbulb
    Commented Nov 20, 2021 at 8:07
  • 2
    $\begingroup$ @B-spline (x,y,1) is a projective plane points, so how it is points in 3d? To be more precise the triplet is an element of $\mathbb{R}^3$. If you're just given a triplet you cannot tell whether it's 2D homogeneous coordinates. If you know that the triplet $(x,y,z)$ is in homogeneous coordinates however, then you know that it corresponds to the point $(x/z, y/z)$ in 2D. Note that this also doesn't contradict the fact that $(x,y,z)$ is an element in $\mathbb{R}^3$ regardless of whether it's in 2D homogeneous coordinates or whether it's a typical 3D point/vector. $\endgroup$
    – lightxbulb
    Commented Nov 20, 2021 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.