@Test public void parameters() { ParametricPlane plane = new ParametricPlane(new Point3D(0, 0, 0), new Point3D(1, 0, 0), new Vector(0, 0, 1)); Point3D p = new Point3D(2.0, 3.0, 0.0); double[] paras = plane.getParameter(p); assertEquals(2.0, paras[0], DELTA); assertEquals(3.0, paras[1], DELTA); }
public double[] getParameter(Point3D p) { double u = 0.0; double v = (this.directionX.getY() * this.directionY.getX()) - (this.directionX.getX() * this.directionY.getY()); if (v != 0.0) { v = ((p.getY() * this.directionY.getX()) - (this.base.getY() * this.directionY.getX()) - (this.directionY.getY() * p.getX()) + (this.base.getX() * this.directionY.getY())) / v; } if (this.directionY.getX() != 0.0) { u = (p.getX() - this.base.getX() - (this.directionX.getX() * v)) / this.directionY.getX(); } else if (this.directionY.getY() != 0.0) { u = (p.getY() - this.base.getY() - (this.directionX.getY() * v)) / this.directionY.getY(); } else if (this.directionY.getY() != 0.0) { u = (p.getZ() - this.base.getZ() - (this.directionX.getZ() * v)) / this.directionY.getZ(); } return new double[] { v, u }; }
ParametricPlane { public double[] getParameter(Point3D p) { double u = 0.0; double v = (this.directionX.getY() * this.directionY.getX()) - (this.directionX.getX() * this.directionY.getY()); if (v != 0.0) { v = ((p.getY() * this.directionY.getX()) - (this.base.getY() * this.directionY.getX()) - (this.directionY.getY() * p.getX()) + (this.base.getX() * this.directionY.getY())) / v; } if (this.directionY.getX() != 0.0) { u = (p.getX() - this.base.getX() - (this.directionX.getX() * v)) / this.directionY.getX(); } else if (this.directionY.getY() != 0.0) { u = (p.getY() - this.base.getY() - (this.directionX.getY() * v)) / this.directionY.getY(); } else if (this.directionY.getY() != 0.0) { u = (p.getZ() - this.base.getZ() - (this.directionX.getZ() * v)) / this.directionY.getZ(); } return new double[] { v, u }; } }
ParametricPlane { public double[] getParameter(Point3D p) { double u = 0.0; double v = (this.directionX.getY() * this.directionY.getX()) - (this.directionX.getX() * this.directionY.getY()); if (v != 0.0) { v = ((p.getY() * this.directionY.getX()) - (this.base.getY() * this.directionY.getX()) - (this.directionY.getY() * p.getX()) + (this.base.getX() * this.directionY.getY())) / v; } if (this.directionY.getX() != 0.0) { u = (p.getX() - this.base.getX() - (this.directionX.getX() * v)) / this.directionY.getX(); } else if (this.directionY.getY() != 0.0) { u = (p.getY() - this.base.getY() - (this.directionX.getY() * v)) / this.directionY.getY(); } else if (this.directionY.getY() != 0.0) { u = (p.getZ() - this.base.getZ() - (this.directionX.getZ() * v)) / this.directionY.getZ(); } return new double[] { v, u }; } ParametricPlane(Point3D basePoint, Vector directionX,
        Vector directionY, Vector normal);  ParametricPlane(Point3D basePoint, Vector directionX, Vector directionY);  ParametricPlane(Point3D basePoint, Point3D b, Vector normal);  ParametricPlane(Point3D basePoint, Point3D b, Point3D c);  ParametricPlane(Extrusion e); }
ParametricPlane { public double[] getParameter(Point3D p) { double u = 0.0; double v = (this.directionX.getY() * this.directionY.getX()) - (this.directionX.getX() * this.directionY.getY()); if (v != 0.0) { v = ((p.getY() * this.directionY.getX()) - (this.base.getY() * this.directionY.getX()) - (this.directionY.getY() * p.getX()) + (this.base.getX() * this.directionY.getY())) / v; } if (this.directionY.getX() != 0.0) { u = (p.getX() - this.base.getX() - (this.directionX.getX() * v)) / this.directionY.getX(); } else if (this.directionY.getY() != 0.0) { u = (p.getY() - this.base.getY() - (this.directionX.getY() * v)) / this.directionY.getY(); } else if (this.directionY.getY() != 0.0) { u = (p.getZ() - this.base.getZ() - (this.directionX.getZ() * v)) / this.directionY.getZ(); } return new double[] { v, u }; } ParametricPlane(Point3D basePoint, Vector directionX,
        Vector directionY, Vector normal);  ParametricPlane(Point3D basePoint, Vector directionX, Vector directionY);  ParametricPlane(Point3D basePoint, Point3D b, Vector normal);  ParametricPlane(Point3D basePoint, Point3D b, Point3D c);  ParametricPlane(Extrusion e); Point3D getPoint(double x, double y); Point3D getPoint(Point3D point); double[] getParameter(Point3D p); boolean isOnPlane(Point3D p); Point3D getBasePoint(); void setBasePoint(Point3D base); Vector getDirectionX(); void setDirectionX(Vector directionX); Vector getDirectionY(); void setDirectionY(Vector directionY); Vector getNormal(); }
ParametricPlane { public double[] getParameter(Point3D p) { double u = 0.0; double v = (this.directionX.getY() * this.directionY.getX()) - (this.directionX.getX() * this.directionY.getY()); if (v != 0.0) { v = ((p.getY() * this.directionY.getX()) - (this.base.getY() * this.directionY.getX()) - (this.directionY.getY() * p.getX()) + (this.base.getX() * this.directionY.getY())) / v; } if (this.directionY.getX() != 0.0) { u = (p.getX() - this.base.getX() - (this.directionX.getX() * v)) / this.directionY.getX(); } else if (this.directionY.getY() != 0.0) { u = (p.getY() - this.base.getY() - (this.directionX.getY() * v)) / this.directionY.getY(); } else if (this.directionY.getY() != 0.0) { u = (p.getZ() - this.base.getZ() - (this.directionX.getZ() * v)) / this.directionY.getZ(); } return new double[] { v, u }; } ParametricPlane(Point3D basePoint, Vector directionX,
        Vector directionY, Vector normal);  ParametricPlane(Point3D basePoint, Vector directionX, Vector directionY);  ParametricPlane(Point3D basePoint, Point3D b, Vector normal);  ParametricPlane(Point3D basePoint, Point3D b, Point3D c);  ParametricPlane(Extrusion e); Point3D getPoint(double x, double y); Point3D getPoint(Point3D point); double[] getParameter(Point3D p); boolean isOnPlane(Point3D p); Point3D getBasePoint(); void setBasePoint(Point3D base); Vector getDirectionX(); void setDirectionX(Vector directionX); Vector getDirectionY(); void setDirectionY(Vector directionY); Vector getNormal();  }