Interface Hyperplane<P extends Point<P>>

  • Type Parameters:
    P - Point implementation type
    All Known Subinterfaces:
    EmbeddingHyperplane<P,​S>
    All Known Implementing Classes:
    AbstractHyperplane, CutAngle, EmbeddingPlane, GreatCircle, Line, OrientedPoint, Plane

    public interface Hyperplane<P extends Point<P>>
    Interface representing a hyperplane, which in a space of dimension n is a subspace of dimension n - 1. (A hyperplane in Euclidean 3D space, for example, is a 2 dimensional plane.)

    Hyperplanes partition their surrounding space into 3 distinct sets: (1) points lying on one side of the hyperplane, (2) points lying on the opposite side, and (3) points lying on the hyperplane itself. One side of the hyperplane is labeled as the plus side and the other as the minus side. The offset of a point in relation to a hyperplane is the distance from the point to the hyperplane combined with the sign of the side that the point lies on: points lying on the plus side of the hyperplane have a positive offsets, those on the minus side have a negative offset, and those lying directly on the hyperplane have an offset of zero.

    See Also:
    HyperplaneLocation, HyperplaneSubset
    • Method Detail

      • offset

        double offset​(P point)
        Get the offset (oriented distance) of a point with respect to this instance. Points with an offset of zero lie on the hyperplane itself.
        Parameters:
        point - the point to compute the offset for
        Returns:
        the offset of the point
      • classify

        HyperplaneLocation classify​(P point)
        Classify a point with respect to this hyperplane.
        Parameters:
        point - the point to classify
        Returns:
        the relative location of the point with respect to this instance
      • contains

        boolean contains​(P point)
        Return true if the given point lies on the hyperplane.
        Parameters:
        point - the point to test
        Returns:
        true if the point lies on the hyperplane
      • project

        P project​(P point)
        Project a point onto this instance.
        Parameters:
        point - the point to project
        Returns:
        the projection of the point onto this instance. The returned point lies on the hyperplane.
      • reverse

        Hyperplane<P> reverse()
        Return a hyperplane that has the opposite orientation as this instance. That is, the plus side of this instance is the minus side of the returned instance and vice versa.
        Returns:
        a hyperplane with the opposite orientation
      • transform

        Hyperplane<P> transform​(Transform<P> transform)
        Transform this instance using the given Transform.
        Parameters:
        transform - object to transform this instance with
        Returns:
        a new, transformed hyperplane
      • similarOrientation

        boolean similarOrientation​(Hyperplane<P> other)
        Return true if this instance has a similar orientation to the given hyperplane, meaning that they point in generally the same direction. This method is not used to determine exact equality of hyperplanes, but rather to determine whether two hyperplanes that contain the same points are parallel (point in the same direction) or anti-parallel (point in opposite directions).
        Parameters:
        other - the hyperplane to compare with
        Returns:
        true if the hyperplanes point in generally the same direction and could possibly be parallel