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
Modifier and TypeClassDescriptionstatic class
Main frame for geometry examples. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.piccolo2d.PCanvas
Create a canvascreateCircle
(int samples) Create a circle sprite.Create a cross sprite.createRandomPoints
(int size) Create a list of random points.static void
Main 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)
-