|
![](/i/fill.gif) |
Warp wrote:
> clipka <ano### [at] anonymous org> wrote:
>> Isn't such a transformation non-affine? So it wouldn't be possible to do
>> it with a simple 4x4 matrix multiplication.
The trick which allows this is to use "homogeneous coordinates".
Basically the 4th (or 3rd in you're in 2D) index in the coordinate
vector is treated differently and is used to divide the other
coordinates. For example, let's say that the camera matrix maps a point
(x,y,z,1) in 3D homogeneous coordinates to the point (u,v,w) in camera
viewing coordinates. The actual position on the "screen" given by this
is then (u/w, v/w), where we've divided by the last coordinate. It's
this division which allows non-affine transformations to be represented.
Wikipedia has a nice article on homogeneous coordinates if you're
interested in more:
http://en.wikipedia.org/wiki/Homogeneous_coordinates
http://en.wikipedia.org/wiki/Camera_matrix
> Multiplication with a 4x4 matrix can be used for perspective projection.
> It's a 3x3 transformation matrix which is restricted to affine transformations.
3x4 is restricted to affine transformations. A 3x3 matrix is restricted
to linear transformations (assuming Cartesian instead of homogeneous
coordinates).
Post a reply to this message
|
![](/i/fill.gif) |