Class Plane3D

java.lang.Object
org.episteme.core.mathematics.geometry.Plane3D
All Implemented Interfaces:
GeometricObject<Point3D>

public class Plane3D extends Object implements GeometricObject<Point3D>
Represents a plane in 3D Euclidean space.

Defined by a normal vector N and a point P: (X - P) . N = 0 or ax + by + cz + d = 0.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

  • Method Details

    • fromPoints

      public static Plane3D fromPoints(Point3D a, Point3D b, Point3D c)
      Creates a plane from 3 points. Computes the normal from the cross product of (b-a) and (c-a).
    • flipped

      public Plane3D flipped()
      Returns a flipped version of this plane (negated normal and d).
    • flip

      public Plane3D flip()
    • getNormal

      public Vector3D getNormal()
    • getPoint

      public Vector3D getPoint()
    • distance

      public Real distance(Vector3D p)
      Calculates the signed distance from a point to this plane. Positive if on the side of the normal, negative otherwise.
      Parameters:
      p - the point
      Returns:
      the signed distance
    • project

      public Vector3D project(Vector3D p)
      Projects a point onto this plane.
      Parameters:
      p - the point to project
      Returns:
      the projected point on the plane
    • negate

      public Plane3D negate()
      Returns a negated version of this plane (flips the normal).
      Returns:
      the negated plane
    • dimension

      public int dimension()
      Description copied from interface: GeometricObject
      Returns the intrinsic dimension of this geometric object.

      Examples:

      • Point: 0
      • Line/Segment: 1
      • Plane/Surface: 2
      • Volume: 3

      Specified by:
      dimension in interface GeometricObject<Point3D>
      Returns:
      the dimension
    • ambientDimension

      public int ambientDimension()
      Description copied from interface: GeometricObject
      Returns the dimension of the ambient space containing this object.

      For example, a 2D plane in 3D space has dimension=2 but ambientDimension=3.

      Specified by:
      ambientDimension in interface GeometricObject<Point3D>
      Returns:
      the ambient space dimension
    • containsPoint

      public boolean containsPoint(Point3D p)
    • description

      public String description()
      Description copied from interface: GeometricObject
      Returns a human-readable description of this geometric object.
      Specified by:
      description in interface GeometricObject<Point3D>
      Returns:
      description string
    • intersection

      public Vector3D intersection(Line3D line)
      Computes the intersection of this plane with a line.
      Parameters:
      line - the line
      Returns:
      the intersection point, or null if the line is parallel to the plane
    • intersection

      public Line3D intersection(Plane3D other)
      Computes the intersection of this plane with another plane.
      Parameters:
      other - the other plane
      Returns:
      the intersection line, or null if planes are parallel