Package org.hipparchus.samples.geometry
Class GeometryExample
java.lang.Object
org.hipparchus.samples.geometry.GeometryExample
Simple example illustrating some parts of the geometry package.
TODO:
- select tolerance level
- allow editing of the point set
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMain frame for geometry examples. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.piccolo2d.PCanvasCreate a canvascreateCircle(int samples) Create a circle sprite.Create a cross sprite.createRandomPoints(int size) Create a list of random points.static voidMain entry point.
-
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
Create a list of random points.- Parameters:
size- number of points- Returns:
- random points
-
createCircle
Create a circle sprite.- Parameters:
samples- number of points- Returns:
- vectors describing the sprite
-
createCross
Create a cross sprite.- Returns:
- vectors describing the sprite
-
createCanvas
public static org.piccolo2d.PCanvas createCanvas()Create a canvas- Returns:
- canvas
-
main
Main entry point.- Parameters:
argv- program arguments (unused here)
-