Package org.hipparchus.samples.geometry
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeometryExample.Display
Main frame for geometry examples.
-
Constructor Summary
Constructors Constructor Description GeometryExample()
Empty constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.piccolo2d.PCanvas
createCanvas()
Create a canvasstatic List<Vector2D>
createCircle(int samples)
Create a circle sprite.static List<Vector2D>
createCross()
Create a cross sprite.static List<Vector2D>
createRandomPoints(int size)
Create a list of random points.static void
main(String[] argv)
Main entry point.
-
-
-
Method Detail
-
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)
-
-