Documentation

Moser.Geometry.HalfSpaces

Half Spaces and Lines #

This file defines closed and open half-spaces and lines over rational points.

A closed half-space in ℚ², given by a basepoint and an inward-pointing normal.

  • basepoint : RationalPoint

    A point on the boundary line of the half-space.

  • normal : RationalPoint

    The normal, where if the dot product of this with (p - basepoint) is nonnegative, then p is in the half-space.

  • normal_pos : 0 < self.normal.lengthSq

    The normal must be nonzero (positive squared length).

Instances For
    structure OpenHalfSpace :

    An open half-space in ℚ², given by a basepoint and an inward-pointing normal.

    • basepoint : RationalPoint

      A point on the boundary line of the half-space.

    • normal : RationalPoint

      The normal, where if the dot product of this with (p - basepoint) is positive, then p is in the half-space.

    • normal_pos : 0 < self.normal.lengthSq

      The normal must be nonzero (positive squared length).

    Instances For

      Decide whether the point p lies in the open half-space h.

      Equations
      Instances For

        The open half-space strictly to the left of the directed segment from p1 to p2.

        Equations
        Instances For
          structure Line :

          A line in ℚ², given by a point on the line and a nonzero direction vector.

          Instances For
            def Line.parallel (l1 l2 : Line) :

            Decide whether two lines l1 and l2 are parallel (cross product of directions is zero).

            Equations
            Instances For

              Note AI generated

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                The boundary line of a closed half-space (perpendicular to its normal).

                Equations
                Instances For

                  Given two closed half-spaces, compute the intersection point of their boundary lines if it exists. Returns none if the lines are parallel (no intersection or infinite intersection).

                  Equations
                  Instances For

                    Decide whether the point p lies in the closed half-space h.

                    Equations
                    Instances For

                      The closed half-space weakly to the left of the directed segment from p1 to p2.

                      Equations
                      Instances For

                        The closed half-space weakly to the right of the directed segment from p1 to p2.

                        Equations
                        Instances For
                          def ClosedHalfSpace.moveInward (h : ClosedHalfSpace) (dist tolerance : ) (hdist : 0 < dist) (htol : 0 < tolerance) :

                          Change the half-space by moving the basepoint inward by at least dist in the normal direction, and at most dist + tolerance to account for numerical issues.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For