[vtkusers] projections and transformations

David Gobbi david.gobbi at gmail.com
Tue Feb 16 08:53:06 EST 2010


On Tue, Feb 16, 2010 at 6:38 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> Is vtkPerspectiveTransform supposed to divide by the 3rd coordinate
> using the TransformPoint function? It seems to return the same vector
> that vtkTransform returns?:
>
> http://www.vtk.org/Wiki/VTK/Examples/PerspectiveTransform

It divides by the "w" coordinate, which is the 4th: (x, y, z, w).
When you call TransformPoint(x,y,z) it creates a homogeneous
coordinate (x,y,z,w) with w=1, and then multiplies it by the 4x4
matrix.  Then it returns (x/w, y/w, z/w).

   David G



More information about the vtkusers mailing list