package org.stuygfx.graphics;

public class Point {

    public int x;
    public int y;
    public int z;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
        this.z = 0;
    }

    public Point(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }
}

@@ -24,16 +24,49 @@
 phics;%0A%0A
+import org.stuygfx.math.Matrix;%0A%0A
 public c
@@ -339,11 +339,561 @@
 z;%0A    %7D
+%0A%0A    public Point(Matrix m) %7B%0A        assert (m.rows() == 4 && m.cols() == 1);%0A        this.x = (int) m.data%5B0%5D%5B0%5D;%0A        this.y = (int) m.data%5B1%5D%5B0%5D;%0A        this.z = (int) m.data%5B2%5D%5B0%5D;%0A    %7D%0A%0A    public Matrix toMatrix() %7B%0A        double%5B%5D%5B%5D values = %7B %7B this.x %7D, %7B this.y %7D, %7B this.z %7D, %7B 1 %7D %7D;%0A        return new Matrix(values);%0A    %7D%0A%0A    public void fromMatrix(Matrix m) %7B%0A        assert (m.rows() == 4 && m.cols() == 1);%0A        this.x = (int) m.data%5B0%5D%5B0%5D;%0A        this.y = (int) m.data%5B1%5D%5B0%5D;%0A        this.z = (int) m.data%5B2%5D%5B0%5D;%0A    %7D
 %0A%7D%0A

Add support for Point to Matrix