main/src/georegression/metric/Intersection3D_F64.java
public static boolean intersect( PlaneGeneral3D_F64 plane , LineParametric3D_F64 line , Point3D_F64 intersection ) {

		double top = plane.D - plane.A*line.p.x - plane.B*line.p.y - plane.C*line.p.z;
		double bottom = plane.A*line.slope.x + plane.B*line.slope.y + plane.C*line.slope.z;

		if( bottom == 0 )
			return false;

		double d = top/bottom;

		intersection.x = line.p.x + d*line.slope.x;
		intersection.y = line.p.y + d*line.slope.y;
		intersection.z = line.p.z + d*line.slope.z;

		return true;
	}
public static boolean intersect( PlaneGeneral3D_F64 plane , LineParametric3D_F64 line , Point3D_F64 intersection ) {

		double top = plane.D - plane.A*line.p.x - plane.B*line.p.y - plane.C*line.p.z;
		double bottom = plane.A*line.slope.x + plane.B*line.slope.y + plane.C*line.slope.z;

		if( bottom == 0 )
			return false;

		double d = top/bottom;

		intersection.x = line.p.x + d*line.slope.x;
		intersection.y = line.p.y + d*line.slope.y;
		intersection.z = line.p.z + d*line.slope.z;

		return true;
	}
public static boolean intersect ( PlaneGeneral3D_F64 plane , LineParametric3D_F64 line , Point3D_F64 intersection ) { double top = plane . D - plane . A * line . p . x - plane . B * line . p . y - plane . C * line . p . z ; double bottom = plane . A * line . slope . x + plane . B * line . slope . y + plane . C * line . slope . z ; if ( bottom == 0 ) return false ; double d = top / bottom ; intersection . x = line . p . x + d * line . slope . x ; intersection . y = line . p . y + d * line . slope . y ; intersection . z = line . p . z + d * line . slope . z ; return true ; }
Finds the intersection of a line and a plane.  Returns true if they intersect at a unique point or false if
there is no intersection or an infinite number of intersections.

@param plane (Input) Plane
@param line (Input) Line
@param intersection (Output) Where the intersection is written to
@return True if the intersection is at a unique point.  If false then no intersection or infinite.
Finds the intersection of a line and a plane . Returns true if they intersect at a unique point or false if there is no intersection or an infinite number of intersections .