@@ -0,0 +1,1848 @@
+import vtk.vtkNativeLibrary;%0Aimport vtk.vtkPerspectiveTransform;%0Aimport vtk.vtkTransform;%0Aimport vtk.vtkMatrix4x4;%0A%0Apublic class PerspectiveTransform %0A%7B%0A  // -----------------------------------------------------------------%0A  // Load VTK library and print which library was not properly loaded%0A  static %0A  %7B%0A    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %0A    %7B%0A      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %0A      %7B%0A        if (!lib.IsLoaded()) %0A        %7B%0A          System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A        %7D%0A      %7D%0A    %7D%0A    vtkNativeLibrary.DisableOutputWindow(null);%0A  %7D%0A  // -----------------------------------------------------------------%0A%09%0A  public static void main(String s%5B%5D) %0A  %7B%0A    vtkMatrix4x4 M = new vtkMatrix4x4();%0A    M.SetElement(0, 0, 1);%0A    M.SetElement(0, 1, 2);%0A    M.SetElement(0, 2, 3);%0A    M.SetElement(0, 3, 4);%0A    M.SetElement(1, 0, 2);%0A    M.SetElement(1, 1, 2);%0A    M.SetElement(1, 2, 3);%0A    M.SetElement(1, 3, 4);%0A    M.SetElement(2, 0, 3);%0A    M.SetElement(2, 1, 2);%0A    M.SetElement(2, 2, 1);%0A    M.SetElement(2, 3, 4);%0A    M.SetElement(3, 0, 4);%0A    M.SetElement(3, 1, 2);%0A    M.SetElement(3, 2, 3);%0A    M.SetElement(3, 3, 4);%0A%0A    vtkPerspectiveTransform PT = new vtkPerspectiveTransform();%0A    PT.SetMatrix(M);%0A%0A    vtkTransform Transform = new vtkTransform();%0A    Transform.SetMatrix(M);%0A%0A    double p%5B%5D = new double%5B%5D %7B1.0,2.0,3.0%7D;%0A%0A    double normalProjection%5B%5D = new double%5B3%5D;%0A    Transform.TransformPoint(p, normalProjection);%0A    System.out.println(normalProjection%5B0%5D + %22 %22 + normalProjection%5B1%5D + %22 %22 + normalProjection%5B2%5D);%0A%0A    double perspectiveProjection%5B%5D = new double%5B3%5D;%0A    PT.TransformPoint(p, perspectiveProjection);%0A    System.out.println(perspectiveProjection%5B0%5D + %22 %22 + perspectiveProjection%5B1%5D + %22 %22 + perspectiveProjection%5B2%5D);%0A  %7D%09%09  %0A%7D%0A

Create PerspectiveTransform.java