public Point3D ClosestPoint(Point3D point) { Vector3D pv = point.ToVector(); double d = Normal.DotProduct(pv - Point.ToVector()); return((pv - (Normal * d)).ToPoint()); }
public Point3D ClosestPoint(Point3D point) { double n = (point.ToVector() - Point.ToVector()).DotProduct(Vector); double d = Vector.Length(); return(Point + (Vector * (n / d))); }
public Plane3D(Point3D a, Point3D b, Point3D c) { Vector3D av = a.ToVector(); Vector3D bv = b.ToVector(); Vector3D cv = c.ToVector(); _normal = (bv - av).CrossProduct(cv - av).Normalize(); _point = a; }
public Point3D ClosestPoint(Point3D point) { Vector3D pv = point.ToVector(); double d = Normal.DotProduct(pv - Point.ToVector()); return (pv - (Normal * d)).ToPoint(); }
public Plane3D(Point3D a, Point3D b, Point3D c) { Vector3D av = a.ToVector(); Vector3D bv = b.ToVector(); Vector3D cv = c.ToVector(); _normal = (bv - av).CrossProduct(cv - av).Normalize(); _point = a; }
public Point3D ClosestPoint(Point3D point) { double n = (point.ToVector() - Point.ToVector()).DotProduct(Vector); double d = Vector.Length(); return Point + (Vector * (n / d)); }