public Point projectPoint(Point point, Point normal, double d) { double t = (point.dotProduct(normal) - d) / normal.dotProduct(normal); Point result = point.subtract(normal.multiply(t)); return result; }
private Point projection(Point u, Point v) { Point result = null; result = u.multiply(u.dotProduct(v)/u.dotProduct(u)); return result; }