Class GeometryExample

java.lang.Object
org.hipparchus.samples.geometry.GeometryExample

public class GeometryExample extends Object
Simple example illustrating some parts of the geometry package. TODO: - select tolerance level - allow editing of the point set
  • Constructor Details

    • GeometryExample

      public GeometryExample()
      Empty constructor.

      This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.

      Since:
      3.0
  • Method Details

    • createRandomPoints

      public static List<Vector2D> createRandomPoints(int size)
      Create a list of random points.
      Parameters:
      size - number of points
      Returns:
      random points
    • createCircle

      public static List<Vector2D> createCircle(int samples)
      Create a circle sprite.
      Parameters:
      samples - number of points
      Returns:
      vectors describing the sprite
    • createCross

      public static List<Vector2D> createCross()
      Create a cross sprite.
      Returns:
      vectors describing the sprite
    • createCanvas

      public static org.piccolo2d.PCanvas createCanvas()
      Create a canvas
      Returns:
      canvas
    • main

      public static void main(String[] argv)
      Main entry point.
      Parameters:
      argv - program arguments (unused here)