All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lucuma.core.geom.Shape.scala Maven / Gradle / Ivy

There is a newer version: 0.108.0
Show newest version
// Copyright (c) 2016-2023 Association of Universities for Research in Astronomy, Inc. (AURA)
// For license information see LICENSE or https://opensource.org/licenses/BSD-3-Clause

package lucuma.core.geom

import lucuma.core.math.Offset

/**
 * Shape description usable for testing point inclusion and calculating the area. Point inclusion is
 * used to determine, for instance, guide star reachability for a probe range. Comparative area is
 * usable when calculating which guide star options produce the minimum vignetting (probe arm shadow
 * intersected with science area).
 */
trait Shape {

  /**
   * Returns a set of four offsets defining the shape's bounding box
   */
  def boundingOffsets: BoundingOffsets

  /**
   * Determines whether the given position is contained in the shape.
   */
  def contains(o: Offset): Boolean

  /**
   * Area of the shape. The value is in microarcseconds angular separation^2^ but the absolute value
   * is less useful than comparing across multiple shapes (to determine minimum vignetting).
   */
  def area: Area

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy