예제 #1
0
        public Point3D ClosestPoint(Point3D point)
        {
            Vector3D pv = point.ToVector();
            double   d  = Normal.DotProduct(pv - Point.ToVector());

            return((pv - (Normal * d)).ToPoint());
        }
예제 #2
0
        public Point3D ClosestPoint(Point3D point)
        {
            double n = (point.ToVector() - Point.ToVector()).DotProduct(Vector);
            double d = Vector.Length();

            return(Point + (Vector * (n / d)));
        }
예제 #3
0
        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;
        }
예제 #4
0
 public Point3D ClosestPoint(Point3D point)
 {
     Vector3D pv = point.ToVector();
     double d = Normal.DotProduct(pv - Point.ToVector());
     return (pv - (Normal * d)).ToPoint();
 }
예제 #5
0
        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;
        }
예제 #6
0
 public Point3D ClosestPoint(Point3D point)
 {
     double n = (point.ToVector() - Point.ToVector()).DotProduct(Vector);
     double d = Vector.Length();
     return Point + (Vector * (n / d));
 }