Table of Contents

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

geomFact GeometryFactory

The 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

double

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

int

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

origin Coordinate

The origin point.

size double

The size of the star.

nPts int

The number of points in the star.

nArms int

The number of arms to generate.

armLengthRatio double

The 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