Class SineStarFactory
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.
Inherited Members
Namespace: NetTopologySuite.Geometries.Utilities
Assembly: NetTopologySuite.dll
Syntax
public class SineStarFactory : GeometricShapeFactory
Constructors
| Improve this Doc View SourceSineStarFactory()
Creates a factory which will create sine stars using the default GeometryFactory
Declaration
public SineStarFactory()
SineStarFactory(GeometryFactory)
Creates a factory which will create sine stars using the given GeometryFactory
Declaration
public SineStarFactory(GeometryFactory geomFact)
Parameters
Type | Name | Description |
---|---|---|
GeometryFactory | geomFact | The factory to use |
Properties
| Improve this Doc View SourceArmLengthRatio
Gets or sets the ratio of the length of each arm to the radius of the star. A smaller number makes the arms shorter.
Declaration
public double ArmLengthRatio { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
Value should be between 0.0 and 1.0
NumArms
Gets/Sets the number of arms in the star
Declaration
public int NumArms { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceCreate(Coordinate, Double, Int32, Int32, Double)
Creates a sine star with the given parameters.
Declaration
public static Geometry Create(Coordinate origin, double size, int nPts, int nArms, double armLengthRatio)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | origin | The origin point. |
Double | size | The size of the star. |
Int32 | nPts | The number of points in the star. |
Int32 | nArms | The number of arms to generate. |
Double | armLengthRatio | The arm length ratio. |
Returns
Type | Description |
---|---|
Geometry | A sine star shape. |
CreateSineStar()
Generates the geometry for the sine star
Declaration
public Geometry CreateSineStar()
Returns
Type | Description |
---|---|
Geometry | The geometry representing the sine star |