Class SineStarFactory
- Namespace
- NetTopologySuite.Geometries.Utilities
- Assembly
- NetTopologySuite.dll
Creates geometries which are shaped like multi-armed stars with each arm shaped like a sine wave. These kinds of geometries are useful as a more complex geometry for testing algorithms.
public class SineStarFactory : GeometricShapeFactory
- Inheritance
-
SineStarFactory
- Inherited Members
Constructors
SineStarFactory()
Creates a factory which will create sine stars using the default GeometryFactory
public SineStarFactory()
SineStarFactory(GeometryFactory)
Creates a factory which will create sine stars using the given GeometryFactory
public SineStarFactory(GeometryFactory geomFact)
Parameters
geomFactGeometryFactoryThe factory to use
Properties
ArmLengthRatio
Gets or sets the ratio of the length of each arm to the radius of the star. A smaller number makes the arms shorter.
public double ArmLengthRatio { get; set; }
Property Value
Remarks
Value should be between 0.0 and 1.0
NumArms
Gets/Sets the number of arms in the star
public int NumArms { get; set; }
Property Value
Methods
Create(Coordinate, double, int, int, double)
Creates a sine star with the given parameters.
public static Geometry Create(Coordinate origin, double size, int nPts, int nArms, double armLengthRatio)
Parameters
originCoordinateThe origin point.
sizedoubleThe size of the star.
nPtsintThe number of points in the star.
nArmsintThe number of arms to generate.
armLengthRatiodoubleThe arm length ratio.
Returns
- Geometry
A sine star shape.
CreateSineStar()
Generates the geometry for the sine star
public Geometry CreateSineStar()
Returns
- Geometry
The geometry representing the sine star